|
@ -5,8 +5,9 @@ type Entity struct { |
|
|
BuildCursor func() interface{} |
|
|
BuildCursor func() interface{} |
|
|
Indicator interface{} |
|
|
Indicator interface{} |
|
|
FieldMapping map[string]Field |
|
|
FieldMapping map[string]Field |
|
|
|
|
|
PresetKeys []string |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func NewEntity(tableName string, buildCursor func() interface{}, fieldMapping map[string]Field) Entity { |
|
|
|
|
|
return Entity{tableName, buildCursor, buildCursor(), fieldMapping} |
|
|
|
|
|
|
|
|
func NewEntity(tableName string, buildCursor func() interface{}, fieldMapping map[string]Field, presetKeys []string) Entity { |
|
|
|
|
|
return Entity{tableName, buildCursor, buildCursor(), fieldMapping, presetKeys} |
|
|
} |
|
|
} |