Versions in this module Expand all Collapse all v0 v0.0.1 Apr 18, 2023 Changes in this version + var MySQLLogLevel = map[string]mysqllogger.LogLevel + func GetDB() *gorm.DB + func Registry() + type Collection struct + Description string + FileId uint + Name string + func (c *Collection) Condition(q *CollectionQuery) *gorm.DB + func (c *Collection) Delete(q *CollectionQuery) error + func (c *Collection) Exists(data string) (ok bool, err error) + func (c *Collection) Get(q *CollectionQuery) (res Collection, err error) + func (c *Collection) List(q *CollectionQuery) (res []*Collection, total int64, err error) + func (c *Collection) NoExists(no string) (ok bool) + func (c *Collection) Registry() + func (c *Collection) Save() error + func (c *Collection) TableName() string + type CollectionQuery struct + ID *uint + IDs *[]uint + PageIndex *int + PageSize *int + PreLoad bool + type Controller struct + func NewController() *Controller + func (c *Controller) Begin() error + func (c *Controller) CollectionModel(m *Collection) *Collection + func (c *Controller) Commit() error + func (c *Controller) CreateTables(tables []base.AutoRegister) (err error) + func (c *Controller) FileModel(m *File) *File + func (c *Controller) MessageModel(m *Message) *Message + func (c *Controller) Rollback() error + type File struct + Hash string + Name string + Path string + Type FileType + 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 struct + Hash *string + ID *uint + IDs *[]uint + PageIndex *int + PageSize *int + PreLoad bool + type FileType string + var Excel FileType = "excel" + var PromptCompletion FileType = "PromptCompletion" + var TXT FileType = "txt" + type Message struct + Completion string + Prompt string + func (c *Message) Condition(q *MessageQuery) *gorm.DB + func (c *Message) Delete(q *MessageQuery) error + func (c *Message) Exists(data string) (ok bool, err error) + func (c *Message) Get(q *MessageQuery) (res Message, err error) + func (c *Message) List(q *MessageQuery) (res []*Message, total int64, err error) + func (c *Message) NoExists(no string) (ok bool) + func (c *Message) Registry() + func (c *Message) Save() error + func (c *Message) TableName() string + type MessageQuery struct + Desc bool + ID *uint + IDs *[]uint + PageIndex *int + PageSize *int + PreLoad bool