service

package
v0.0.0-...-b73353b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2018 License: MIT Imports: 5 Imported by: 0

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
	// e.x: Foo(ctx context.Context,s string)(rs string, err error)
	Create(ctx context.Context, email string) (err 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL