records

package
v0.0.0-...-b9360c4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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 NewClient

func NewClient(data, meta, resolved goa.Endpoint) *Client

NewClient initializes a "records" service client given the endpoints.

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

type DataPayload struct {
	Auth     *string
	RecordID *int64
}

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

type Endpoints struct {
	Data     goa.Endpoint
	Meta     goa.Endpoint
	Resolved goa.Endpoint
}

Endpoints wraps the "records" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

NewEndpoints wraps the methods of the "records" service with endpoints.

func (*Endpoints) Use

func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint)

Use applies the given middleware to all the "records" service endpoints.

type MetaPayload

type MetaPayload struct {
	Auth     *string
	RecordID *int64
}

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

type ResolvedPayload struct {
	Auth     *string
	RecordID *int64
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL