Documentation ¶
Index ¶
- Variables
- type Card
- type CardRepo
- type CardUsecase
- type User
- type UserRepo
- type UserUsecase
- func (uc *UserUsecase) AddCard(ctx context.Context, userId uuid.UUID, card *Card) *Card
- func (uc *UserUsecase) CreateUser(ctx context.Context, password string, user *User) (*User, error)
- func (uc *UserUsecase) GetUser(ctx context.Context, id uuid.UUID) (*User, error)
- func (uc *UserUsecase) ListCardsByOwner(ctx context.Context, userId uuid.UUID) []*Card
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewUserUsecase, NewCardUsecase)
ProviderSet is biz providers.
Functions ¶
This section is empty.
Types ¶
type CardRepo ¶
type CardRepo interface { Create(context.Context, uuid.UUID, *Card) *Card FindByID(context.Context, uuid.UUID) *Card ListByOwner(context.Context, uuid.UUID) []*Card Delete(context.Context, uuid.UUID) }
CardRepo is a Greater repo.
type CardUsecase ¶
type CardUsecase struct {
// contains filtered or unexported fields
}
func NewCardUsecase ¶
func NewCardUsecase(repo CardRepo, logger log.Logger) *CardUsecase
NewCardUsecase new a Card usecase.
type UserRepo ¶
type UserRepo interface { Create(context.Context, *User) (*User, error) FindByID(context.Context, uuid.UUID) (*User, error) Update(context.Context, *User) (*User, error) AddCards(context.Context, uuid.UUID, []*Card) }
UserRepo is a Greater repo.
type UserUsecase ¶
type UserUsecase struct {
// contains filtered or unexported fields
}
func NewUserUsecase ¶
func NewUserUsecase(u UserRepo, c CardRepo, logger log.Logger) *UserUsecase
NewUserUsecase new a User usecase.
func (*UserUsecase) CreateUser ¶
CreateUser creates a Greeter, and returns the new Greeter.
func (*UserUsecase) ListCardsByOwner ¶
ListCardsByOwner a list of cards for a user
Click to show internal directories.
Click to hide internal directories.