Documentation ¶
Index ¶
- type UserRepository
- type UserService
- func (s *UserService) Create(ctx context.Context, u *model.User) (*model.User, error)
- func (s *UserService) Delete(ctx context.Context, id string) error
- func (s *UserService) GetAll(ctx context.Context, name string) ([]model.User, error)
- func (s *UserService) GetByID(ctx context.Context, id string) (*model.User, error)
- func (s *UserService) Update(ctx context.Context, id string, u *model.User) (*model.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserRepository ¶
type UserRepository interface { GetAll(ctx context.Context, name string) ([]model.User, error) GetByID(ctx context.Context, id uuid.UUID) (*model.User, error) Create(ctx context.Context, u *model.User) (*model.User, error) Update(ctx context.Context, u *model.User) (*model.User, error) Delete(ctx context.Context, id string) error }
UserRepository representes the user repository implementation
type UserService ¶
type UserService struct {
UserRepository UserRepository
}
UserService is a struct to inject a implementation of UserRepository
func (*UserService) Delete ¶
func (s *UserService) Delete(ctx context.Context, id string) error
Delete call repository Delete and returns
Click to show internal directories.
Click to hide internal directories.