Documentation ¶
Index ¶
- Variables
- func NewAdministratorRepo(data *Data, logger log.Logger) biz.AdministratorRepo
- func NewMysqlCmd(conf *conf.Bootstrap, logger log.Logger) *gorm.DB
- func NewRedisClient(conf *conf.Data) *redis.Client
- func NewRedisCmd(conf *conf.Data, logger log.Logger) redis.Cmdable
- func Paginate(page, pageSize int64) func(db *gorm.DB) *gorm.DB
- type AdministratorEntity
- type AdministratorRepo
- func (repo AdministratorRepo) AdministratorStatusChange(ctx context.Context, id int64, status bool) (bool, error)
- func (repo AdministratorRepo) CreateAdministrator(ctx context.Context, domain *domain.Administrator) (*domain.Administrator, error)
- func (repo AdministratorRepo) DeleteAdministrator(ctx context.Context, domain *domain.Administrator) error
- func (repo AdministratorRepo) GetAdministrator(ctx context.Context, params map[string]interface{}) (*domain.Administrator, error)
- func (repo AdministratorRepo) GetAdministratorByParams(ctx context.Context, params map[string]interface{}) (record *AdministratorEntity, err error)
- func (repo AdministratorRepo) ListAdministrator(ctx context.Context, page, pageSize int64, params map[string]interface{}) ([]*domain.Administrator, int64, error)
- func (repo AdministratorRepo) RecoverAdministrator(ctx context.Context, domain *domain.Administrator) error
- func (repo AdministratorRepo) UpdateAdministrator(ctx context.Context, domain *domain.Administrator) error
- func (repo AdministratorRepo) UpdateAdministratorLoginInfo(ctx context.Context, id int64, ip string, time string) (bool, error)
- func (repo AdministratorRepo) VerifyAdministratorPassword(ctx context.Context, id int64, password string) (bool, error)
- type BaseFields
- type Data
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet( NewData, NewRedisCmd, NewMysqlCmd, NewRedisClient, NewAdministratorRepo)
ProviderSet is data providers.
Functions ¶
func NewAdministratorRepo ¶
func NewAdministratorRepo(data *Data, logger log.Logger) biz.AdministratorRepo
Types ¶
type AdministratorEntity ¶
type AdministratorEntity struct { BaseFields Domain string `gorm:"type:varchar(255);not null;comment:域"` Status bool `gorm:"not null;comment:状态0冻结1正常"` Username string `gorm:"type:varchar(255);not null;unique;comment:用户名"` Password string `gorm:"type:varchar(255);not null;comment:密码"` Salt string `gorm:"type:varchar(255);not null;comment:密码盐"` Mobile string `gorm:"type:varchar(255);not null;comment:手机号"` Nickname string `gorm:"type:varchar(255);not null;comment:昵称"` Avatar string `gorm:"type:varchar(255);not null;comment:头像"` Role string `gorm:"type:varchar(255);not null;comment:角色"` LastLoginTime string `gorm:"type:varchar(255);not null;comment:上次登录时间"` LastLoginIp string `gorm:"type:varchar(255);not null;comment:上次登录ip"` }
func (AdministratorEntity) TableName ¶
func (AdministratorEntity) TableName() string
type AdministratorRepo ¶
type AdministratorRepo struct {
// contains filtered or unexported fields
}
func (AdministratorRepo) AdministratorStatusChange ¶
func (AdministratorRepo) CreateAdministrator ¶
func (repo AdministratorRepo) CreateAdministrator(ctx context.Context, domain *domain.Administrator) (*domain.Administrator, error)
func (AdministratorRepo) DeleteAdministrator ¶
func (repo AdministratorRepo) DeleteAdministrator(ctx context.Context, domain *domain.Administrator) error
func (AdministratorRepo) GetAdministrator ¶
func (repo AdministratorRepo) GetAdministrator(ctx context.Context, params map[string]interface{}) (*domain.Administrator, error)
func (AdministratorRepo) GetAdministratorByParams ¶
func (repo AdministratorRepo) GetAdministratorByParams(ctx context.Context, params map[string]interface{}) (record *AdministratorEntity, err error)
func (AdministratorRepo) ListAdministrator ¶
func (repo AdministratorRepo) ListAdministrator(ctx context.Context, page, pageSize int64, params map[string]interface{}) ([]*domain.Administrator, int64, error)
func (AdministratorRepo) RecoverAdministrator ¶
func (repo AdministratorRepo) RecoverAdministrator(ctx context.Context, domain *domain.Administrator) error
func (AdministratorRepo) UpdateAdministrator ¶
func (repo AdministratorRepo) UpdateAdministrator(ctx context.Context, domain *domain.Administrator) error
func (AdministratorRepo) UpdateAdministratorLoginInfo ¶
func (AdministratorRepo) VerifyAdministratorPassword ¶
type BaseFields ¶
Click to show internal directories.
Click to hide internal directories.