Documentation
¶
Index ¶
- Variables
- type Customer
- type CustomerRepo
- type CustomerUsecase
- func (uc *CustomerUsecase) Create(ctx context.Context, member *Customer) (*Customer, error)
- func (uc *CustomerUsecase) Delete(ctx context.Context, ids []int64) error
- func (uc *CustomerUsecase) Get(ctx context.Context, id int64) (p *Customer, err error)
- func (uc *CustomerUsecase) List(ctx context.Context, req *pb.CustomerListOption) (ps []*Customer, err error)
- func (uc *CustomerUsecase) Login(ctx context.Context, account, password string) (token string, expireTime int64, m *Customer, err error)
- func (uc *CustomerUsecase) Update(ctx context.Context, id int64, member *Customer) (*Customer, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewCustomerUsecase)
ProviderSet is biz providers.
Functions ¶
This section is empty.
Types ¶
type Customer ¶
type Customer struct { Sex string `json:"sex,omitempty"` Name string `json:"name,omitempty"` Avatar string `json:"avatar,omitempty"` Account string `json:"account,omitempty"` NickName string `json:"nick_name,omitempty"` Email string `json:"email,omitempty"` Mobile string `json:"mobile,omitempty"` IDCard string `json:"id_card,omitempty"` ID int64 `json:"id,omitempty"` Password string `json:"-"` Salt string `json:"-"` LastIP string `json:"last_ip,omitempty"` Birthday time.Time `json:"birthday,omitempty"` LastTime time.Time `json:"last_time,omitempty"` CreateTime time.Time `json:"create_time,omitempty"` UpdateTime time.Time `json:"update_time,omitempty"` UUID uuid.UUID `json:"uuid,omitempty"` }
type CustomerRepo ¶
type CustomerRepo interface { ListCustomer(ctx context.Context, op *pb.CustomerListOption) ([]*Customer, error) GetCustomer(ctx context.Context, id int64) (*Customer, error) CreateCustomer(ctx context.Context, article *Customer) (*Customer, error) UpdateCustomer(ctx context.Context, id int64, article *Customer) (*Customer, error) DeleteCustomer(ctx context.Context, id []int64) error GetCustomerForAccounts(ctx context.Context, account string) ([]*Customer, error) // 创建jwttoken CreateToken(member *Customer, time int64) (string, error) }
type CustomerUsecase ¶
type CustomerUsecase struct {
// contains filtered or unexported fields
}
func NewCustomerUsecase ¶
func NewCustomerUsecase(repo CustomerRepo, logger log.Logger) *CustomerUsecase
func (*CustomerUsecase) Delete ¶
func (uc *CustomerUsecase) Delete(ctx context.Context, ids []int64) error
删除用户
func (*CustomerUsecase) List ¶
func (uc *CustomerUsecase) List(ctx context.Context, req *pb.CustomerListOption) (ps []*Customer, err error)
Click to show internal directories.
Click to hide internal directories.