Documentation ¶
Index ¶
- Variables
- func ParseRef(ref string) (name, prop string, err error)
- func RandomID(m *Model, db *gorm.DB) error
- func Ref(name, prop string) string
- type Index
- type Indexes
- type Model
- type Object
- func (obj Object) Equal(ubj Object) bool
- func (obj Object) Map() map[string]interface{}
- func (obj Object) MarshalJSON() ([]byte, error)
- func (obj Object) MarshalYAML() (interface{}, error)
- func (obj *Object) Merge(v map[string]interface{}) Object
- func (obj *Object) Set(v interface{}) Object
- func (obj *Object) SetValues(kv ...interface{}) Object
- func (obj Object) String() string
- func (obj Object) Unmarshal(v interface{}) error
- func (obj *Object) UnmarshalJSON(p []byte) error
- func (obj *Object) UnmarshalYAML(n *yaml.Node) error
- func (obj *Object) Update(ubj Object) bool
- type Overlay
- type OverlayMeta
- type Overlays
- type Schema
- type Schemas
- type Value
- type Values
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TablePrefix = "bigstruct" RefSeparator = '=' ModelBeforeCreate = RandomID )
Functions ¶
Types ¶
type Index ¶
type Index struct { Model `yaml:",inline"` Name string `gorm:"column:name;type:tinytext;not null" yaml:"name,omitempty" json:"name,omitempty"` Property string `gorm:"column:property;type:tinytext;not null" yaml:"property,omitempty" json:"property,omitempty"` Index Object `gorm:"column:index;type:text;not null" yaml:"index,omitempty" json:"index,omitempty"` Metadata Object `gorm:"column:metadata;type:text" yaml:"metadata,omitempty" json:"metadata,omitempty"` }
type Model ¶
type Model struct { ID uint64 `gorm:"column:id;type:bigint;not null;primaryKey;autoIncrement" yaml:"id,omitempty" json:"id,omitempty"` CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null" yaml:"created_at,omitempty" json:"created_at,omitempty"` UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null" yaml:"updated_at,omitempty" json:"updated_at,omitempty"` DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime;index" yaml:"deleted_at,omitempty" json:"deleted_at,omitempty"` }
type Object ¶
type Object string
func (Object) MarshalJSON ¶
func (Object) MarshalYAML ¶
func (*Object) UnmarshalJSON ¶
func (*Object) UnmarshalYAML ¶
type Overlay ¶
type Overlay struct { Model `yaml:",inline"` Name string `gorm:"column:name;type:tinytext;not null" yaml:"name,omitempty" json:"name,omitempty"` Property string `gorm:"-" yaml:"property,omitempty" json:"property,omitempty"` Priority int `gorm:"column:priority;type:smallint;not null" yaml:"priority,omitempty" json:"priority,omitempty"` Metadata Object `gorm:"column:metadata;type:text" yaml:"metadata,omitempty" json:"metadata,omitempty"` }
func (*Overlay) Meta ¶
func (o *Overlay) Meta() *OverlayMeta
func (*Overlay) SetProperty ¶
type OverlayMeta ¶
type OverlayMeta struct { NoProperty bool `json:"no_property,omitempty"` Schema bool `json:"schema,omitempty"` }
func (*OverlayMeta) JSON ¶
func (om *OverlayMeta) JSON() types.JSON
func (*OverlayMeta) Metadata ¶
func (om *OverlayMeta) Metadata() Object
type Schema ¶
type Schema struct { Model `yaml:",inline"` Overlay *Overlay `yaml:"-" json:"-"` OverlayID uint64 `gorm:"column:overlay_id;type:bigint;not null;index" yaml:"overlay_id,omitempty" json:"overlay_id,omitempty"` OverlayProperty string `gorm:"column:overlay_property;type:tinytext;not null" yaml:"overlay_property,omitempty" json:"overlay_property,omitempty"` Key string `gorm:"column:key;type:text;not null" yaml:"key,omitempty" json:"key,omitempty"` Type string `gorm:"column:type;type:tinytext;not null" yaml:"type,omitempty" json:"type,omitempty"` Encoding string `gorm:"column:encoding;type:tinytext;not null" yaml:"encoding,omitempty" json:"encoding,omitempty"` Metadata Object `gorm:"column:metadata;type:text" yaml:"metadata,omitempty" json:"metadata,omitempty"` }
type Value ¶
type Value struct { Model `yaml:",inline"` Overlay *Overlay `gorm:"" yaml:"-" json:"-"` OverlayID uint64 `gorm:"column:overlay_id;type:bigint;not null;index" yaml:"overlay_id,omitempty" json:"overlay_id,omitempty"` OverlayProperty string `gorm:"column:overlay_property;type:tinytext;not null" yaml:"overlay_property,omitempty" json:"overlay_property,omitempty"` Key string `gorm:"column:key;type:text;not null" yaml:"key,omitempty" json:"key,omitempty"` RawValue string `gorm:"column:value;type:text" yaml:"value,omitempty" json:"value,omitempty"` Metadata Object `gorm:"column:metadata;type:text" yaml:"metadata,omitempty" json:"metadata,omitempty"` }
Click to show internal directories.
Click to hide internal directories.