stringtest

package
v0.0.0-...-d9d70dd Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInconsistentIDs = errors.New("inconsistent IDs")
	ErrAlreadyExists   = errors.New("already exists")
	ErrNotFound        = errors.New("not found")
)
View Source
var (
	// ErrBadRouting is returned when an expected path variable is missing.
	// It always indicates programmer error.
	ErrBadRouting = errors.New("inconsistent mapping between route and handler (programmer error)")
)
View Source
var ErrEmpty = errors.New("Empty string")

Functions

func MakeHTTPHandler

func MakeHTTPHandler(s Service, logger log.Logger) http.Handler

func MakeTestEndpoint

func MakeTestEndpoint(svc Service) endpoint.Endpoint

func MakeUppercaseEndpoint

func MakeUppercaseEndpoint(svc Service) endpoint.Endpoint

Types

type Endpoints

type Endpoints struct {
	TestEndpoint      endpoint.Endpoint
	UppercaseEndpoint endpoint.Endpoint
}

func MakeEndpoints

func MakeEndpoints(s Service) Endpoints

type Middleware

type Middleware func(Service) Service

func LoggingMiddleware

func LoggingMiddleware(logger log.Logger) Middleware

type Service

type Service interface {
	Uppercase(context.Context, string) (string, error)
	Test(context.Context, string) (string, error)
}

func NewStringService

func NewStringService() Service

Jump to

Keyboard shortcuts

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