Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware func(UsersService) UsersService
Middleware describes a service middleware.
func LoggingMiddleware ¶
func LoggingMiddleware(logger log.Logger) Middleware
LoggingMiddleware takes a logger as a dependency and returns a UsersService Middleware.
type UsersService ¶
type UsersService interface { // Add your methods here Get(ctx context.Context, id string) (username, email, phone string, err error) Login(ctx context.Context, username, password string) (string, error) Register(ctx context.Context, username, password, email, phone string) (string, error) }
UsersService describes the service.
func New ¶
func New(middleware []Middleware) UsersService
New returns a UsersService with all of the expected middleware wired in.
func NewBasicUsersService ¶
func NewBasicUsersService() UsersService
NewBasicUsersService returns a naive, stateless implementation of UsersService.
Click to show internal directories.
Click to hide internal directories.