Documentation ¶
Index ¶
- Variables
- type Address
- type AddressRepo
- type AddressUseCase
- type Card
- type CardRepo
- type CardUseCase
- type User
- type UserRepo
- type UserUseCase
- func (uc *UserUseCase) Create(ctx context.Context, u *User) (*User, error)
- func (uc *UserUseCase) Get(ctx context.Context, id int64) (*User, error)
- func (uc *UserUseCase) GetByUserName(ctx context.Context, in *v1.GetUserByUserNameRequest) (*v1.GetUserByUserNameReply, error)
- func (uc *UserUseCase) Save(ctx context.Context, in *v1.SaveUserRequest) (*v1.SaveUserReply, error)
- func (uc *UserUseCase) VerifyPassword(ctx context.Context, u *User) (bool, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUserNotFound = errors.New("server not found")
)
View Source
var ProviderSet = wire.NewSet(NewUserUseCase, NewAddressUseCase, NewCardUseCase)
ProviderSet is biz providers.
Functions ¶
This section is empty.
Types ¶
type AddressRepo ¶
type AddressRepo interface { CreateAddress(ctx context.Context, a *Address) (*Address, error) GetAddress(ctx context.Context, id int64) (*Address, error) ListAddress(ctx context.Context, uid int64) ([]*Address, error) }
AddressRepo 接口定义
type AddressUseCase ¶
type AddressUseCase struct {
// contains filtered or unexported fields
}
func NewAddressUseCase ¶
func NewAddressUseCase(repo AddressRepo, logger log.Logger) *AddressUseCase
type CardRepo ¶
type CardRepo interface { CreateCard(ctx context.Context, c *Card) (*Card, error) GetCard(ctx context.Context, id int64) (*Card, error) ListCard(ctx context.Context, uid int64) ([]*Card, error) }
CardRepo 接口定义
type CardUseCase ¶
type CardUseCase struct {
// contains filtered or unexported fields
}
func NewCardUseCase ¶
func NewCardUseCase(repo CardRepo, logger log.Logger) *CardUseCase
type UserUseCase ¶
type UserUseCase struct {
// contains filtered or unexported fields
}
func NewUserUseCase ¶
func NewUserUseCase(repo UserRepo, logger log.Logger) *UserUseCase
func (*UserUseCase) GetByUserName ¶
func (uc *UserUseCase) GetByUserName(ctx context.Context, in *v1.GetUserByUserNameRequest) (*v1.GetUserByUserNameReply, error)
func (*UserUseCase) Save ¶
func (uc *UserUseCase) Save(ctx context.Context, in *v1.SaveUserRequest) (*v1.SaveUserReply, error)
func (*UserUseCase) VerifyPassword ¶
Click to show internal directories.
Click to hide internal directories.