Documentation ¶
Index ¶
- Constants
- Variables
- func MakeBadRequest(err error) *goa.ServiceError
- func MakeForbidden(err error) *goa.ServiceError
- func MakeNotFound(err error) *goa.ServiceError
- func MakeUnauthorized(err error) *goa.ServiceError
- func NewDataEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewMetaEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewResolvedEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- type Auther
- type Client
- type DataPayload
- type DataResult
- type Endpoints
- type MetaPayload
- type MetaResult
- type ResolvedPayload
- type ResolvedResult
- type Service
Constants ¶
const ServiceName = "records"
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 = [3]string{"data", "meta", "resolved"}
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 MakeForbidden ¶
func MakeForbidden(err error) *goa.ServiceError
MakeForbidden builds a goa.ServiceError from an error.
func MakeNotFound ¶
func MakeNotFound(err error) *goa.ServiceError
MakeNotFound builds a goa.ServiceError from an error.
func MakeUnauthorized ¶
func MakeUnauthorized(err error) *goa.ServiceError
MakeUnauthorized builds a goa.ServiceError from an error.
func NewDataEndpoint ¶
func NewDataEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewDataEndpoint returns an endpoint function that calls the method "data" of service "records".
func NewMetaEndpoint ¶
func NewMetaEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewMetaEndpoint returns an endpoint function that calls the method "meta" of service "records".
func NewResolvedEndpoint ¶
func NewResolvedEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewResolvedEndpoint returns an endpoint function that calls the method "resolved" of service "records".
Types ¶
type Auther ¶
type Auther interface { // JWTAuth implements the authorization logic for the JWT security scheme. JWTAuth(ctx context.Context, token string, schema *security.JWTScheme) (context.Context, error) }
Auther defines the authorization functions to be implemented by the service.
type Client ¶
type Client struct { DataEndpoint goa.Endpoint MetaEndpoint goa.Endpoint ResolvedEndpoint goa.Endpoint }
Client is the "records" service client.
func (*Client) Data ¶
func (c *Client) Data(ctx context.Context, p *DataPayload) (res *DataResult, err error)
Data calls the "data" endpoint of the "records" service.
func (*Client) Meta ¶
func (c *Client) Meta(ctx context.Context, p *MetaPayload) (res *MetaResult, err error)
Meta calls the "meta" endpoint of the "records" service.
func (*Client) Resolved ¶
func (c *Client) Resolved(ctx context.Context, p *ResolvedPayload) (res *ResolvedResult, err error)
Resolved calls the "resolved" endpoint of the "records" service.
type DataPayload ¶
DataPayload is the payload type of the records service data method.
type DataResult ¶
type DataResult struct {
Object interface{}
}
DataResult is the result type of the records service data method.
type Endpoints ¶
Endpoints wraps the "records" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "records" service with endpoints.
type MetaPayload ¶
MetaPayload is the payload type of the records service meta method.
type MetaResult ¶
type MetaResult struct {
Object interface{}
}
MetaResult is the result type of the records service meta method.
type ResolvedPayload ¶
ResolvedPayload is the payload type of the records service resolved method.
type ResolvedResult ¶
type ResolvedResult struct {
Object interface{}
}
ResolvedResult is the result type of the records service resolved method.
type Service ¶
type Service interface { // Data implements data. Data(context.Context, *DataPayload) (res *DataResult, err error) // Meta implements meta. Meta(context.Context, *MetaPayload) (res *MetaResult, err error) // Resolved implements resolved. Resolved(context.Context, *ResolvedPayload) (res *ResolvedResult, err error) }
Service is the records service interface.