NewProjectMapping is the construct function of ProjectMapping
(projectName string, pluginScopes []plugin.Scope)
| 39 | |
| 40 | // NewProjectMapping is the construct function of ProjectMapping |
| 41 | func NewProjectMapping(projectName string, pluginScopes []plugin.Scope) ProjectMapping { |
| 42 | var scopes []Scope |
| 43 | for _, ps := range pluginScopes { |
| 44 | scopes = append(scopes, Scope{ |
| 45 | Table: ps.TableName(), |
| 46 | RowID: ps.ScopeId(), |
| 47 | }) |
| 48 | } |
| 49 | return ProjectMapping{ |
| 50 | ProjectName: projectName, |
| 51 | Scopes: scopes, |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | type TaskData struct { |
| 56 | Options *Options |