Documentation ¶
Overview ¶
THIS FILE IS AUTO GENERATED BY GK-CLI DO NOT EDIT!!
Index ¶
- func InstrumentingMiddleware(duration metrics.Histogram) endpoint.Middleware
- func LoggingMiddleware(logger log.Logger) endpoint.Middleware
- func MakeCreateEventEndpoint(s service.EventsService) endpoint.Endpoint
- func MakeDeleteEventEndpoint(s service.EventsService) endpoint.Endpoint
- func MakeReadEventEndpoint(s service.EventsService) endpoint.Endpoint
- func MakeUpdateEventEndpoint(s service.EventsService) endpoint.Endpoint
- type CreateEventRequest
- type CreateEventResponse
- type DeleteEventRequest
- type DeleteEventResponse
- type Endpoints
- func (e Endpoints) CreateEvent(ctx context.Context, event model.Event) (rs string, err error)
- func (e Endpoints) DeleteEvent(ctx context.Context, query model.Query) (rs string, err error)
- func (e Endpoints) ReadEvent(ctx context.Context, query model.Query) (rs []model.Event, err error)
- func (e Endpoints) UpdateEvent(ctx context.Context, query model.Query) (rs string, err error)
- type Failure
- type ReadEventRequest
- type ReadEventResponse
- type UpdateEventRequest
- type UpdateEventResponse
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.
func MakeCreateEventEndpoint ¶
func MakeCreateEventEndpoint(s service.EventsService) endpoint.Endpoint
MakeCreateEventEndpoint returns an endpoint that invokes CreateEvent on the service.
func MakeDeleteEventEndpoint ¶
func MakeDeleteEventEndpoint(s service.EventsService) endpoint.Endpoint
MakeDeleteEventEndpoint returns an endpoint that invokes DeleteEvent on the service.
func MakeReadEventEndpoint ¶
func MakeReadEventEndpoint(s service.EventsService) endpoint.Endpoint
MakeReadEventEndpoint returns an endpoint that invokes ReadEvent on the service.
func MakeUpdateEventEndpoint ¶
func MakeUpdateEventEndpoint(s service.EventsService) endpoint.Endpoint
MakeUpdateEventEndpoint returns an endpoint that invokes UpdateEvent on the service.
Types ¶
type CreateEventRequest ¶
CreateEventRequest collects the request parameters for the CreateEvent method.
type CreateEventResponse ¶
CreateEventResponse collects the response parameters for the CreateEvent method.
func (CreateEventResponse) Failed ¶
func (r CreateEventResponse) Failed() error
Failed implements Failer.
type DeleteEventRequest ¶
DeleteEventRequest collects the request parameters for the DeleteEvent method.
type DeleteEventResponse ¶
DeleteEventResponse collects the response parameters for the DeleteEvent method.
func (DeleteEventResponse) Failed ¶
func (r DeleteEventResponse) Failed() error
Failed implements Failer.
type Endpoints ¶
type Endpoints struct { CreateEventEndpoint endpoint.Endpoint ReadEventEndpoint endpoint.Endpoint UpdateEventEndpoint endpoint.Endpoint DeleteEventEndpoint endpoint.Endpoint }
Endpoints collects all of the endpoints that compose a profile service. It's meant to be used as a helper struct, to collect all of the endpoints into a single parameter.
func New ¶
func New(s service.EventsService, mdw map[string][]endpoint.Middleware) Endpoints
New returns a Endpoints struct that wraps the provided service, and wires in all of the expected endpoint middlewares
func (Endpoints) CreateEvent ¶
CreateEvent implements Service. Primarily useful in a client.
func (Endpoints) DeleteEvent ¶
DeleteEvent implements Service. Primarily useful in a client.
type Failure ¶
type Failure interface {
Failed() error
}
Failer is an interface that should be implemented by response types. Response encoders can check if responses are Failer, and if so they've failed, and if so encode them using a separate write path based on the error.
type ReadEventRequest ¶
ReadEventRequest collects the request parameters for the ReadEvent method.
type ReadEventResponse ¶
ReadEventResponse collects the response parameters for the ReadEvent method.
func (ReadEventResponse) Failed ¶
func (r ReadEventResponse) Failed() error
Failed implements Failer.
type UpdateEventRequest ¶
UpdateEventRequest collects the request parameters for the UpdateEvent method.
type UpdateEventResponse ¶
UpdateEventResponse collects the response parameters for the UpdateEvent method.
func (UpdateEventResponse) Failed ¶
func (r UpdateEventResponse) Failed() error
Failed implements Failer.