Documentation ¶
Index ¶
- Variables
- func Close()
- func EscapeLike(colVal string) string
- func Init()
- func NewDB() *gorm.DB
- func RollBackIfPanic(db *gorm.DB)
- type CategoryDao
- type FileDao
- func (dao *FileDao) FindByCategoryID(session *gorm.DB, categoryID uint) []model.File
- func (dao *FileDao) FindByFuzz(f model.FileDTO) []model.FileDTO
- func (dao *FileDao) FindByID(id int) *model.File
- func (dao *FileDao) FindByMD5(md5 string) *model.File
- func (dao *FileDao) FindByName(name string) *model.File
- func (dao *FileDao) Save(file *model.File)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DB *gorm.DB
)
global db or gorm db
Functions ¶
func EscapeLike ¶
func RollBackIfPanic ¶
Types ¶
type CategoryDao ¶
func (*CategoryDao) CreateCategory ¶
func (dao *CategoryDao) CreateCategory(name string) *model.Category
func (*CategoryDao) FindAll ¶
func (dao *CategoryDao) FindAll() []model.Category
type FileDao ¶
func (*FileDao) FindByCategoryID ¶
Click to show internal directories.
Click to hide internal directories.