Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Endpoint ¶
type Endpoint func(ctx context.Context, request interface{}) (response EndpointResponse, err error)
Endpoint is the fundamental building block of servers and clients. It represents a single RPC method.
type EndpointResponse ¶ added in v1.6.0
type EndpointResponse interface {
Code() int
Data() interface{}
}
EndpointResponse the request result.
func Nop ¶
func Nop(context.Context, interface{}) (EndpointResponse, error)
Nop is an endpoint that does nothing and returns a nil error. Useful for tests.
func Response ¶ added in v1.6.0
func Response(code int, data interface{}) EndpointResponse
Response transfer object
type EntityPaging ¶ added in v1.9.0
type EntityPaging struct {
Data interface{} `json:"data"`
Paging Paging `json:"paging"`
}
type Middleware ¶
Middleware is a chainable behavior modifier for endpoints.
Click to show internal directories.
Click to hide internal directories.