variations

package
v0.0.0-...-4ae6852 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2025 License: AGPL-3.0 Imports: 4 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 = "variations"

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{"upsertGlobal", "deleteGlobal", "listGlobal"}

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 NewDeleteGlobalEndpoint

func NewDeleteGlobalEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint

NewDeleteGlobalEndpoint returns an endpoint function that calls the method "deleteGlobal" of service "variations".

func NewListGlobalEndpoint

func NewListGlobalEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint

NewListGlobalEndpoint returns an endpoint function that calls the method "listGlobal" of service "variations".

func NewUpsertGlobalEndpoint

func NewUpsertGlobalEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint

NewUpsertGlobalEndpoint returns an endpoint function that calls the method "upsertGlobal" of service "variations".

Types

type Auther

type Auther interface {
	// APIKeyAuth implements the authorization logic for the APIKey security scheme.
	APIKeyAuth(ctx context.Context, key string, schema *security.APIKeyScheme) (context.Context, error)
}

Auther defines the authorization functions to be implemented by the service.

type Client

type Client struct {
	UpsertGlobalEndpoint goa.Endpoint
	DeleteGlobalEndpoint goa.Endpoint
	ListGlobalEndpoint   goa.Endpoint
}

Client is the "variations" service client.

func NewClient

func NewClient(upsertGlobal, deleteGlobal, listGlobal goa.Endpoint) *Client

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

func (*Client) DeleteGlobal

func (c *Client) DeleteGlobal(ctx context.Context, p *DeleteGlobalPayload) (res *DeleteGlobalToolVariationResult, err error)

DeleteGlobal calls the "deleteGlobal" endpoint of the "variations" service. DeleteGlobal 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

func (*Client) ListGlobal

func (c *Client) ListGlobal(ctx context.Context, p *ListGlobalPayload) (res *ListVariationsResult, err error)

ListGlobal calls the "listGlobal" endpoint of the "variations" service. ListGlobal 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

func (*Client) UpsertGlobal

func (c *Client) UpsertGlobal(ctx context.Context, p *UpsertGlobalPayload) (res *UpsertGlobalToolVariationResult, err error)

UpsertGlobal calls the "upsertGlobal" endpoint of the "variations" service. UpsertGlobal 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 DeleteGlobalPayload

type DeleteGlobalPayload struct {
	SessionToken     *string
	ApikeyToken      *string
	ProjectSlugInput *string
	// The ID of the variation to delete
	VariationID string
}

DeleteGlobalPayload is the payload type of the variations service deleteGlobal method.

type DeleteGlobalToolVariationResult

type DeleteGlobalToolVariationResult struct {
	// The ID of the variation that was deleted
	VariationID string
}

DeleteGlobalToolVariationResult is the result type of the variations service deleteGlobal method.

type Endpoints

type Endpoints struct {
	UpsertGlobal goa.Endpoint
	DeleteGlobal goa.Endpoint
	ListGlobal   goa.Endpoint
}

Endpoints wraps the "variations" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

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

func (*Endpoints) Use

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

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

type ListGlobalPayload

type ListGlobalPayload struct {
	SessionToken     *string
	ApikeyToken      *string
	ProjectSlugInput *string
}

ListGlobalPayload is the payload type of the variations service listGlobal method.

type ListVariationsResult

type ListVariationsResult struct {
	Variations []*types.ToolVariation
}

ListVariationsResult is the result type of the variations service listGlobal method.

type Service

type Service interface {
	// Create or update a globally defined tool variation.
	UpsertGlobal(context.Context, *UpsertGlobalPayload) (res *UpsertGlobalToolVariationResult, err error)
	// Create or update a globally defined tool variation.
	DeleteGlobal(context.Context, *DeleteGlobalPayload) (res *DeleteGlobalToolVariationResult, err error)
	// List globally defined tool variations.
	ListGlobal(context.Context, *ListGlobalPayload) (res *ListVariationsResult, err error)
}

Manage variations of tools.

type UpsertGlobalPayload

type UpsertGlobalPayload struct {
	SessionToken     *string
	ApikeyToken      *string
	ProjectSlugInput *string
	// The URN of the source tool
	SrcToolUrn string
	// The name of the source tool
	SrcToolName string
	// The confirmation mode for the tool variation
	Confirm *string
	// The confirmation prompt for the tool variation
	ConfirmPrompt *string
	// The name of the tool variation
	Name *string
	// The summary of the tool variation
	Summary *string
	// The description of the tool variation
	Description *string
	// The tags of the tool variation
	Tags []string
	// The summarizer of the tool variation
	Summarizer *string
}

UpsertGlobalPayload is the payload type of the variations service upsertGlobal method.

type UpsertGlobalToolVariationResult

type UpsertGlobalToolVariationResult struct {
	Variation *types.ToolVariation
}

UpsertGlobalToolVariationResult is the result type of the variations service upsertGlobal method.

Jump to

Keyboard shortcuts

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