Documentation ¶
Index ¶
- func NewAlias(field string, names ...string) types.Mapper
- func NewEnum(field string, vals ...string) schemas.Mapper
- func NewMetadataMapper() types.Mapper
- func ValidateField(field string, schema *types.Schema) error
- type Access
- type AliasField
- type Condition
- type Copy
- type DefaultMapper
- type Drop
- type Embed
- type EmptyMapper
- type Enum
- type Exists
- type JSONKeys
- type Move
- type SetValue
- type SliceToMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMetadataMapper ¶
Types ¶
type AliasField ¶
func (AliasField) FromInternal ¶
func (d AliasField) FromInternal(data data.Object)
func (AliasField) ModifySchema ¶
func (AliasField) ToInternal ¶
func (d AliasField) ToInternal(data data.Object) error
type Condition ¶
func (Condition) FromInternal ¶
func (Condition) ModifySchema ¶
func (Condition) ToInternal ¶
type Copy ¶
type Copy struct {
From, To string
}
func (Copy) FromInternal ¶
func (Copy) ModifySchema ¶
func (Copy) ToInternal ¶
type DefaultMapper ¶
type DefaultMapper struct {
Field string
}
func (DefaultMapper) FromInternal ¶
func (d DefaultMapper) FromInternal(data data.Object)
func (DefaultMapper) ModifySchema ¶
func (DefaultMapper) ToInternal ¶
func (d DefaultMapper) ToInternal(data data.Object) error
type Embed ¶
type Embed struct { Field string Optional bool ReadOnly bool Ignore []string EmptyValueOk bool // contains filtered or unexported fields }
func (*Embed) FromInternal ¶
func (*Embed) ModifySchema ¶
type EmptyMapper ¶
type EmptyMapper struct { }
func (*EmptyMapper) FromInternal ¶
func (e *EmptyMapper) FromInternal(data data.Object)
func (*EmptyMapper) ModifySchema ¶
func (*EmptyMapper) ToInternal ¶
func (e *EmptyMapper) ToInternal(data data.Object) error
type Enum ¶
type Enum struct { DefaultMapper // contains filtered or unexported fields }
func (*Enum) FromInternal ¶
type JSONKeys ¶
type JSONKeys struct { }
func (JSONKeys) FromInternal ¶
func (JSONKeys) ModifySchema ¶
type Move ¶
type Move struct { Optional bool From, To, CodeName string DestDefined bool NoDeleteFromField bool }
func (Move) FromInternal ¶
func (Move) ModifySchema ¶
type SetValue ¶
type SetValue struct { Field string InternalValue interface{} ExternalValue interface{} }
func (SetValue) FromInternal ¶
func (SetValue) ModifySchema ¶
type SliceToMap ¶
func (SliceToMap) FromInternal ¶
func (s SliceToMap) FromInternal(data data.Object)
func (SliceToMap) ModifySchema ¶
func (SliceToMap) ToInternal ¶
func (s SliceToMap) ToInternal(data data.Object) error
Click to show internal directories.
Click to hide internal directories.