endpoint

package
v0.0.0-...-4515e61 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2019 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint interface {
	WithBefore(mw MiddlewareFunc) Endpoint
	WithAfter(mw MiddlewareFunc) Endpoint
	HandlerFunc(*zap.Logger) http.HandlerFunc
}

Endpoint for a http service

func New

func New(e encode.Encoder, hndl HandlerFunc) Endpoint

New http endpoint for a http service

type HandlerFunc

type HandlerFunc func(ctx context.Context, r *http.Request) (interface{}, error)

HandlerFunc for internal transport

type MiddlewareFunc

type MiddlewareFunc func(ctx context.Context, r *http.Request) (context.Context, error)

MiddlewareFunc for internal middleware transport

Jump to

Keyboard shortcuts

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