endpoint

package
v1.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Nop

func Nop(context.Context, interface{}) (interface{}, error)

Nop is an endpoint that does nothing and returns a nil error. Useful for tests.

Types

type Endpoint

type Endpoint func(ctx context.Context, request interface{}) (response interface{}, err error)

Endpoint is the fundamental building block of servers and clients. It represents a single RPC method.

type Middleware

type Middleware func(Endpoint) Endpoint

Middleware is a chainable behavior modifier for endpoints.

func Database added in v1.5.0

func Database(dbfactory db.ConnectionFactory, key string) Middleware

func DatabaseWithTx added in v1.5.0

func DatabaseWithTx(dbfactory db.ConnectionFactory, key string) Middleware

Jump to

Keyboard shortcuts

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