Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct { UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp with time zone" json:"-" sig:"-"` CreatedAt time.Time `gorm:"column:created_at;type:timestamp with time zone" json:"-" sig:"-"` }
Base is the base model for all data model.
func (Base) TimestampFieldName ¶
TimestampFieldName return created at as our timestamp.
type CustomIndex ¶
CustomIndex defines index information
type CustomIndexer ¶
type CustomIndexer interface {
Indexes() []CustomIndex
}
CustomIndexer defines a interface for models that decouples creating index from Gorm tag functionality
type ForeignKeyConstrainer ¶
type ForeignKeyConstrainer interface {
ForeignKeyConstraints() []ForeignKeyConstraint
}
ForeignKeyConstrainer defines a interface for models that support creating foreign key constraints.
type ForeignKeyConstraint ¶
ForeignKeyConstraint defines the required arguments to the AddForeignKey call.
type SignedModelBase ¶
type SignedModelBase struct {
Signature string `gorm:"column:sig;type:varchar(64)" json:"-" sig:"-" bigquery:"-"`
}
SignedModelBase adds a signature column to a model.
func (*SignedModelBase) GetSignature ¶
func (s *SignedModelBase) GetSignature() string
GetSignature implements the SignaturedRecord interface.
func (*SignedModelBase) SetSignature ¶
func (s *SignedModelBase) SetSignature(sig string)
SetSignature implements the SignaturedRecord interface.
type System ¶
type System struct { Base ID int64 `gorm:"column:id;primary_key;AUTO_INCREMENT;not null" json:"id"` Name types.SysVar `gorm:"column:name;primary_key;type:varchar(50);not null" json:"-" bigquery:"primary_key"` Value string `gorm:"column:value;primary_key;type:varchar(512)" json:"-"` }
System defines the table to store system variables.