Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware func(PostsService) PostsService
Middleware describes a service middleware.
func LoggingMiddleware ¶
func LoggingMiddleware(logger log.Logger) Middleware
LoggingMiddleware takes a logger as a dependency and returns a PostsService Middleware.
type PostsService ¶
type PostsService interface { // Add your methods here Store(ctx context.Context, post model.Post) (response string, err error) Update(ctx context.Context, post model.Post) (response string, err error) List(ctx context.Context, post model.Post) (response []*pb.Post, err error) Delete(ctx context.Context, post model.Post) (response string, err error) }
PostsService describes the service.
func New ¶
func New(middleware []Middleware) PostsService
New returns a PostsService with all of the expected middleware wired in.
func NewBasicPostsService ¶
func NewBasicPostsService() PostsService
NewBasicPostsService returns a naive, stateless implementation of PostsService.
Click to show internal directories.
Click to hide internal directories.