Documentation
¶
Index ¶
- func DoTransaction(fc func(tx *gorm.DB) error) error
- func RedisDelete(key string) error
- func RedisExist(key string) bool
- func RedisGet(key string, out interface{}) error
- func RedisSet(key string, val interface{}, expire time.Duration) error
- func RedisSetBytes(key string, val interface{}, expire time.Duration) error
- type Application
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoTransaction ¶
DoTransaction do transaction
Types ¶
type Application ¶
type Application struct { gorm.Model Name string `gorm:"unique;unique_index"` Usage uint64 `gorm:"not null;default:0"` Liked uint64 `gorm:"not null;default:0"` }
Application list of applications
func (*Application) FindWithTx ¶
func (a *Application) FindWithTx(tx *gorm.DB) error
FindWithTx populate current object with transaction
func (*Application) SaveWithTx ¶
func (a *Application) SaveWithTx(tx *gorm.DB) error
SaveWithTx save application with transaction
Click to show internal directories.
Click to hide internal directories.