Documentation ¶
Index ¶
- Constants
- Variables
- func MakeBadRequest(err error) *goa.ServiceError
- func MakeClientClosedRequest(err error) *goa.ServiceError
- func MakeConflict(err error) *goa.ServiceError
- func MakeForbidden(err error) *goa.ServiceError
- func MakeGatewayTimeout(err error) *goa.ServiceError
- func MakeInternalServerError(err error) *goa.ServiceError
- func MakeNotFound(err error) *goa.ServiceError
- func MakeNotImplemented(err error) *goa.ServiceError
- func MakeServiceUnavailable(err error) *goa.ServiceError
- func MakeTooManyRequests(err error) *goa.ServiceError
- func MakeUnauthorized(err error) *goa.ServiceError
- func NewHealthCheckEndpoint(s Service, authBasicFn security.AuthBasicFunc) goa.Endpoint
- type Auther
- type Client
- type Endpoints
- type HealthCheckPayload
- type HealthCheckResponse
- type Service
Constants ¶
const ServiceName = "common"
ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.
Variables ¶
var MethodNames = [1]string{"health_check"}
MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.
Functions ¶
func MakeBadRequest ¶
func MakeBadRequest(err error) *goa.ServiceError
MakeBadRequest builds a goa.ServiceError from an error.
func MakeClientClosedRequest ¶
func MakeClientClosedRequest(err error) *goa.ServiceError
MakeClientClosedRequest builds a goa.ServiceError from an error.
func MakeConflict ¶
func MakeConflict(err error) *goa.ServiceError
MakeConflict builds a goa.ServiceError from an error.
func MakeForbidden ¶
func MakeForbidden(err error) *goa.ServiceError
MakeForbidden builds a goa.ServiceError from an error.
func MakeGatewayTimeout ¶
func MakeGatewayTimeout(err error) *goa.ServiceError
MakeGatewayTimeout builds a goa.ServiceError from an error.
func MakeInternalServerError ¶
func MakeInternalServerError(err error) *goa.ServiceError
MakeInternalServerError builds a goa.ServiceError from an error.
func MakeNotFound ¶
func MakeNotFound(err error) *goa.ServiceError
MakeNotFound builds a goa.ServiceError from an error.
func MakeNotImplemented ¶
func MakeNotImplemented(err error) *goa.ServiceError
MakeNotImplemented builds a goa.ServiceError from an error.
func MakeServiceUnavailable ¶
func MakeServiceUnavailable(err error) *goa.ServiceError
MakeServiceUnavailable builds a goa.ServiceError from an error.
func MakeTooManyRequests ¶
func MakeTooManyRequests(err error) *goa.ServiceError
MakeTooManyRequests builds a goa.ServiceError from an error.
func MakeUnauthorized ¶
func MakeUnauthorized(err error) *goa.ServiceError
MakeUnauthorized builds a goa.ServiceError from an error.
func NewHealthCheckEndpoint ¶
func NewHealthCheckEndpoint(s Service, authBasicFn security.AuthBasicFunc) goa.Endpoint
NewHealthCheckEndpoint returns an endpoint function that calls the method "health_check" of service "common".
Types ¶
type Auther ¶
type Auther interface { // BasicAuth implements the authorization logic for the Basic security scheme. BasicAuth(ctx context.Context, user, pass string, schema *security.BasicScheme) (context.Context, error) }
Auther defines the authorization functions to be implemented by the service.
type Client ¶
Client is the "common" service client.
func (*Client) HealthCheck ¶
func (c *Client) HealthCheck(ctx context.Context, p *HealthCheckPayload) (res *HealthCheckResponse, err error)
HealthCheck calls the "health_check" endpoint of the "common" service.
type Endpoints ¶
Endpoints wraps the "common" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "common" service with endpoints.
type HealthCheckPayload ¶
HealthCheckPayload is the payload type of the common service health_check method.
type HealthCheckResponse ¶
type HealthCheckResponse struct {
Status string
}
HealthCheckResponse is the result type of the common service health_check method.
type Service ¶
type Service interface { // HealthCheck implements health_check. HealthCheck(context.Context, *HealthCheckPayload) (res *HealthCheckResponse, err error) }
Service is the common service interface.