Documentation
¶
Overview ¶
THIS FILE IS AUTO GENERATED BY GK-CLI DO NOT EDIT!!
Index ¶
- func ErrorDecoder(r *http.Response) error
- func ErrorEncoder(_ context.Context, err error, w http.ResponseWriter)
- func MakeAddEndpoint(s registry.Service) endpoint.Endpoint
- func MakeAuthEndpoint(s registry.Service) endpoint.Endpoint
- func MakeDeleteEndpoint(s registry.Service) endpoint.Endpoint
- func MakeGetEndpoint(s registry.Service) endpoint.Endpoint
- func MakeHandlers(service registry.Service) http.Handler
- func MakeListEndpoint(s registry.Service) endpoint.Endpoint
- func MakeRevokeEndpoint(s registry.Service) endpoint.Endpoint
- func MakeUpdateEndpoint(s registry.Service) endpoint.Endpoint
- type AddRequest
- type AddResponse
- type AuthRequest
- type AuthResponse
- type DeleteRequest
- type DeleteResponse
- type Endpoints
- func (e Endpoints) Add(ctx context.Context, node registry.Node) (r0 registry.Node, e1 error)
- func (e Endpoints) Auth(ctx context.Context, addr string, token string) (b0 bool, e1 error)
- func (e Endpoints) Delete(ctx context.Context, addr string) (e0 error)
- func (e Endpoints) Get(ctx context.Context, addr string) (r0 registry.Node, e1 error)
- func (e Endpoints) List(ctx context.Context) (r0 []registry.Node, e1 error)
- func (e Endpoints) Revoke(ctx context.Context, addr string, token string) (b0 bool, e1 error)
- func (e Endpoints) Update(ctx context.Context, addr string, node registry.Node) (r0 registry.Node, e1 error)
- type Failure
- type GetRequest
- type GetResponse
- type ListRequest
- type ListResponse
- type RevokeRequest
- type RevokeResponse
- type UpdateRequest
- type UpdateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorDecoder ¶
func ErrorEncoder ¶
func ErrorEncoder(_ context.Context, err error, w http.ResponseWriter)
func MakeAddEndpoint ¶
MakeAddEndpoint returns an endpoint that invokes Add on the service.
func MakeAuthEndpoint ¶
MakeAuthEndpoint returns an endpoint that invokes Auth on the service.
func MakeDeleteEndpoint ¶
MakeDeleteEndpoint returns an endpoint that invokes Delete on the service.
func MakeGetEndpoint ¶
MakeGetEndpoint returns an endpoint that invokes Get on the service.
func MakeListEndpoint ¶
MakeListEndpoint returns an endpoint that invokes List on the service.
func MakeRevokeEndpoint ¶
MakeRevokeEndpoint returns an endpoint that invokes Revoke on the service.
Types ¶
type AddRequest ¶
AddRequest collects the request parameters for the Add method.
type AddResponse ¶
AddResponse collects the response parameters for the Add method.
type AuthRequest ¶
AuthRequest collects the request parameters for the Auth method.
type AuthResponse ¶
AuthResponse collects the response parameters for the Auth method.
type DeleteRequest ¶
type DeleteRequest struct {
Addr string `json:"addr"`
}
DeleteRequest collects the request parameters for the Delete method.
type DeleteResponse ¶
type DeleteResponse struct {
Err error `json:"err"`
}
DeleteResponse collects the response parameters for the Delete method.
type Endpoints ¶
type Endpoints struct { AuthEndpoint endpoint.Endpoint AddEndpoint endpoint.Endpoint DeleteEndpoint endpoint.Endpoint GetEndpoint endpoint.Endpoint UpdateEndpoint endpoint.Endpoint ListEndpoint endpoint.Endpoint RevokeEndpoint 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 ¶
New returns a Endpoints struct that wraps the provided service, and wires in all of the expected endpoint middlewares
type Failure ¶
type Failure interface {
Failed() error
}
Failure 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 GetRequest ¶
type GetRequest struct {
Addr string `json:"addr"`
}
GetRequest collects the request parameters for the Get method.
type GetResponse ¶
GetResponse collects the response parameters for the Get method.
type ListRequest ¶
type ListRequest struct{}
ListRequest collects the request parameters for the List method.
type ListResponse ¶
ListResponse collects the response parameters for the List method.
type RevokeRequest ¶
RevokeRequest collects the request parameters for the Revoke method.
type RevokeResponse ¶
RevokeResponse collects the response parameters for the Revoke method.
type UpdateRequest ¶
UpdateRequest collects the request parameters for the Update method.
type UpdateResponse ¶
UpdateResponse collects the response parameters for the Update method.