Documentation ¶
Overview ¶
Package fields provides basic set of fields usable to define domain model
Index ¶
- Constants
- type AnyEntityReferenceField
- func (f AnyEntityReferenceField) AllowedNullElement() bool
- func (f AnyEntityReferenceField) DeserializeValueFromString(s string) (interface{}, error)
- func (f AnyEntityReferenceField) GetSubFieldNames() []string
- func (f AnyEntityReferenceField) GetSubFields() []field.Field
- func (f AnyEntityReferenceField) MapCompoundValueToSlice(original interface{}) (storage []interface{}, err error)
- func (f AnyEntityReferenceField) MarshalJSON() ([]byte, error)
- func (f AnyEntityReferenceField) SerializeValueToString(value interface{}) string
- func (f AnyEntityReferenceField) Type() reflect.Type
- func (f AnyEntityReferenceField) UnmapCompoundValueFromSlice(storage []interface{}) (original interface{})
- type ArrayField
- type BlobField
- type BooleanField
- type CharField
- type CompoundFieldDefinition
- type Date
- type DateField
- type DateTime
- type DateTimeField
- type DecimalField
- type EntityReferenceField
- func (field EntityReferenceField) DeserializeValueFromString(s string) (interface{}, error)
- func (field EntityReferenceField) GetFieldType() field.Field
- func (field EntityReferenceField) MapValueToAlias(original interface{}) (storage interface{}, err error)
- func (field EntityReferenceField) MarshalJSON() ([]byte, error)
- func (field EntityReferenceField) SerializeValueToString(value interface{}) string
- func (field EntityReferenceField) UnmapValueFromAlias(storage interface{}) (original interface{})
- type EntityRevisionReferenceField
- type FileField
- type FileValue
- type ImageField
- type ImageValue
- type Int16
- type Int64
- type ReadSeekCloser
- type RichTextField
- func (r RichTextField) AllowedNullElement() bool
- func (r RichTextField) DeserializeValueFromString(s string) (interface{}, error)
- func (r RichTextField) GetSubFieldNames() []string
- func (r RichTextField) GetSubFields() []field.Field
- func (r RichTextField) MapCompoundValueToSlice(original interface{}) (storage []interface{}, err error)
- func (r RichTextField) MarshalJSON() ([]byte, error)
- func (r RichTextField) SerializeValueToString(value interface{}) string
- func (r RichTextField) Type() reflect.Type
- func (r RichTextField) UnmapCompoundValueFromSlice(storage []interface{}) (original interface{})
- type RichTextValue
- type StoredFileValue
- type StructFieldDefinition
Constants ¶
View Source
const (
CharFieldInfinityLength int = -1
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnyEntityReferenceField ¶
type AnyEntityReferenceField struct{}
func (AnyEntityReferenceField) AllowedNullElement ¶
func (f AnyEntityReferenceField) AllowedNullElement() bool
func (AnyEntityReferenceField) DeserializeValueFromString ¶
func (f AnyEntityReferenceField) DeserializeValueFromString(s string) (interface{}, error)
func (AnyEntityReferenceField) GetSubFieldNames ¶
func (f AnyEntityReferenceField) GetSubFieldNames() []string
func (AnyEntityReferenceField) GetSubFields ¶
func (f AnyEntityReferenceField) GetSubFields() []field.Field
func (AnyEntityReferenceField) MapCompoundValueToSlice ¶
func (f AnyEntityReferenceField) MapCompoundValueToSlice(original interface{}) (storage []interface{}, err error)
func (AnyEntityReferenceField) MarshalJSON ¶
func (f AnyEntityReferenceField) MarshalJSON() ([]byte, error)
func (AnyEntityReferenceField) SerializeValueToString ¶
func (f AnyEntityReferenceField) SerializeValueToString(value interface{}) string
func (AnyEntityReferenceField) Type ¶
func (f AnyEntityReferenceField) Type() reflect.Type
func (AnyEntityReferenceField) UnmapCompoundValueFromSlice ¶
func (f AnyEntityReferenceField) UnmapCompoundValueFromSlice(storage []interface{}) (original interface{})
type ArrayField ¶
func (ArrayField) DeserializeValueFromString ¶
func (c ArrayField) DeserializeValueFromString(s string) (interface{}, error)
func (ArrayField) MarshalJSON ¶
func (c ArrayField) MarshalJSON() ([]byte, error)
func (ArrayField) SerializeValueToString ¶
func (c ArrayField) SerializeValueToString(value interface{}) string
type BlobField ¶
type BlobField struct { }
func (BlobField) DeserializeValueFromString ¶
func (BlobField) MarshalJSON ¶
func (BlobField) SerializeValueToString ¶
type BooleanField ¶
type BooleanField struct { }
func (BooleanField) DeserializeValueFromString ¶
func (f BooleanField) DeserializeValueFromString(s string) (interface{}, error)
func (BooleanField) MarshalJSON ¶
func (f BooleanField) MarshalJSON() ([]byte, error)
func (BooleanField) SerializeValueToString ¶
func (f BooleanField) SerializeValueToString(value interface{}) string
type CharField ¶
type CharField struct {
MaxLength int
}
func (CharField) DeserializeValueFromString ¶
func (CharField) MarshalJSON ¶
func (CharField) SerializeValueToString ¶
type CompoundFieldDefinition ¶
type CompoundFieldDefinition interface { domainModel.PersistenceCompoundField domainModel.UserCompoundField }
func CompoundField ¶
func CompoundField( Fields field.StructType, nullable bool, ) CompoundFieldDefinition
type Date ¶
func (Date) MarshalText ¶
type DateField ¶
type DateField struct{}
func (DateField) DeserializeValueFromString ¶
func (DateField) MarshalJSON ¶
func (DateField) SerializeValueToString ¶
type DateTime ¶
func (DateTime) MarshalText ¶
type DateTimeField ¶
type DateTimeField struct{}
func (DateTimeField) DeserializeValueFromString ¶
func (d DateTimeField) DeserializeValueFromString(s string) (interface{}, error)
func (DateTimeField) MarshalJSON ¶
func (d DateTimeField) MarshalJSON() ([]byte, error)
func (DateTimeField) SerializeValueToString ¶
func (d DateTimeField) SerializeValueToString(value interface{}) string
type DecimalField ¶
type DecimalField struct {
Precision, Scale int
}
func (DecimalField) DeserializeValueFromString ¶
func (d DecimalField) DeserializeValueFromString(s string) (interface{}, error)
func (DecimalField) MarshalJSON ¶
func (d DecimalField) MarshalJSON() ([]byte, error)
func (DecimalField) SerializeValueToString ¶
func (d DecimalField) SerializeValueToString(value interface{}) string
type EntityReferenceField ¶
func (EntityReferenceField) DeserializeValueFromString ¶
func (field EntityReferenceField) DeserializeValueFromString(s string) (interface{}, error)
func (EntityReferenceField) GetFieldType ¶
func (field EntityReferenceField) GetFieldType() field.Field
func (EntityReferenceField) MapValueToAlias ¶
func (field EntityReferenceField) MapValueToAlias(original interface{}) (storage interface{}, err error)
func (EntityReferenceField) MarshalJSON ¶
func (field EntityReferenceField) MarshalJSON() ([]byte, error)
func (EntityReferenceField) SerializeValueToString ¶
func (field EntityReferenceField) SerializeValueToString(value interface{}) string
func (EntityReferenceField) UnmapValueFromAlias ¶
func (field EntityReferenceField) UnmapValueFromAlias(storage interface{}) (original interface{})
type EntityRevisionReferenceField ¶
type EntityRevisionReferenceField struct {
EntityUname string
}
func (EntityRevisionReferenceField) GetSubFieldNames ¶
func (f EntityRevisionReferenceField) GetSubFieldNames() []string
func (EntityRevisionReferenceField) GetSubFields ¶
func (f EntityRevisionReferenceField) GetSubFields() []field.Field
TODO: what about foreign keys
type FileField ¶
type FileField struct {
FileStorage string
}
func (FileField) DeserializeValueFromString ¶
func (FileField) MarshalJSON ¶
func (FileField) SerializeValueToString ¶
type FileValue ¶
type FileValue interface { FileName() string OpenReader() (ReadSeekCloser, error) }
func NewFileValue ¶
type ImageField ¶
type ImageField struct {
FileStorage string
}
TODO: maybe move the responsiblity for composition here
func (ImageField) DeserializeValueFromString ¶
func (i ImageField) DeserializeValueFromString(s string) (interface{}, error)
func (ImageField) MarshalJSON ¶
func (i ImageField) MarshalJSON() ([]byte, error)
func (ImageField) SerializeValueToString ¶
func (i ImageField) SerializeValueToString(value interface{}) string
type ImageValue ¶
type ImageValue interface { Content() FileValue Format() string Width() int Height() int Hash() []byte }
func NewImageValue ¶
func NewImageValue(name string, mime string, content []byte) (ImageValue, error)
func NewImageValueFromFileValue ¶
func NewImageValueFromFileValue(fileValue FileValue) (ImageValue, error)
type Int16 ¶
type Int16 struct { }
func (Int16) DeserializeValueFromString ¶
func (Int16) MarshalJSON ¶
func (Int16) SerializeValueToString ¶
type Int64 ¶
type Int64 struct { }
func (Int64) DeserializeValueFromString ¶
func (Int64) MarshalJSON ¶
func (Int64) SerializeValueToString ¶
type RichTextField ¶
type RichTextField struct { }
func (RichTextField) AllowedNullElement ¶
func (r RichTextField) AllowedNullElement() bool
func (RichTextField) DeserializeValueFromString ¶
func (r RichTextField) DeserializeValueFromString(s string) (interface{}, error)
func (RichTextField) GetSubFieldNames ¶
func (r RichTextField) GetSubFieldNames() []string
func (RichTextField) GetSubFields ¶
func (r RichTextField) GetSubFields() []field.Field
func (RichTextField) MapCompoundValueToSlice ¶
func (r RichTextField) MapCompoundValueToSlice(original interface{}) (storage []interface{}, err error)
func (RichTextField) MarshalJSON ¶
func (r RichTextField) MarshalJSON() ([]byte, error)
func (RichTextField) SerializeValueToString ¶
func (r RichTextField) SerializeValueToString(value interface{}) string
func (RichTextField) Type ¶
func (r RichTextField) Type() reflect.Type
func (RichTextField) UnmapCompoundValueFromSlice ¶
func (r RichTextField) UnmapCompoundValueFromSlice(storage []interface{}) (original interface{})
type RichTextValue ¶
type RichTextValue struct {
// contains filtered or unexported fields
}
func NewRichTextValue ¶
func NewRichTextValue(mimeType string, content string) RichTextValue
func (RichTextValue) GetContent ¶
func (v RichTextValue) GetContent() string
func (RichTextValue) MarshalText ¶
func (v RichTextValue) MarshalText() (text []byte, err error)
type StoredFileValue ¶
type StructFieldDefinition ¶
type StructFieldDefinition interface { domainModel.PersistenceCompoundField domainModel.UserCompoundField }
func StructField ¶
func StructField( StructType interface{}, OverrideFields field.StructType, nullable bool, ) StructFieldDefinition
Source Files ¶
Click to show internal directories.
Click to hide internal directories.