Documentation
¶
Index ¶
- func DropDB() error
- func InitDB() error
- func UpgradeDB(fromVersion, toVersion string) error
- type Template
- func (t *Template) Delete(params *dao.Params, ids string, queryFuncs ...func(*gorm.DB) *gorm.DB) error
- func (t *Template) GetOne(params *dao.Params, queryFuncs ...func(*gorm.DB) *gorm.DB) (*Template, error)
- func (t *Template) List(params *dao.Params, queryFuncs ...func(*gorm.DB) *gorm.DB) ([]*Template, int64, error)
- func (t *Template) Save(params *dao.Params, queryFuncs ...func(*gorm.DB) *gorm.DB) error
- func (t *Template) TableName() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Template ¶
type Template struct {
ID uint `gorm:"primaryKey;autoIncrement" json:"id,omitempty"`
Name string `gorm:"index" json:"name,omitempty"`
Content string `gorm:"type:text" json:"content,omitempty"`
Kind string `gorm:"index" json:"kind,omitempty"`
Cluster string `gorm:"index" json:"cluster,omitempty"`
IsGlobal bool `gorm:"index" json:"is_global,omitempty"`
CreatedBy string `gorm:"index" json:"created_by,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty" gorm:"<-:create"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.