functions

package
v0.0.0-...-b64ac56 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const APIName = "gram"

APIName is the name of the API as defined in the design.

View Source
const APIVersion = "0.0.1"

APIVersion is the version of the API as defined in the design.

View Source
const ServiceName = "functions"

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 = [1]string{"getSignedAssetURL"}

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 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 MakeGatewayError

func MakeGatewayError(err error) *goa.ServiceError

MakeGatewayError builds a goa.ServiceError from an error.

func MakeInvalid

func MakeInvalid(err error) *goa.ServiceError

MakeInvalid builds a goa.ServiceError from an error.

func MakeInvariantViolation

func MakeInvariantViolation(err error) *goa.ServiceError

MakeInvariantViolation 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 MakeUnexpected

func MakeUnexpected(err error) *goa.ServiceError

MakeUnexpected builds a goa.ServiceError from an error.

func MakeUnsupportedMedia

func MakeUnsupportedMedia(err error) *goa.ServiceError

MakeUnsupportedMedia builds a goa.ServiceError from an error.

func NewGetSignedAssetURLEndpoint

func NewGetSignedAssetURLEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint

NewGetSignedAssetURLEndpoint returns an endpoint function that calls the method "getSignedAssetURL" of service "functions".

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 {
	GetSignedAssetURLEndpoint goa.Endpoint
}

Client is the "functions" service client.

func NewClient

func NewClient(getSignedAssetURL goa.Endpoint) *Client

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

func (*Client) GetSignedAssetURL

func (c *Client) GetSignedAssetURL(ctx context.Context, p *GetSignedAssetURLPayload) (res *GetSignedAssetURLResult, err error)

GetSignedAssetURL calls the "getSignedAssetURL" endpoint of the "functions" service. GetSignedAssetURL may return the following errors:

  • "unauthorized" (type *goa.ServiceError): unauthorized access
  • "forbidden" (type *goa.ServiceError): permission denied
  • "bad_request" (type *goa.ServiceError): request is invalid
  • "not_found" (type *goa.ServiceError): resource not found
  • "conflict" (type *goa.ServiceError): resource already exists
  • "unsupported_media" (type *goa.ServiceError): unsupported media type
  • "invalid" (type *goa.ServiceError): request contains one or more invalidation fields
  • "invariant_violation" (type *goa.ServiceError): an unexpected error occurred
  • "unexpected" (type *goa.ServiceError): an unexpected error occurred
  • "gateway_error" (type *goa.ServiceError): an unexpected error occurred
  • error: internal error

type Endpoints

type Endpoints struct {
	GetSignedAssetURL goa.Endpoint
}

Endpoints wraps the "functions" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

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

func (*Endpoints) Use

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

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

type GetSignedAssetURLPayload

type GetSignedAssetURLPayload struct {
	FunctionToken *string
	// The ID of the function asset
	AssetID string
}

GetSignedAssetURLPayload is the payload type of the functions service getSignedAssetURL method.

type GetSignedAssetURLResult

type GetSignedAssetURLResult struct {
	// The signed URL to access the asset
	URL string
}

GetSignedAssetURLResult is the result type of the functions service getSignedAssetURL method.

type Service

type Service interface {
	// Get the signed asset URL for a function
	GetSignedAssetURL(context.Context, *GetSignedAssetURLPayload) (res *GetSignedAssetURLResult, err error)
}

Endpoints for working with functions.

Jump to

Keyboard shortcuts

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