Documentation
¶
Index ¶
- Constants
- Variables
- func NewAuthRepo(data *Data) biz.AuthRepo
- func NewUserRepo(data *Data) biz.UserRepo
- func NewVolumeRepo(data *Data) storage.VolumeRepo
- func UserOptionWhere(op biz.ListUserOption) func(db *gorm.DB) *gorm.DB
- type Data
- func (d Data) DB(ctx context.Context) *gorm.DB
- func (Data) FindAll(db *gorm.DB, list interface{}, total *int64) error
- func (d Data) JsonCacheData(_ context.Context, key string, disc interface{}, ...) error
- func (Data) PageFindAssociationList(db *gorm.DB, mod interface{}, list interface{}, total *int64, ...) error
- func (Data) PageFindList(db *gorm.DB, list interface{}, total *int64, op biz.ListOption, ...) error
- func (d Data) Transaction(ctx context.Context, fc func(tx *gorm.DB) error) error
Constants ¶
View Source
const CodeKey = "Code"
View Source
const CodeLastTime = "Code:LastTime"
View Source
const PasswdErrorCountKey = "PasswdErrorCount"
Variables ¶
View Source
var ProviderSet = wire.NewSet( NewData, NewUserRepo, NewVolumeRepo, NewAuthRepo, )
ProviderSet is data providers.
Functions ¶
func NewAuthRepo ¶
func NewUserRepo ¶
func NewVolumeRepo ¶
func NewVolumeRepo(data *Data) storage.VolumeRepo
func UserOptionWhere ¶
用户查询条件
Types ¶
type Data ¶
type Data struct {
// contains filtered or unexported fields
}
Data .
func (Data) JsonCacheData ¶
func (d Data) JsonCacheData(_ context.Context, key string, disc interface{}, fc func() (interface{}, error), duration time.Duration) error
缓存数据 目前采用内存缓存
func (Data) PageFindAssociationList ¶
func (Data) PageFindAssociationList(db *gorm.DB, mod interface{}, list interface{}, total *int64, op biz.ListOption, association string) error
关联模式分页查询列表
func (Data) PageFindList ¶
func (Data) PageFindList(db *gorm.DB, list interface{}, total *int64, op biz.ListOption, selects ...interface{}) error
获取分页列表
Click to show internal directories.
Click to hide internal directories.