Documentation ¶
Index ¶
- Variables
- func GetDB() *gorm.DB
- func Registry()
- type Controller
- type File
- func (c *File) Condition(q *FileQuery) *gorm.DB
- func (c *File) Delete(q *FileQuery) error
- func (c *File) Exists(data string) (ok bool, err error)
- func (c *File) Get(q *FileQuery) (res File, err error)
- func (c *File) List(q *FileQuery) (res []*File, total int64, err error)
- func (c *File) NoExists(no string) (ok bool)
- func (c *File) Registry()
- func (c *File) Save() error
- func (c *File) TableName() string
- type FileQuery
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MySQLLogLevel = map[string]mysqllogger.LogLevel{ "silent": mysqllogger.Silent, "error": mysqllogger.Error, "warn": mysqllogger.Warn, "info": mysqllogger.Info, } )
Functions ¶
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController() *Controller
func (*Controller) Begin ¶
func (c *Controller) Begin() error
func (*Controller) Commit ¶
func (c *Controller) Commit() error
func (*Controller) CreateTables ¶
func (c *Controller) CreateTables(tables []base.AutoRegister) (err error)
func (*Controller) FileModel ¶
func (c *Controller) FileModel(m *File) *File
func (*Controller) Rollback ¶
func (c *Controller) Rollback() error
Click to show internal directories.
Click to hide internal directories.