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 MakeProjectAbsentEndpoint(s service.SimpleProjectionService) endpoint.Endpoint
- func MakeProjectAllEndpoint(s service.SimpleProjectionService) endpoint.Endpoint
- func MakeProjectPresentEndpoint(s service.SimpleProjectionService) endpoint.Endpoint
- type Endpoints
- func (e Endpoints) ProjectAbsent(ctx context.Context, event string, day int, query model.Query) (rs []model.Participant, err error)
- func (e Endpoints) ProjectAll(ctx context.Context, event string, query model.Query) (rs []model.Participant, err error)
- func (e Endpoints) ProjectPresent(ctx context.Context, event string, day int, query model.Query) (rs []model.Participant, err error)
- type Failure
- type ProjectAbsentRequest
- type ProjectAbsentResponse
- type ProjectAllRequest
- type ProjectAllResponse
- type ProjectPresentRequest
- type ProjectPresentResponse
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 MakeProjectAbsentEndpoint ¶
func MakeProjectAbsentEndpoint(s service.SimpleProjectionService) endpoint.Endpoint
MakeProjectAbsentEndpoint returns an endpoint that invokes ProjectAbsent on the service.
func MakeProjectAllEndpoint ¶
func MakeProjectAllEndpoint(s service.SimpleProjectionService) endpoint.Endpoint
MakeProjectAllEndpoint returns an endpoint that invokes ProjectAll on the service.
func MakeProjectPresentEndpoint ¶
func MakeProjectPresentEndpoint(s service.SimpleProjectionService) endpoint.Endpoint
MakeProjectPresentEndpoint returns an endpoint that invokes ProjectPresent on the service.
Types ¶
type Endpoints ¶
type Endpoints struct { ProjectAllEndpoint endpoint.Endpoint ProjectPresentEndpoint endpoint.Endpoint ProjectAbsentEndpoint 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.SimpleProjectionService, 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) ProjectAbsent ¶
func (e Endpoints) ProjectAbsent(ctx context.Context, event string, day int, query model.Query) (rs []model.Participant, err error)
ProjectAbsent 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 ProjectAbsentRequest ¶
type ProjectAbsentRequest struct { Event string `json:"event"` Day int `json:"day"` Query model.Query `json:"query"` }
ProjectAbsentRequest collects the request parameters for the ProjectAbsent method.
type ProjectAbsentResponse ¶
type ProjectAbsentResponse struct { Rs []model.Participant `json:"rs"` Err error `json:"err"` }
ProjectAbsentResponse collects the response parameters for the ProjectAbsent method.
func (ProjectAbsentResponse) Failed ¶
func (r ProjectAbsentResponse) Failed() error
Failed implements Failer.
type ProjectAllRequest ¶
ProjectAllRequest collects the request parameters for the ProjectAll method.
type ProjectAllResponse ¶
type ProjectAllResponse struct { Rs []model.Participant `json:"rs"` Err error `json:"err"` }
ProjectAllResponse collects the response parameters for the ProjectAll method.
func (ProjectAllResponse) Failed ¶
func (r ProjectAllResponse) Failed() error
Failed implements Failer.
type ProjectPresentRequest ¶
type ProjectPresentRequest struct { Event string `json:"event"` Day int `json:"day"` Query model.Query `json:"query"` }
ProjectPresentRequest collects the request parameters for the ProjectPresent method.
type ProjectPresentResponse ¶
type ProjectPresentResponse struct { Rs []model.Participant `json:"rs"` Err error `json:"err"` }
ProjectPresentResponse collects the response parameters for the ProjectPresent method.
func (ProjectPresentResponse) Failed ¶
func (r ProjectPresentResponse) Failed() error
Failed implements Failer.