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 NewAttachServerEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewCreateEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewDeleteEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewDetachServerEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewListEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewListServersEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewUpdateEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- type AttachServerPayload
- type Auther
- type Client
- func (c *Client) AttachServer(ctx context.Context, p *AttachServerPayload) (res *types.MCPCollection, err error)
- func (c *Client) Create(ctx context.Context, p *CreatePayload) (res *types.MCPCollection, err error)
- func (c *Client) Delete(ctx context.Context, p *DeletePayload) (err error)
- func (c *Client) DetachServer(ctx context.Context, p *DetachServerPayload) (err error)
- func (c *Client) List(ctx context.Context, p *ListPayload) (res *ListResult, err error)
- func (c *Client) ListServers(ctx context.Context, p *ListServersPayload) (res *ListServersResult, err error)
- func (c *Client) Update(ctx context.Context, p *UpdatePayload) (res *types.MCPCollection, err error)
- type CreatePayload
- type DeletePayload
- type DetachServerPayload
- type Endpoints
- type ListPayload
- type ListResult
- type ListServersPayload
- type ListServersResult
- type Service
- type UpdatePayload
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 = "collections"
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 = [7]string{"create", "list", "update", "delete", "attachServer", "detachServer", "listServers"}
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 NewAttachServerEndpoint ¶
func NewAttachServerEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewAttachServerEndpoint returns an endpoint function that calls the method "attachServer" of service "collections".
func NewCreateEndpoint ¶
func NewCreateEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewCreateEndpoint returns an endpoint function that calls the method "create" of service "collections".
func NewDeleteEndpoint ¶
func NewDeleteEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewDeleteEndpoint returns an endpoint function that calls the method "delete" of service "collections".
func NewDetachServerEndpoint ¶
func NewDetachServerEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewDetachServerEndpoint returns an endpoint function that calls the method "detachServer" of service "collections".
func NewListEndpoint ¶
func NewListEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewListEndpoint returns an endpoint function that calls the method "list" of service "collections".
func NewListServersEndpoint ¶
func NewListServersEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewListServersEndpoint returns an endpoint function that calls the method "listServers" of service "collections".
func NewUpdateEndpoint ¶
func NewUpdateEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewUpdateEndpoint returns an endpoint function that calls the method "update" of service "collections".
Types ¶
type AttachServerPayload ¶
type AttachServerPayload struct {
// ID of the collection
CollectionID string
// ID of the toolset to attach
ToolsetID string
SessionToken *string
ApikeyToken *string
}
AttachServerPayload is the payload type of the collections service attachServer 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 Client ¶
type Client struct {
CreateEndpoint goa.Endpoint
ListEndpoint goa.Endpoint
UpdateEndpoint goa.Endpoint
DeleteEndpoint goa.Endpoint
AttachServerEndpoint goa.Endpoint
DetachServerEndpoint goa.Endpoint
ListServersEndpoint goa.Endpoint
}
Client is the "collections" service client.
func NewClient ¶
func NewClient(create, list, update, delete_, attachServer, detachServer, listServers goa.Endpoint) *Client
NewClient initializes a "collections" service client given the endpoints.
func (*Client) AttachServer ¶
func (c *Client) AttachServer(ctx context.Context, p *AttachServerPayload) (res *types.MCPCollection, err error)
AttachServer calls the "attachServer" endpoint of the "collections" service. AttachServer 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) Create ¶
func (c *Client) Create(ctx context.Context, p *CreatePayload) (res *types.MCPCollection, err error)
Create calls the "create" endpoint of the "collections" service. Create 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) Delete ¶
func (c *Client) Delete(ctx context.Context, p *DeletePayload) (err error)
Delete calls the "delete" endpoint of the "collections" service. Delete 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) DetachServer ¶
func (c *Client) DetachServer(ctx context.Context, p *DetachServerPayload) (err error)
DetachServer calls the "detachServer" endpoint of the "collections" service. DetachServer 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) List ¶
func (c *Client) List(ctx context.Context, p *ListPayload) (res *ListResult, err error)
List calls the "list" endpoint of the "collections" service. List 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) ListServers ¶
func (c *Client) ListServers(ctx context.Context, p *ListServersPayload) (res *ListServersResult, err error)
ListServers calls the "listServers" endpoint of the "collections" service. ListServers 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) Update ¶
func (c *Client) Update(ctx context.Context, p *UpdatePayload) (res *types.MCPCollection, err error)
Update calls the "update" endpoint of the "collections" service. Update 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 CreatePayload ¶
type CreatePayload struct {
// Display name for the collection
Name string
// URL-friendly identifier for the collection
Slug string
// Description of the collection
Description *string
// Registry namespace (e.g., 'com.speakeasy.acme.my-tools')
McpRegistryNamespace string
// Visibility of the collection
Visibility string
// Toolset IDs to attach to the collection
ToolsetIds []string
SessionToken *string
ApikeyToken *string
}
CreatePayload is the payload type of the collections service create method.
type DeletePayload ¶
type DeletePayload struct {
// ID of the collection to delete
CollectionID string
SessionToken *string
ApikeyToken *string
}
DeletePayload is the payload type of the collections service delete method.
type DetachServerPayload ¶
type DetachServerPayload struct {
// ID of the collection
CollectionID string
// ID of the toolset to detach
ToolsetID string
SessionToken *string
ApikeyToken *string
}
DetachServerPayload is the payload type of the collections service detachServer method.
type Endpoints ¶
type Endpoints struct {
Create goa.Endpoint
List goa.Endpoint
Update goa.Endpoint
Delete goa.Endpoint
AttachServer goa.Endpoint
DetachServer goa.Endpoint
ListServers goa.Endpoint
}
Endpoints wraps the "collections" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "collections" service with endpoints.
type ListPayload ¶
ListPayload is the payload type of the collections service list method.
type ListResult ¶
type ListResult struct {
// List of collections
Collections []*types.MCPCollection
}
ListResult is the result type of the collections service list method.
type ListServersPayload ¶
type ListServersPayload struct {
// Slug of the collection to serve
CollectionSlug string
SessionToken *string
ApikeyToken *string
}
ListServersPayload is the payload type of the collections service listServers method.
type ListServersResult ¶
type ListServersResult struct {
// List of available MCP servers
Servers []*types.ExternalMCPServer
}
ListServersResult is the result type of the collections service listServers method.
type Service ¶
type Service interface {
// Create an MCP collection within the organization
Create(context.Context, *CreatePayload) (res *types.MCPCollection, err error)
// List MCP collections in the organization
List(context.Context, *ListPayload) (res *ListResult, err error)
// Update an MCP collection
Update(context.Context, *UpdatePayload) (res *types.MCPCollection, err error)
// Delete an MCP collection
Delete(context.Context, *DeletePayload) (err error)
// Attach a server (toolset) to a collection
AttachServer(context.Context, *AttachServerPayload) (res *types.MCPCollection, err error)
// Detach a server (toolset) from a collection
DetachServer(context.Context, *DetachServerPayload) (err error)
// List published MCP servers from a collection
ListServers(context.Context, *ListServersPayload) (res *ListServersResult, err error)
}
MCP collection operations
type UpdatePayload ¶
type UpdatePayload struct {
// ID of the collection to update
CollectionID string
// Display name for the collection
Name *string
// Description of the collection
Description *string
// Visibility of the collection
Visibility *string
SessionToken *string
ApikeyToken *string
}
UpdatePayload is the payload type of the collections service update method.