service

package
v0.0.0-...-1cdef46 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2019 License: MIT Imports: 4 Imported by: 0

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.

Jump to

Keyboard shortcuts

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