Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddsvcService ¶
type AddsvcService interface { Sum(ctx context.Context, a int64, b int64) (rs int64, err error) Concat(ctx context.Context, a string, b string) (rs string, err error) }
Service describes a service that adds things together Implement yor service methods methods. e.x: Foo(ctx context.Context, s string)(rs string, err error)
func New ¶
func New(logger log.Logger) (s AddsvcService)
New return a new instance of the service. If you want to add service middleware this is the place to put them.
type Middleware ¶
type Middleware func(AddsvcService) AddsvcService
Middleware describes a service (as opposed to endpoint) middleware.
func LoggingMiddleware ¶
func LoggingMiddleware(logger log.Logger) Middleware
LoggingMiddleware takes a logger as a dependency and returns a ServiceMiddleware.
Click to show internal directories.
Click to hide internal directories.