Documentation
¶
Overview ¶
Package user provides means to manage the users.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { Get(ctx context.Context, id string) (u User, err error) Put(ctx context.Context, user User) (id string, err error) }
Repository provides a limited interface to a user storage layer.
type Service ¶
type Service interface { Get(ctx context.Context, id string) (u User, err error) AddUser(ctx context.Context, name string) (id string, err error) }
Service is the interface that provides the basic User methods.
func NewService ¶
func NewService(repo Repository) Service
NewService returns a new instance of the default user Service.
Click to show internal directories.
Click to hide internal directories.