Documentation
¶
Index ¶
- Constants
- Variables
- func MakeBadRequest(err error) *goa.ServiceError
- func MakeConflict(err error) *goa.ServiceError
- func MakeForbidden(err error) *goa.ServiceError
- func MakeGatewayError(err error) *goa.ServiceError
- func MakeInvalid(err error) *goa.ServiceError
- func MakeInvariantViolation(err error) *goa.ServiceError
- func MakeNotFound(err error) *goa.ServiceError
- func MakeUnauthorized(err error) *goa.ServiceError
- func MakeUnexpected(err error) *goa.ServiceError
- func MakeUnsupportedMedia(err error) *goa.ServiceError
- func NewAddExternalOAuthServerEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewCheckMCPSlugAvailabilityEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewCloneToolsetEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewCreateToolsetEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewDeleteToolsetEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewGetToolsetEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewListToolsetsEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewRemoveOAuthServerEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewUpdateToolsetEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- type AddExternalOAuthServerPayload
- type Auther
- type CheckMCPSlugAvailabilityPayload
- type Client
- func (c *Client) AddExternalOAuthServer(ctx context.Context, p *AddExternalOAuthServerPayload) (res *types.Toolset, err error)
- func (c *Client) CheckMCPSlugAvailability(ctx context.Context, p *CheckMCPSlugAvailabilityPayload) (res bool, err error)
- func (c *Client) CloneToolset(ctx context.Context, p *CloneToolsetPayload) (res *types.Toolset, err error)
- func (c *Client) CreateToolset(ctx context.Context, p *CreateToolsetPayload) (res *types.Toolset, err error)
- func (c *Client) DeleteToolset(ctx context.Context, p *DeleteToolsetPayload) (err error)
- func (c *Client) GetToolset(ctx context.Context, p *GetToolsetPayload) (res *types.Toolset, err error)
- func (c *Client) ListToolsets(ctx context.Context, p *ListToolsetsPayload) (res *ListToolsetsResult, err error)
- func (c *Client) RemoveOAuthServer(ctx context.Context, p *RemoveOAuthServerPayload) (res *types.Toolset, err error)
- func (c *Client) UpdateToolset(ctx context.Context, p *UpdateToolsetPayload) (res *types.Toolset, err error)
- type CloneToolsetPayload
- type CreateToolsetPayload
- type DeleteToolsetPayload
- type Endpoints
- type GetToolsetPayload
- type ListToolsetsPayload
- type ListToolsetsResult
- type RemoveOAuthServerPayload
- type Service
- type UpdateToolsetPayload
Constants ¶
const APIName = "gram"
APIName is the name of the API as defined in the design.
const APIVersion = "0.0.1"
APIVersion is the version of the API as defined in the design.
const ServiceName = "toolsets"
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 = [9]string{"createToolset", "listToolsets", "updateToolset", "deleteToolset", "getToolset", "checkMCPSlugAvailability", "cloneToolset", "addExternalOAuthServer", "removeOAuthServer"}
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 NewAddExternalOAuthServerEndpoint ¶
func NewAddExternalOAuthServerEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewAddExternalOAuthServerEndpoint returns an endpoint function that calls the method "addExternalOAuthServer" of service "toolsets".
func NewCheckMCPSlugAvailabilityEndpoint ¶
func NewCheckMCPSlugAvailabilityEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewCheckMCPSlugAvailabilityEndpoint returns an endpoint function that calls the method "checkMCPSlugAvailability" of service "toolsets".
func NewCloneToolsetEndpoint ¶
func NewCloneToolsetEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewCloneToolsetEndpoint returns an endpoint function that calls the method "cloneToolset" of service "toolsets".
func NewCreateToolsetEndpoint ¶
func NewCreateToolsetEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewCreateToolsetEndpoint returns an endpoint function that calls the method "createToolset" of service "toolsets".
func NewDeleteToolsetEndpoint ¶
func NewDeleteToolsetEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewDeleteToolsetEndpoint returns an endpoint function that calls the method "deleteToolset" of service "toolsets".
func NewGetToolsetEndpoint ¶
func NewGetToolsetEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewGetToolsetEndpoint returns an endpoint function that calls the method "getToolset" of service "toolsets".
func NewListToolsetsEndpoint ¶
func NewListToolsetsEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewListToolsetsEndpoint returns an endpoint function that calls the method "listToolsets" of service "toolsets".
func NewRemoveOAuthServerEndpoint ¶
func NewRemoveOAuthServerEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewRemoveOAuthServerEndpoint returns an endpoint function that calls the method "removeOAuthServer" of service "toolsets".
func NewUpdateToolsetEndpoint ¶
func NewUpdateToolsetEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewUpdateToolsetEndpoint returns an endpoint function that calls the method "updateToolset" of service "toolsets".
Types ¶
type AddExternalOAuthServerPayload ¶
type AddExternalOAuthServerPayload struct {
SessionToken *string
// The slug of the toolset to update
Slug types.Slug
// The external OAuth server data to create and associate with the toolset
ExternalOauthServer *types.ExternalOAuthServerForm
ProjectSlugInput *string
}
AddExternalOAuthServerPayload is the payload type of the toolsets service addExternalOAuthServer method.
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 CheckMCPSlugAvailabilityPayload ¶
type CheckMCPSlugAvailabilityPayload struct {
// The slug to check
Slug types.Slug
SessionToken *string
ProjectSlugInput *string
}
CheckMCPSlugAvailabilityPayload is the payload type of the toolsets service checkMCPSlugAvailability method.
type Client ¶
type Client struct {
CreateToolsetEndpoint goa.Endpoint
ListToolsetsEndpoint goa.Endpoint
UpdateToolsetEndpoint goa.Endpoint
DeleteToolsetEndpoint goa.Endpoint
GetToolsetEndpoint goa.Endpoint
CheckMCPSlugAvailabilityEndpoint goa.Endpoint
CloneToolsetEndpoint goa.Endpoint
AddExternalOAuthServerEndpoint goa.Endpoint
RemoveOAuthServerEndpoint goa.Endpoint
}
Client is the "toolsets" service client.
func NewClient ¶
func NewClient(createToolset, listToolsets, updateToolset, deleteToolset, getToolset, checkMCPSlugAvailability, cloneToolset, addExternalOAuthServer, removeOAuthServer goa.Endpoint) *Client
NewClient initializes a "toolsets" service client given the endpoints.
func (*Client) AddExternalOAuthServer ¶
func (c *Client) AddExternalOAuthServer(ctx context.Context, p *AddExternalOAuthServerPayload) (res *types.Toolset, err error)
AddExternalOAuthServer calls the "addExternalOAuthServer" endpoint of the "toolsets" service. AddExternalOAuthServer 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) CheckMCPSlugAvailability ¶
func (c *Client) CheckMCPSlugAvailability(ctx context.Context, p *CheckMCPSlugAvailabilityPayload) (res bool, err error)
CheckMCPSlugAvailability calls the "checkMCPSlugAvailability" endpoint of the "toolsets" service. CheckMCPSlugAvailability 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) CloneToolset ¶
func (c *Client) CloneToolset(ctx context.Context, p *CloneToolsetPayload) (res *types.Toolset, err error)
CloneToolset calls the "cloneToolset" endpoint of the "toolsets" service. CloneToolset 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) CreateToolset ¶
func (c *Client) CreateToolset(ctx context.Context, p *CreateToolsetPayload) (res *types.Toolset, err error)
CreateToolset calls the "createToolset" endpoint of the "toolsets" service. CreateToolset 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) DeleteToolset ¶
func (c *Client) DeleteToolset(ctx context.Context, p *DeleteToolsetPayload) (err error)
DeleteToolset calls the "deleteToolset" endpoint of the "toolsets" service. DeleteToolset 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) GetToolset ¶
func (c *Client) GetToolset(ctx context.Context, p *GetToolsetPayload) (res *types.Toolset, err error)
GetToolset calls the "getToolset" endpoint of the "toolsets" service. GetToolset 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) ListToolsets ¶
func (c *Client) ListToolsets(ctx context.Context, p *ListToolsetsPayload) (res *ListToolsetsResult, err error)
ListToolsets calls the "listToolsets" endpoint of the "toolsets" service. ListToolsets 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) RemoveOAuthServer ¶
func (c *Client) RemoveOAuthServer(ctx context.Context, p *RemoveOAuthServerPayload) (res *types.Toolset, err error)
RemoveOAuthServer calls the "removeOAuthServer" endpoint of the "toolsets" service. RemoveOAuthServer 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) UpdateToolset ¶
func (c *Client) UpdateToolset(ctx context.Context, p *UpdateToolsetPayload) (res *types.Toolset, err error)
UpdateToolset calls the "updateToolset" endpoint of the "toolsets" service. UpdateToolset 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 CloneToolsetPayload ¶
type CloneToolsetPayload struct {
// The slug of the toolset to clone
Slug types.Slug
SessionToken *string
ProjectSlugInput *string
}
CloneToolsetPayload is the payload type of the toolsets service cloneToolset method.
type CreateToolsetPayload ¶
type CreateToolsetPayload struct {
SessionToken *string
// The name of the toolset
Name string
// Description of the toolset
Description *string
// List of tool URNs to include in the toolset
ToolUrns []string
// List of resource URNs to include in the toolset
ResourceUrns []string
// The slug of the environment to use as the default for the toolset
DefaultEnvironmentSlug *types.Slug
ProjectSlugInput *string
}
CreateToolsetPayload is the payload type of the toolsets service createToolset method.
type DeleteToolsetPayload ¶
type DeleteToolsetPayload struct {
// The slug of the toolset
Slug types.Slug
SessionToken *string
ProjectSlugInput *string
}
DeleteToolsetPayload is the payload type of the toolsets service deleteToolset method.
type Endpoints ¶
type Endpoints struct {
CreateToolset goa.Endpoint
ListToolsets goa.Endpoint
UpdateToolset goa.Endpoint
DeleteToolset goa.Endpoint
GetToolset goa.Endpoint
CheckMCPSlugAvailability goa.Endpoint
CloneToolset goa.Endpoint
AddExternalOAuthServer goa.Endpoint
RemoveOAuthServer goa.Endpoint
}
Endpoints wraps the "toolsets" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "toolsets" service with endpoints.
type GetToolsetPayload ¶
type GetToolsetPayload struct {
// The slug of the toolset
Slug types.Slug
SessionToken *string
ProjectSlugInput *string
}
GetToolsetPayload is the payload type of the toolsets service getToolset method.
type ListToolsetsPayload ¶
ListToolsetsPayload is the payload type of the toolsets service listToolsets method.
type ListToolsetsResult ¶
type ListToolsetsResult struct {
// The list of toolsets
Toolsets []*types.ToolsetEntry
}
ListToolsetsResult is the result type of the toolsets service listToolsets method.
type RemoveOAuthServerPayload ¶
type RemoveOAuthServerPayload struct {
// The slug of the toolset
Slug types.Slug
SessionToken *string
ProjectSlugInput *string
}
RemoveOAuthServerPayload is the payload type of the toolsets service removeOAuthServer method.
type Service ¶
type Service interface {
// Create a new toolset with associated tools
CreateToolset(context.Context, *CreateToolsetPayload) (res *types.Toolset, err error)
// List all toolsets for a project
ListToolsets(context.Context, *ListToolsetsPayload) (res *ListToolsetsResult, err error)
// Update a toolset's properties including name, description, and HTTP tools
UpdateToolset(context.Context, *UpdateToolsetPayload) (res *types.Toolset, err error)
// Delete a toolset by its ID
DeleteToolset(context.Context, *DeleteToolsetPayload) (err error)
// Get detailed information about a toolset including full HTTP tool definitions
GetToolset(context.Context, *GetToolsetPayload) (res *types.Toolset, err error)
// Check if a MCP slug is available
CheckMCPSlugAvailability(context.Context, *CheckMCPSlugAvailabilityPayload) (res bool, err error)
// Clone an existing toolset with a new name
CloneToolset(context.Context, *CloneToolsetPayload) (res *types.Toolset, err error)
// Associate an external OAuth server with a toolset
AddExternalOAuthServer(context.Context, *AddExternalOAuthServerPayload) (res *types.Toolset, err error)
// Remove OAuth server association from a toolset
RemoveOAuthServer(context.Context, *RemoveOAuthServerPayload) (res *types.Toolset, err error)
}
Managed toolsets for gram AI consumers.
type UpdateToolsetPayload ¶
type UpdateToolsetPayload struct {
SessionToken *string
// The slug of the toolset to update
Slug types.Slug
// The new name of the toolset
Name *string
// The new description of the toolset
Description *string
// The slug of the environment to use as the default for the toolset
DefaultEnvironmentSlug *types.Slug
// List of prompt template names to include (note: for actual prompts, not
// tools)
PromptTemplateNames []string
// List of tool URNs to include in the toolset
ToolUrns []string
// List of resource URNs to include in the toolset
ResourceUrns []string
// Whether the toolset is enabled for MCP
McpEnabled *bool
// The slug of the MCP to use for the toolset
McpSlug *types.Slug
// Whether the toolset is public in MCP
McpIsPublic *bool
// The ID of the custom domain to use for the toolset
CustomDomainID *string
ProjectSlugInput *string
}
UpdateToolsetPayload is the payload type of the toolsets service updateToolset method.