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 MakeCreateGuestEndpoint(s service.GuestsService) endpoint.Endpoint
- func MakeCreateSponsorEndpoint(s service.GuestsService) endpoint.Endpoint
- func MakeDeleteGuestEndpoint(s service.GuestsService) endpoint.Endpoint
- func MakeDeleteSponsorEndpoint(s service.GuestsService) endpoint.Endpoint
- func MakeReadGuestEndpoint(s service.GuestsService) endpoint.Endpoint
- func MakeReadSponsorEndpoint(s service.GuestsService) endpoint.Endpoint
- func MakeUpdateGuestEndpoint(s service.GuestsService) endpoint.Endpoint
- func MakeUpdateSponsorEndpoint(s service.GuestsService) endpoint.Endpoint
- type CreateGuestRequest
- type CreateGuestResponse
- type CreateSponsorRequest
- type CreateSponsorResponse
- type DeleteGuestRequest
- type DeleteGuestResponse
- type DeleteSponsorRequest
- type DeleteSponsorResponse
- type Endpoints
- func (e Endpoints) CreateGuest(ctx context.Context, event string, guest model.Guest) (rs string, err error)
- func (e Endpoints) CreateSponsor(ctx context.Context, event string, sponsor model.Participant) (rs string, err error)
- func (e Endpoints) DeleteGuest(ctx context.Context, query model.Query) (rs string, err error)
- func (e Endpoints) DeleteSponsor(ctx context.Context, query model.Query) (rs string, err error)
- func (e Endpoints) ReadGuest(ctx context.Context, query model.Query) (rs []model.Guest, err error)
- func (e Endpoints) ReadSponsor(ctx context.Context, query model.Query) (rs []model.Participant, err error)
- func (e Endpoints) UpdateGuest(ctx context.Context, query model.Query) (rs string, err error)
- func (e Endpoints) UpdateSponsor(ctx context.Context, query model.Query) (rs string, err error)
- type Failure
- type ReadGuestRequest
- type ReadGuestResponse
- type ReadSponsorRequest
- type ReadSponsorResponse
- type UpdateGuestRequest
- type UpdateGuestResponse
- type UpdateSponsorRequest
- type UpdateSponsorResponse
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 MakeCreateGuestEndpoint ¶
func MakeCreateGuestEndpoint(s service.GuestsService) endpoint.Endpoint
MakeCreateGuestEndpoint returns an endpoint that invokes CreateGuest on the service.
func MakeCreateSponsorEndpoint ¶
func MakeCreateSponsorEndpoint(s service.GuestsService) endpoint.Endpoint
MakeCreateSponsorEndpoint returns an endpoint that invokes CreateSponsor on the service.
func MakeDeleteGuestEndpoint ¶
func MakeDeleteGuestEndpoint(s service.GuestsService) endpoint.Endpoint
MakeDeleteGuestEndpoint returns an endpoint that invokes DeleteGuest on the service.
func MakeDeleteSponsorEndpoint ¶
func MakeDeleteSponsorEndpoint(s service.GuestsService) endpoint.Endpoint
MakeDeleteSponsorEndpoint returns an endpoint that invokes DeleteSponsor on the service.
func MakeReadGuestEndpoint ¶
func MakeReadGuestEndpoint(s service.GuestsService) endpoint.Endpoint
MakeReadGuestEndpoint returns an endpoint that invokes ReadGuest on the service.
func MakeReadSponsorEndpoint ¶
func MakeReadSponsorEndpoint(s service.GuestsService) endpoint.Endpoint
MakeReadSponsorEndpoint returns an endpoint that invokes ReadSponsor on the service.
func MakeUpdateGuestEndpoint ¶
func MakeUpdateGuestEndpoint(s service.GuestsService) endpoint.Endpoint
MakeUpdateGuestEndpoint returns an endpoint that invokes UpdateGuest on the service.
func MakeUpdateSponsorEndpoint ¶
func MakeUpdateSponsorEndpoint(s service.GuestsService) endpoint.Endpoint
MakeUpdateSponsorEndpoint returns an endpoint that invokes UpdateSponsor on the service.
Types ¶
type CreateGuestRequest ¶
CreateGuestRequest collects the request parameters for the CreateGuest method.
type CreateGuestResponse ¶
CreateGuestResponse collects the response parameters for the CreateGuest method.
func (CreateGuestResponse) Failed ¶
func (r CreateGuestResponse) Failed() error
Failed implements Failer.
type CreateSponsorRequest ¶
type CreateSponsorRequest struct { Event string `json:"event"` Sponsor model.Participant `json:"sponsor"` }
CreateSponsorRequest collects the request parameters for the CreateSponsor method.
type CreateSponsorResponse ¶
CreateSponsorResponse collects the response parameters for the CreateSponsor method.
func (CreateSponsorResponse) Failed ¶
func (r CreateSponsorResponse) Failed() error
Failed implements Failer.
type DeleteGuestRequest ¶
DeleteGuestRequest collects the request parameters for the DeleteGuest method.
type DeleteGuestResponse ¶
DeleteGuestResponse collects the response parameters for the DeleteGuest method.
func (DeleteGuestResponse) Failed ¶
func (r DeleteGuestResponse) Failed() error
Failed implements Failer.
type DeleteSponsorRequest ¶
DeleteSponsorRequest collects the request parameters for the DeleteSponsor method.
type DeleteSponsorResponse ¶
DeleteSponsorResponse collects the response parameters for the DeleteSponsor method.
func (DeleteSponsorResponse) Failed ¶
func (r DeleteSponsorResponse) Failed() error
Failed implements Failer.
type Endpoints ¶
type Endpoints struct { CreateGuestEndpoint endpoint.Endpoint ReadGuestEndpoint endpoint.Endpoint UpdateGuestEndpoint endpoint.Endpoint DeleteGuestEndpoint endpoint.Endpoint CreateSponsorEndpoint endpoint.Endpoint ReadSponsorEndpoint endpoint.Endpoint UpdateSponsorEndpoint endpoint.Endpoint DeleteSponsorEndpoint 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.GuestsService, 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) CreateGuest ¶
func (e Endpoints) CreateGuest(ctx context.Context, event string, guest model.Guest) (rs string, err error)
CreateGuest implements Service. Primarily useful in a client.
func (Endpoints) CreateSponsor ¶
func (e Endpoints) CreateSponsor(ctx context.Context, event string, sponsor model.Participant) (rs string, err error)
CreateSponsor implements Service. Primarily useful in a client.
func (Endpoints) DeleteGuest ¶
DeleteGuest implements Service. Primarily useful in a client.
func (Endpoints) DeleteSponsor ¶
DeleteSponsor implements Service. Primarily useful in a client.
func (Endpoints) ReadSponsor ¶
func (e Endpoints) ReadSponsor(ctx context.Context, query model.Query) (rs []model.Participant, err error)
ReadSponsor implements Service. Primarily useful in a client.
func (Endpoints) UpdateGuest ¶
UpdateGuest 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 ReadGuestRequest ¶
ReadGuestRequest collects the request parameters for the ReadGuest method.
type ReadGuestResponse ¶
ReadGuestResponse collects the response parameters for the ReadGuest method.
func (ReadGuestResponse) Failed ¶
func (r ReadGuestResponse) Failed() error
Failed implements Failer.
type ReadSponsorRequest ¶
ReadSponsorRequest collects the request parameters for the ReadSponsor method.
type ReadSponsorResponse ¶
type ReadSponsorResponse struct { Rs []model.Participant `json:"rs"` Err error `json:"err"` }
ReadSponsorResponse collects the response parameters for the ReadSponsor method.
func (ReadSponsorResponse) Failed ¶
func (r ReadSponsorResponse) Failed() error
Failed implements Failer.
type UpdateGuestRequest ¶
UpdateGuestRequest collects the request parameters for the UpdateGuest method.
type UpdateGuestResponse ¶
UpdateGuestResponse collects the response parameters for the UpdateGuest method.
func (UpdateGuestResponse) Failed ¶
func (r UpdateGuestResponse) Failed() error
Failed implements Failer.
type UpdateSponsorRequest ¶
UpdateSponsorRequest collects the request parameters for the UpdateSponsor method.
type UpdateSponsorResponse ¶
UpdateSponsorResponse collects the response parameters for the UpdateSponsor method.
func (UpdateSponsorResponse) Failed ¶
func (r UpdateSponsorResponse) Failed() error
Failed implements Failer.