Documentation ¶
Index ¶
- Variables
- type RepositoryInterface
- type Service
- func (s Service) CreateUser(_ context.Context, user *User) (*User, error)
- func (s Service) DeleteUser(_ context.Context, id string) error
- func (s Service) GetUser(_ context.Context, id string) (*User, error)
- func (s Service) ListUsers(_ context.Context) ([]User, error)
- func (s Service) UpdateUser(_ context.Context, user *User) (*User, error)
- type ServiceInterface
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrRepo = errors.New("unable to handle repository request")
)
Functions ¶
This section is empty.
Types ¶
type RepositoryInterface ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(repository RepositoryInterface, logger log.Logger) *Service
func (Service) CreateUser ¶
type ServiceInterface ¶
type ServiceInterface interface { CreateUser(ctx context.Context, user *User) (*User, error) GetUser(ctx context.Context, id string) (*User, error) UpdateUser(ctx context.Context, user *User) (*User, error) DeleteUser(ctx context.Context, id string) error ListUsers(ctx context.Context) ([]User, error) }
Click to show internal directories.
Click to hide internal directories.