metadata

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2020 License: BSD-3-Clause Imports: 7 Imported by: 35

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStructName

func GetStructName(mdStruct interface{}) string

func IsZeroOfUnderlyingType

func IsZeroOfUnderlyingType(x interface{}) bool

func MapToStruct

func MapToStruct(m map[string]interface{}, object interface{}, validate bool) error

func ResolveSettingValue

func ResolveSettingValue(setting string, value interface{}, settingsMd map[string]data.TypedValue, ef expression.Factory) (interface{}, error)

func StructToMap

func StructToMap(object interface{}) map[string]interface{}

func StructToTypedMap

func StructToTypedMap(object interface{}) map[string]data.TypedValue

func TypedMapToStruct

func TypedMapToStruct(m map[string]data.TypedValue, object interface{}, validate bool) error

Types

type FieldDetails

type FieldDetails struct {
	Name     string
	Label    string
	Type     data.Type
	Allowed  []string
	Required bool
}

func NewFieldDetails

func NewFieldDetails(name string, dType string, mdTag string) *FieldDetails

func (*FieldDetails) AllowedToString

func (d *FieldDetails) AllowedToString() string

func (*FieldDetails) Validate

func (d *FieldDetails) Validate(value interface{}) error

type IOMetadata

type IOMetadata struct {
	Input  map[string]data.TypedValue
	Output map[string]data.TypedValue
}

func (*IOMetadata) MarshalJSON

func (md *IOMetadata) MarshalJSON() ([]byte, error)

func (*IOMetadata) UnmarshalJSON

func (md *IOMetadata) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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