Documentation ¶
Index ¶
- Variables
- type AccountUser
- type AccountUserListReq
- type AccountUserListResp
- type AccountUserRepo
- type AccountUserUseCase
- func (uc *AccountUserUseCase) Create(ctx context.Context, au *AccountUser) (int64, error)
- func (uc *AccountUserUseCase) Delete(ctx context.Context, id int64) error
- func (uc *AccountUserUseCase) Get(ctx context.Context, id int64) (*AccountUser, error)
- func (uc *AccountUserUseCase) List(ctx context.Context, req *AccountUserListReq) (*AccountUserListResp, error)
- func (uc *AccountUserUseCase) Login(ctx context.Context, account, password string) (*AccountUser, error)
- func (uc *AccountUserUseCase) Register(ctx context.Context, au *AccountUser) (*AccountUser, error)
- func (uc *AccountUserUseCase) Update(ctx context.Context, au *AccountUser) error
- func (uc *AccountUserUseCase) UpdateAccountUser(ctx context.Context, id int64, au *AccountUser) (*AccountUser, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewAccountUserUseCase)
ProviderSet is biz providers.
Functions ¶
This section is empty.
Types ¶
type AccountUser ¶
type AccountUser struct { Id int64 Username string Password string `json:"-"` Phone string Email string CreateAt time.Time CreateIPAt string LastLoginAt time.Time LastLoginIPAt string LoginTimes int32 Status int8 }
func (*AccountUser) CheckPassword ¶
func (au *AccountUser) CheckPassword(password string) bool
func (*AccountUser) SetPassword ¶
func (au *AccountUser) SetPassword(password string)
type AccountUserListReq ¶
type AccountUserListResp ¶
type AccountUserListResp struct { TotalPages int64 CurrentPage int64 PageSize int64 Data []*AccountUser }
type AccountUserRepo ¶
type AccountUserRepo interface { Register(ctx context.Context, au *AccountUser) (int64, error) GetAccountUserByUsernameOrMobileOrEmail(ctx context.Context, account string) ([]*AccountUser, error) Create(ctx context.Context, au *AccountUser) (int64, error) Update(ctx context.Context, au *AccountUser) error Delete(ctx context.Context, id int64) error Get(ctx context.Context, id int64) (*AccountUser, error) List(ctx context.Context, req *AccountUserListReq) (*AccountUserListResp, error) }
type AccountUserUseCase ¶
type AccountUserUseCase struct {
// contains filtered or unexported fields
}
func NewAccountUserUseCase ¶
func NewAccountUserUseCase(repo AccountUserRepo, logger log.Logger) *AccountUserUseCase
func (*AccountUserUseCase) Create ¶
func (uc *AccountUserUseCase) Create(ctx context.Context, au *AccountUser) (int64, error)
func (*AccountUserUseCase) Delete ¶
func (uc *AccountUserUseCase) Delete(ctx context.Context, id int64) error
func (*AccountUserUseCase) Get ¶
func (uc *AccountUserUseCase) Get(ctx context.Context, id int64) (*AccountUser, error)
func (*AccountUserUseCase) List ¶
func (uc *AccountUserUseCase) List(ctx context.Context, req *AccountUserListReq) (*AccountUserListResp, error)
func (*AccountUserUseCase) Login ¶
func (uc *AccountUserUseCase) Login(ctx context.Context, account, password string) (*AccountUser, error)
func (*AccountUserUseCase) Register ¶
func (uc *AccountUserUseCase) Register(ctx context.Context, au *AccountUser) (*AccountUser, error)
func (*AccountUserUseCase) Update ¶
func (uc *AccountUserUseCase) Update(ctx context.Context, au *AccountUser) error
func (*AccountUserUseCase) UpdateAccountUser ¶
func (uc *AccountUserUseCase) UpdateAccountUser(ctx context.Context, id int64, au *AccountUser) (*AccountUser, error)
Click to show internal directories.
Click to hide internal directories.