mapper

package
v0.0.0-...-eef2c6e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMetadataMapper

func NewMetadataMapper() types.Mapper

Types

type Access

type Access struct {
	Fields map[string]string
}

func (Access) FromInternal

func (e Access) FromInternal(data map[string]interface{})

func (Access) ModifySchema

func (e Access) ModifySchema(schema *types.Schema, schemas *types.Schemas) error

func (Access) ToInternal

func (e Access) ToInternal(data map[string]interface{})

type DisplayName

type DisplayName struct {
}

func (DisplayName) FromInternal

func (d DisplayName) FromInternal(data map[string]interface{})

func (DisplayName) ModifySchema

func (d DisplayName) ModifySchema(schema *types.Schema, schemas *types.Schemas) error

func (DisplayName) ToInternal

func (d DisplayName) ToInternal(data map[string]interface{})

type Drop

type Drop struct {
	Field string
}

func (Drop) FromInternal

func (d Drop) FromInternal(data map[string]interface{})

func (Drop) ModifySchema

func (d Drop) ModifySchema(schema *types.Schema, schemas *types.Schemas) error

func (Drop) ToInternal

func (d Drop) ToInternal(data map[string]interface{})

type Embed

type Embed struct {
	Field    string
	Optional bool
	ReadOnly bool
	Ignore   []string
	// contains filtered or unexported fields
}

func (*Embed) FromInternal

func (e *Embed) FromInternal(data map[string]interface{})

func (*Embed) ModifySchema

func (e *Embed) ModifySchema(schema *types.Schema, schemas *types.Schemas) error

func (*Embed) ToInternal

func (e *Embed) ToInternal(data map[string]interface{})

type Enum

type Enum struct {
	Field  string
	Values map[string][]string
}

func (Enum) FromInternal

func (e Enum) FromInternal(data map[string]interface{})

func (Enum) ModifySchema

func (e Enum) ModifySchema(schema *types.Schema, schemas *types.Schemas) error

func (Enum) ToInternal

func (e Enum) ToInternal(data map[string]interface{})

type LabelField

type LabelField struct {
	Field string
}

func (LabelField) FromInternal

func (e LabelField) FromInternal(data map[string]interface{})

func (LabelField) ModifySchema

func (e LabelField) ModifySchema(schema *types.Schema, schemas *types.Schemas) error

func (LabelField) ToInternal

func (e LabelField) ToInternal(data map[string]interface{})

type Move

type Move struct {
	From, To          string
	DestDefined       bool
	NoDeleteFromField bool
}

func (Move) FromInternal

func (m Move) FromInternal(data map[string]interface{})

func (Move) ModifySchema

func (m Move) ModifySchema(s *types.Schema, schemas *types.Schemas) error

func (Move) ToInternal

func (m Move) ToInternal(data map[string]interface{})

type Object

type Object struct {
	types.Mappers
}

func NewObject

func NewObject(mappers ...types.Mapper) Object

type ReadOnly

type ReadOnly struct {
	Field    string
	Optional bool
}

func (ReadOnly) FromInternal

func (r ReadOnly) FromInternal(data map[string]interface{})

func (ReadOnly) ModifySchema

func (r ReadOnly) ModifySchema(schema *types.Schema, schemas *types.Schemas) error

func (ReadOnly) ToInternal

func (r ReadOnly) ToInternal(data map[string]interface{})

type RenameReference

type RenameReference struct {
	// contains filtered or unexported fields
}

func (*RenameReference) FromInternal

func (r *RenameReference) FromInternal(data map[string]interface{})

func (*RenameReference) ModifySchema

func (r *RenameReference) ModifySchema(schema *types.Schema, schemas *types.Schemas) error

func (*RenameReference) ToInternal

func (r *RenameReference) ToInternal(data map[string]interface{})

type Scope

type Scope struct {
	If      types.TypeScope
	IfNot   types.TypeScope
	Mappers []types.Mapper
	// contains filtered or unexported fields
}

func (*Scope) FromInternal

func (s *Scope) FromInternal(data map[string]interface{})

func (*Scope) ModifySchema

func (s *Scope) ModifySchema(schema *types.Schema, schemas *types.Schemas) error

func (*Scope) ToInternal

func (s *Scope) ToInternal(data map[string]interface{})

type SetValue

type SetValue struct {
	From, To string
	Value    interface{}
	IfEq     interface{}
}

func (SetValue) FromInternal

func (s SetValue) FromInternal(data map[string]interface{})

func (SetValue) ModifySchema

func (s SetValue) ModifySchema(schema *types.Schema, schemas *types.Schemas) error

func (SetValue) ToInternal

func (s SetValue) ToInternal(data map[string]interface{})

type SliceToMap

type SliceToMap struct {
	Field string
	Key   string
}

func (SliceToMap) FromInternal

func (s SliceToMap) FromInternal(data map[string]interface{})

func (SliceToMap) ModifySchema

func (s SliceToMap) ModifySchema(schema *types.Schema, schemas *types.Schemas) error

func (SliceToMap) ToInternal

func (s SliceToMap) ToInternal(data map[string]interface{})

type UnionEmbed

type UnionEmbed struct {
	Fields []UnionMapping
	// contains filtered or unexported fields
}

func (*UnionEmbed) FromInternal

func (u *UnionEmbed) FromInternal(data map[string]interface{})

func (*UnionEmbed) ModifySchema

func (u *UnionEmbed) ModifySchema(schema *types.Schema, schemas *types.Schemas) error

func (*UnionEmbed) ToInternal

func (u *UnionEmbed) ToInternal(data map[string]interface{})

type UnionMapping

type UnionMapping struct {
	FieldName   string
	CheckFields []string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL