Documentation ¶
Index ¶
- func AddExtranetIp(ip string)
- func AddGroupTodoItem(content string, sort int, account string, group string)
- func AddPhoto(image string, account string)
- func AddTodoItem(content string, sort int, account string)
- func CompleteGroupTodoItem(id int)
- func CompleteTodoItem(id int)
- func DeleteGroupTodoItem(id int)
- func DeleteTodoItem(id int)
- func ExistExtranetIp(ip string) bool
- func GetDB() *gorm.DB
- func InitDB()
- func Operate()
- func SelectPhotos(account string, day time.Time) []string
- func SelectTodayPhotos(account string) []string
- type ExtranetIp
- type GroupTodoItem
- type Photo
- type Product
- type TodoItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddExtranetIp ¶
func AddExtranetIp(ip string)
func AddGroupTodoItem ¶
func AddTodoItem ¶
func CompleteGroupTodoItem ¶
func CompleteGroupTodoItem(id int)
func CompleteTodoItem ¶
func CompleteTodoItem(id int)
func DeleteGroupTodoItem ¶
func DeleteGroupTodoItem(id int)
func DeleteTodoItem ¶
func DeleteTodoItem(id int)
func ExistExtranetIp ¶
func GetDB ¶
获取gorm db对象,其他包需要执行数据库查询的时候,只要通过tools.getDB()获取db对象即可。 不用担心协程并发使用同样的db对象会共用同一个连接,db对象在调用他的方法的时候会从数据库连接池中获取新的连接
func SelectTodayPhotos ¶
Types ¶
type ExtranetIp ¶
type GroupTodoItem ¶
type GroupTodoItem struct { gorm.Model Group string `gorm:"column:group;type:varchar(255);index:index_group"` Account string `gorm:"column:account;type:varchar(255);index:index_account"` Content string `gorm:"column:content;type:varchar(255)"` Sort int `gorm:"column:sort;type:int(11);index:index_sort"` Completed bool `gorm:"column:completed;type:tinyint(1)"` }
func SelectGroupTodoList ¶
func SelectGroupTodoList(group string) []GroupTodoItem
type TodoItem ¶
type TodoItem struct { gorm.Model Account string `gorm:"column:account;type:varchar(255);index:index_account"` Content string `gorm:"column:content;type:varchar(255)"` Sort int `gorm:"column:sort;type:int(11);index:index_sort"` Completed bool `gorm:"column:completed;type:tinyint(1)"` }
func SelectTodoList ¶
Click to show internal directories.
Click to hide internal directories.