Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstrumentingMiddleware ¶
func InstrumentingMiddleware(duration metrics.Histogram) endpoint.Middleware
InstrumentingMiddleware returns an endpoint middleware that records the duration of each invocation to the passed histogram. The middleware adds a single field: "success", which is "true" if no error is returned, and "false" otherwise.
func LoggingMiddleware ¶
func LoggingMiddleware(logger log.Logger) endpoint.Middleware
LoggingMiddleware returns an endpoint middleware that logs the duration of each invocation, and the resulting error, if any.
Types ¶
type CreateUserRequest ¶
type CreateUserRequest struct {
// contains filtered or unexported fields
}
CreateUserRequest collects the request parameters for the CreateUser method.
type CreateUserResponse ¶
type CreateUserResponse struct { ID string `json:"id"` Err error `json:"-"` // should be intercepted by Failed/errorEncoder }
CreateUserResponse collects the response values for the CreateUser method.
func (CreateUserResponse) Failed ¶
func (r CreateUserResponse) Failed() error
Failed implements endpoint.Failer.
type Set ¶
Set collects all of the endpoints that compose an add service. It's meant to be used as a helper struct, to collect all of the endpoints into a single parameter.