Documentation ¶
Index ¶
- func NewMetadataMapper() types.Mapper
- func ValidateField(field string, schema *types.Schema) error
- func ValidateFields(schemas *types.Schema, fields ...string) error
- type Access
- type AliasField
- type AliasValue
- type AnnotationField
- type Base64
- type BatchMove
- type Bytes
- type ChangeType
- type Condition
- type Copy
- type DefaultMapper
- type DefaultMissing
- type DisplayName
- type Drop
- type Embed
- type Enum
- type JSONEncode
- type JSONKeys
- type LabelField
- type MapToSlice
- type MaybeStringer
- type Move
- type Namespaced
- type Object
- type ObjectsToSlice
- type PendingStatus
- type ReadOnly
- type Required
- type Root
- type SetValue
- type Shlex
- type SingleSlice
- type SliceMerge
- type SliceToMap
- type StringerFactory
- type ToObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMetadataMapper ¶
Types ¶
type AliasField ¶
func NewAlias ¶
func NewAlias(field string, names ...string) AliasField
func (AliasField) FromInternal ¶
func (d AliasField) FromInternal(data map[string]interface{})
func (AliasField) ModifySchema ¶
func (AliasField) ToInternal ¶
func (d AliasField) ToInternal(data map[string]interface{}) error
type AliasValue ¶
func (AliasValue) FromInternal ¶
func (d AliasValue) FromInternal(data map[string]interface{})
func (AliasValue) ModifySchema ¶
func (AliasValue) ToInternal ¶
func (d AliasValue) ToInternal(data map[string]interface{}) error
type AnnotationField ¶
func (AnnotationField) FromInternal ¶
func (e AnnotationField) FromInternal(data map[string]interface{})
func (AnnotationField) ModifySchema ¶
func (AnnotationField) ToInternal ¶
func (e AnnotationField) ToInternal(data map[string]interface{}) error
type BatchMove ¶
type BatchMove struct { From []string To string DestDefined bool NoDeleteFromField bool // contains filtered or unexported fields }
func (*BatchMove) FromInternal ¶
func (*BatchMove) ModifySchema ¶
func (*BatchMove) ToInternal ¶
type Bytes ¶
type Bytes struct {
Field string
}
func (Bytes) FromInternal ¶
func (Bytes) ModifySchema ¶
func (Bytes) ToInternal ¶
type ChangeType ¶
func (ChangeType) FromInternal ¶
func (c ChangeType) FromInternal(data map[string]interface{})
func (ChangeType) ModifySchema ¶
func (ChangeType) ToInternal ¶
func (c ChangeType) ToInternal(data map[string]interface{}) 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 map[string]interface{})
func (DefaultMapper) ModifySchema ¶
func (DefaultMapper) ToInternal ¶
func (d DefaultMapper) ToInternal(data map[string]interface{}) error
type DefaultMissing ¶
type DefaultMissing struct { Field string Default interface{} }
func (DefaultMissing) FromInternal ¶
func (d DefaultMissing) FromInternal(data map[string]interface{})
func (DefaultMissing) ModifySchema ¶
func (DefaultMissing) ToInternal ¶
func (d DefaultMissing) ToInternal(data map[string]interface{}) error
type DisplayName ¶
type DisplayName struct { }
func (DisplayName) FromInternal ¶
func (d DisplayName) FromInternal(data map[string]interface{})
func (DisplayName) ModifySchema ¶
func (DisplayName) ToInternal ¶
func (d DisplayName) ToInternal(data map[string]interface{}) 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 ¶
func (*Embed) ToInternal ¶
type JSONEncode ¶
func (JSONEncode) FromInternal ¶
func (m JSONEncode) FromInternal(data map[string]interface{})
func (JSONEncode) ModifySchema ¶
func (JSONEncode) ToInternal ¶
func (m JSONEncode) ToInternal(data map[string]interface{}) error
type JSONKeys ¶
type JSONKeys struct { }
func (JSONKeys) FromInternal ¶
func (JSONKeys) ModifySchema ¶
func (JSONKeys) ToInternal ¶
type LabelField ¶
type LabelField struct {
Field string
}
func (LabelField) FromInternal ¶
func (e LabelField) FromInternal(data map[string]interface{})
func (LabelField) ModifySchema ¶
func (LabelField) ToInternal ¶
func (e LabelField) ToInternal(data map[string]interface{}) error
type MapToSlice ¶
func (MapToSlice) FromInternal ¶
func (d MapToSlice) FromInternal(data map[string]interface{})
func (MapToSlice) ModifySchema ¶
func (MapToSlice) ToInternal ¶
func (d MapToSlice) ToInternal(data map[string]interface{}) error
type MaybeStringer ¶
type MaybeStringer interface {
MaybeString() interface{}
}
type Namespaced ¶
type Namespaced struct { IfNot bool Mappers []types.Mapper // contains filtered or unexported fields }
func (*Namespaced) FromInternal ¶
func (s *Namespaced) FromInternal(data map[string]interface{})
func (*Namespaced) ModifySchema ¶
func (*Namespaced) ToInternal ¶
func (s *Namespaced) ToInternal(data map[string]interface{}) error
type ObjectsToSlice ¶
type ObjectsToSlice struct { Field string NewObject StringerFactory ToObject ToObject }
func (ObjectsToSlice) FromInternal ¶
func (p ObjectsToSlice) FromInternal(data map[string]interface{})
func (ObjectsToSlice) ModifySchema ¶
func (ObjectsToSlice) ToInternal ¶
func (p ObjectsToSlice) ToInternal(data map[string]interface{}) error
type PendingStatus ¶
type PendingStatus struct { }
func (PendingStatus) FromInternal ¶
func (s PendingStatus) FromInternal(data map[string]interface{})
func (PendingStatus) ModifySchema ¶
func (PendingStatus) ToInternal ¶
func (s PendingStatus) ToInternal(data map[string]interface{}) error
type ReadOnly ¶
func (ReadOnly) FromInternal ¶
func (ReadOnly) ModifySchema ¶
func (ReadOnly) ToInternal ¶
type Required ¶
type Required struct {
Fields []string
}
func (Required) FromInternal ¶
func (Required) ModifySchema ¶
func (Required) ToInternal ¶
type SetValue ¶
type SetValue struct { Field string InternalValue interface{} ExternalValue interface{} }
func (SetValue) FromInternal ¶
func (SetValue) ModifySchema ¶
func (SetValue) ToInternal ¶
type Shlex ¶
type Shlex struct {
Field string
}
func (Shlex) FromInternal ¶
func (Shlex) ModifySchema ¶
func (Shlex) ToInternal ¶
type SingleSlice ¶
func (SingleSlice) FromInternal ¶
func (d SingleSlice) FromInternal(data map[string]interface{})
func (SingleSlice) ModifySchema ¶
func (SingleSlice) ToInternal ¶
func (d SingleSlice) ToInternal(data map[string]interface{}) error
type SliceMerge ¶
func (SliceMerge) FromInternal ¶
func (s SliceMerge) FromInternal(data map[string]interface{})
func (SliceMerge) ModifySchema ¶
func (SliceMerge) ToInternal ¶
func (s SliceMerge) ToInternal(data map[string]interface{}) error
type SliceToMap ¶
func (SliceToMap) FromInternal ¶
func (s SliceToMap) FromInternal(data map[string]interface{})
func (SliceToMap) ModifySchema ¶
func (SliceToMap) ToInternal ¶
func (s SliceToMap) ToInternal(data map[string]interface{}) error
type StringerFactory ¶
type StringerFactory func() MaybeStringer
Source Files ¶
- access.go
- alias_field.go
- alias_value.go
- annotation_field.go
- base64.go
- batchmove.go
- bytes.go
- changetype.go
- check.go
- colon_map.go
- condition.go
- copy.go
- default_mapper.go
- default_missing.go
- display_name.go
- drop.go
- embed.go
- enum.go
- json_encode.go
- json_keys.go
- label_field.go
- metadata.go
- move.go
- object.go
- objects_to_slice.go
- pendingstatus.go
- read_only.go
- required.go
- root.go
- scope.go
- setvalue.go
- shlex.go
- single_slice.go
- slice_merge.go
- slice_to_map.go
Click to show internal directories.
Click to hide internal directories.