entity

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 9 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clone added in v0.3.0

func Clone(from interface{}, to interface{}) (err error)

func FieldNameToCode added in v0.3.0

func FieldNameToCode(name string) string

FieldNameToCode given a field name returns the coded attribute field name. Used to map a field name to its attribute in DMO, DTO and QRO objects.

func FieldsMetadata added in v0.5.2

func FieldsMetadata(ety interface{}) map[string]*FieldMetadata

func From added in v0.3.0

func From(from interface{}, entity interface{}) (err error)

func OptionalFields added in v0.5.2

func OptionalFields(ety interface{}, skip ...string) []string

func TRN

func TRN(name string, id string) *trn.TRN

TRN returns a TRN of entity kind

func To added in v0.3.0

func To(entity interface{}, to interface{}, field ...string) (err error)

Types

type FieldMap

type FieldMap map[string]string

func ToFieldMap added in v0.3.0

func ToFieldMap(ety interface{}, skip ...string) FieldMap

func (FieldMap) Add added in v0.3.0

func (fm FieldMap) Add(name string, kind string)

func (FieldMap) FieldType

func (fm FieldMap) FieldType(name string) (string, bool)

func (FieldMap) HasField

func (fm FieldMap) HasField(name string) bool

type FieldMetadata added in v0.5.2

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

func (*FieldMetadata) DmoMemoryName added in v0.5.2

func (f *FieldMetadata) DmoMemoryName() string

func (*FieldMetadata) DmoMongodbName added in v0.5.2

func (f *FieldMetadata) DmoMongodbName() string

func (*FieldMetadata) DmoRedisName added in v0.5.2

func (f *FieldMetadata) DmoRedisName() string

func (*FieldMetadata) DmoSqlName added in v0.5.2

func (f *FieldMetadata) DmoSqlName() string

func (*FieldMetadata) DtoHttpName added in v0.5.2

func (f *FieldMetadata) DtoHttpName() string

func (*FieldMetadata) Getter added in v0.5.2

func (f *FieldMetadata) Getter() string

func (*FieldMetadata) IsEncrypted added in v0.5.2

func (f *FieldMetadata) IsEncrypted() bool

func (*FieldMetadata) IsOptional added in v0.5.2

func (f *FieldMetadata) IsOptional() bool

func (*FieldMetadata) IsRelationship added in v0.5.5

func (f *FieldMetadata) IsRelationship() bool

func (*FieldMetadata) QroName added in v0.5.2

func (f *FieldMetadata) QroName() string

func (*FieldMetadata) Setter added in v0.5.2

func (f *FieldMetadata) Setter() string

Jump to

Keyboard shortcuts

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