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 NewApproveShadowMCPEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewCreateRiskPolicyEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewDeleteRiskPolicyEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewGetRiskCapabilitiesEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewGetRiskPolicyEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewGetRiskPolicyStatusEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewListRiskPoliciesEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewListRiskResultsByChatEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewListRiskResultsEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewListShadowMCPApprovalsEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewRevokeShadowMCPApprovalEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewTriggerRiskAnalysisEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- func NewUpdateRiskPolicyEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- type ApproveShadowMCPPayload
- type Auther
- type Client
- func (c *Client) ApproveShadowMCP(ctx context.Context, p *ApproveShadowMCPPayload) (res *types.ShadowMCPApproval, err error)
- func (c *Client) CreateRiskPolicy(ctx context.Context, p *CreateRiskPolicyPayload) (res *types.RiskPolicy, err error)
- func (c *Client) DeleteRiskPolicy(ctx context.Context, p *DeleteRiskPolicyPayload) (err error)
- func (c *Client) GetRiskCapabilities(ctx context.Context, p *GetRiskCapabilitiesPayload) (res *RiskCapabilitiesResult, err error)
- func (c *Client) GetRiskPolicy(ctx context.Context, p *GetRiskPolicyPayload) (res *types.RiskPolicy, err error)
- func (c *Client) GetRiskPolicyStatus(ctx context.Context, p *GetRiskPolicyStatusPayload) (res *types.RiskPolicyStatus, err error)
- func (c *Client) ListRiskPolicies(ctx context.Context, p *ListRiskPoliciesPayload) (res *ListRiskPoliciesResult, err error)
- func (c *Client) ListRiskResults(ctx context.Context, p *ListRiskResultsPayload) (res *ListRiskResultsResult, err error)
- func (c *Client) ListRiskResultsByChat(ctx context.Context, p *ListRiskResultsByChatPayload) (res *ListRiskResultsByChatResult, err error)
- func (c *Client) ListShadowMCPApprovals(ctx context.Context, p *ListShadowMCPApprovalsPayload) (res *ListShadowMCPApprovalsResult, err error)
- func (c *Client) RevokeShadowMCPApproval(ctx context.Context, p *RevokeShadowMCPApprovalPayload) (err error)
- func (c *Client) TriggerRiskAnalysis(ctx context.Context, p *TriggerRiskAnalysisPayload) (err error)
- func (c *Client) UpdateRiskPolicy(ctx context.Context, p *UpdateRiskPolicyPayload) (res *types.RiskPolicy, err error)
- type CreateRiskPolicyPayload
- type DeleteRiskPolicyPayload
- type Endpoints
- type GetRiskCapabilitiesPayload
- type GetRiskPolicyPayload
- type GetRiskPolicyStatusPayload
- type ListRiskPoliciesPayload
- type ListRiskPoliciesResult
- type ListRiskResultsByChatPayload
- type ListRiskResultsByChatResult
- type ListRiskResultsPayload
- type ListRiskResultsResult
- type ListShadowMCPApprovalsPayload
- type ListShadowMCPApprovalsResult
- type RevokeShadowMCPApprovalPayload
- type RiskCapabilitiesResult
- type Service
- type TriggerRiskAnalysisPayload
- type UpdateRiskPolicyPayload
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 = "risk"
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 = [13]string{"createRiskPolicy", "listRiskPolicies", "getRiskCapabilities", "getRiskPolicy", "updateRiskPolicy", "deleteRiskPolicy", "listRiskResults", "listRiskResultsByChat", "getRiskPolicyStatus", "listShadowMCPApprovals", "approveShadowMCP", "revokeShadowMCPApproval", "triggerRiskAnalysis"}
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 NewApproveShadowMCPEndpoint ¶
func NewApproveShadowMCPEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewApproveShadowMCPEndpoint returns an endpoint function that calls the method "approveShadowMCP" of service "risk".
func NewCreateRiskPolicyEndpoint ¶
func NewCreateRiskPolicyEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewCreateRiskPolicyEndpoint returns an endpoint function that calls the method "createRiskPolicy" of service "risk".
func NewDeleteRiskPolicyEndpoint ¶
func NewDeleteRiskPolicyEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewDeleteRiskPolicyEndpoint returns an endpoint function that calls the method "deleteRiskPolicy" of service "risk".
func NewGetRiskCapabilitiesEndpoint ¶
func NewGetRiskCapabilitiesEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewGetRiskCapabilitiesEndpoint returns an endpoint function that calls the method "getRiskCapabilities" of service "risk".
func NewGetRiskPolicyEndpoint ¶
func NewGetRiskPolicyEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewGetRiskPolicyEndpoint returns an endpoint function that calls the method "getRiskPolicy" of service "risk".
func NewGetRiskPolicyStatusEndpoint ¶
func NewGetRiskPolicyStatusEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewGetRiskPolicyStatusEndpoint returns an endpoint function that calls the method "getRiskPolicyStatus" of service "risk".
func NewListRiskPoliciesEndpoint ¶
func NewListRiskPoliciesEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewListRiskPoliciesEndpoint returns an endpoint function that calls the method "listRiskPolicies" of service "risk".
func NewListRiskResultsByChatEndpoint ¶
func NewListRiskResultsByChatEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewListRiskResultsByChatEndpoint returns an endpoint function that calls the method "listRiskResultsByChat" of service "risk".
func NewListRiskResultsEndpoint ¶
func NewListRiskResultsEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewListRiskResultsEndpoint returns an endpoint function that calls the method "listRiskResults" of service "risk".
func NewListShadowMCPApprovalsEndpoint ¶
func NewListShadowMCPApprovalsEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewListShadowMCPApprovalsEndpoint returns an endpoint function that calls the method "listShadowMCPApprovals" of service "risk".
func NewRevokeShadowMCPApprovalEndpoint ¶
func NewRevokeShadowMCPApprovalEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewRevokeShadowMCPApprovalEndpoint returns an endpoint function that calls the method "revokeShadowMCPApproval" of service "risk".
func NewTriggerRiskAnalysisEndpoint ¶
func NewTriggerRiskAnalysisEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewTriggerRiskAnalysisEndpoint returns an endpoint function that calls the method "triggerRiskAnalysis" of service "risk".
func NewUpdateRiskPolicyEndpoint ¶
func NewUpdateRiskPolicyEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewUpdateRiskPolicyEndpoint returns an endpoint function that calls the method "updateRiskPolicy" of service "risk".
Types ¶
type ApproveShadowMCPPayload ¶
type ApproveShadowMCPPayload struct {
ApikeyToken *string
SessionToken *string
ProjectSlugInput *string
// The risk policy ID.
PolicyID string
// The MCP server identifier to approve.
Match string
// Display name of the MCP server (optional, for UI).
ServerName *string
}
ApproveShadowMCPPayload is the payload type of the risk service approveShadowMCP 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 {
CreateRiskPolicyEndpoint goa.Endpoint
ListRiskPoliciesEndpoint goa.Endpoint
GetRiskCapabilitiesEndpoint goa.Endpoint
GetRiskPolicyEndpoint goa.Endpoint
UpdateRiskPolicyEndpoint goa.Endpoint
DeleteRiskPolicyEndpoint goa.Endpoint
ListRiskResultsEndpoint goa.Endpoint
ListRiskResultsByChatEndpoint goa.Endpoint
GetRiskPolicyStatusEndpoint goa.Endpoint
ListShadowMCPApprovalsEndpoint goa.Endpoint
ApproveShadowMCPEndpoint goa.Endpoint
RevokeShadowMCPApprovalEndpoint goa.Endpoint
TriggerRiskAnalysisEndpoint goa.Endpoint
}
Client is the "risk" service client.
func NewClient ¶
func NewClient(createRiskPolicy, listRiskPolicies, getRiskCapabilities, getRiskPolicy, updateRiskPolicy, deleteRiskPolicy, listRiskResults, listRiskResultsByChat, getRiskPolicyStatus, listShadowMCPApprovals, approveShadowMCP, revokeShadowMCPApproval, triggerRiskAnalysis goa.Endpoint) *Client
NewClient initializes a "risk" service client given the endpoints.
func (*Client) ApproveShadowMCP ¶
func (c *Client) ApproveShadowMCP(ctx context.Context, p *ApproveShadowMCPPayload) (res *types.ShadowMCPApproval, err error)
ApproveShadowMCP calls the "approveShadowMCP" endpoint of the "risk" service. ApproveShadowMCP 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) CreateRiskPolicy ¶
func (c *Client) CreateRiskPolicy(ctx context.Context, p *CreateRiskPolicyPayload) (res *types.RiskPolicy, err error)
CreateRiskPolicy calls the "createRiskPolicy" endpoint of the "risk" service. CreateRiskPolicy 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) DeleteRiskPolicy ¶
func (c *Client) DeleteRiskPolicy(ctx context.Context, p *DeleteRiskPolicyPayload) (err error)
DeleteRiskPolicy calls the "deleteRiskPolicy" endpoint of the "risk" service. DeleteRiskPolicy 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) GetRiskCapabilities ¶
func (c *Client) GetRiskCapabilities(ctx context.Context, p *GetRiskCapabilitiesPayload) (res *RiskCapabilitiesResult, err error)
GetRiskCapabilities calls the "getRiskCapabilities" endpoint of the "risk" service. GetRiskCapabilities 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) GetRiskPolicy ¶
func (c *Client) GetRiskPolicy(ctx context.Context, p *GetRiskPolicyPayload) (res *types.RiskPolicy, err error)
GetRiskPolicy calls the "getRiskPolicy" endpoint of the "risk" service. GetRiskPolicy 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) GetRiskPolicyStatus ¶
func (c *Client) GetRiskPolicyStatus(ctx context.Context, p *GetRiskPolicyStatusPayload) (res *types.RiskPolicyStatus, err error)
GetRiskPolicyStatus calls the "getRiskPolicyStatus" endpoint of the "risk" service. GetRiskPolicyStatus 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) ListRiskPolicies ¶
func (c *Client) ListRiskPolicies(ctx context.Context, p *ListRiskPoliciesPayload) (res *ListRiskPoliciesResult, err error)
ListRiskPolicies calls the "listRiskPolicies" endpoint of the "risk" service. ListRiskPolicies 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) ListRiskResults ¶
func (c *Client) ListRiskResults(ctx context.Context, p *ListRiskResultsPayload) (res *ListRiskResultsResult, err error)
ListRiskResults calls the "listRiskResults" endpoint of the "risk" service. ListRiskResults 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) ListRiskResultsByChat ¶
func (c *Client) ListRiskResultsByChat(ctx context.Context, p *ListRiskResultsByChatPayload) (res *ListRiskResultsByChatResult, err error)
ListRiskResultsByChat calls the "listRiskResultsByChat" endpoint of the "risk" service. ListRiskResultsByChat 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) ListShadowMCPApprovals ¶
func (c *Client) ListShadowMCPApprovals(ctx context.Context, p *ListShadowMCPApprovalsPayload) (res *ListShadowMCPApprovalsResult, err error)
ListShadowMCPApprovals calls the "listShadowMCPApprovals" endpoint of the "risk" service. ListShadowMCPApprovals 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) RevokeShadowMCPApproval ¶
func (c *Client) RevokeShadowMCPApproval(ctx context.Context, p *RevokeShadowMCPApprovalPayload) (err error)
RevokeShadowMCPApproval calls the "revokeShadowMCPApproval" endpoint of the "risk" service. RevokeShadowMCPApproval 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) TriggerRiskAnalysis ¶
func (c *Client) TriggerRiskAnalysis(ctx context.Context, p *TriggerRiskAnalysisPayload) (err error)
TriggerRiskAnalysis calls the "triggerRiskAnalysis" endpoint of the "risk" service. TriggerRiskAnalysis 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) UpdateRiskPolicy ¶
func (c *Client) UpdateRiskPolicy(ctx context.Context, p *UpdateRiskPolicyPayload) (res *types.RiskPolicy, err error)
UpdateRiskPolicy calls the "updateRiskPolicy" endpoint of the "risk" service. UpdateRiskPolicy 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 CreateRiskPolicyPayload ¶
type CreateRiskPolicyPayload struct {
ApikeyToken *string
SessionToken *string
ProjectSlugInput *string
// The policy name. If omitted, a name will be auto-generated.
Name *string
// Detection sources to enable.
Sources []string
// Presidio entity types to detect.
PresidioEntities []string
// Prompt-injection detection rule ids to enable in addition to the heuristic
// baseline (e.g. 'deberta-v3-classifier').
PromptInjectionRules []string
// Whether the policy is active.
Enabled *bool
// Policy action: flag or block.
Action string
// Whether the policy name should be auto-generated.
AutoName *bool
// Optional message shown to end users when this policy blocks an action or
// surfaces a flagged finding.
UserMessage *string
}
CreateRiskPolicyPayload is the payload type of the risk service createRiskPolicy method.
type DeleteRiskPolicyPayload ¶
type DeleteRiskPolicyPayload struct {
ApikeyToken *string
SessionToken *string
ProjectSlugInput *string
// The policy ID.
ID string
}
DeleteRiskPolicyPayload is the payload type of the risk service deleteRiskPolicy method.
type Endpoints ¶
type Endpoints struct {
CreateRiskPolicy goa.Endpoint
ListRiskPolicies goa.Endpoint
GetRiskCapabilities goa.Endpoint
GetRiskPolicy goa.Endpoint
UpdateRiskPolicy goa.Endpoint
DeleteRiskPolicy goa.Endpoint
ListRiskResults goa.Endpoint
ListRiskResultsByChat goa.Endpoint
GetRiskPolicyStatus goa.Endpoint
ListShadowMCPApprovals goa.Endpoint
ApproveShadowMCP goa.Endpoint
RevokeShadowMCPApproval goa.Endpoint
TriggerRiskAnalysis goa.Endpoint
}
Endpoints wraps the "risk" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "risk" service with endpoints.
type GetRiskCapabilitiesPayload ¶
type GetRiskCapabilitiesPayload struct {
ApikeyToken *string
SessionToken *string
ProjectSlugInput *string
}
GetRiskCapabilitiesPayload is the payload type of the risk service getRiskCapabilities method.
type GetRiskPolicyPayload ¶
type GetRiskPolicyPayload struct {
ApikeyToken *string
SessionToken *string
ProjectSlugInput *string
// The policy ID.
ID string
}
GetRiskPolicyPayload is the payload type of the risk service getRiskPolicy method.
type GetRiskPolicyStatusPayload ¶
type GetRiskPolicyStatusPayload struct {
ApikeyToken *string
SessionToken *string
ProjectSlugInput *string
// The policy ID.
ID string
}
GetRiskPolicyStatusPayload is the payload type of the risk service getRiskPolicyStatus method.
type ListRiskPoliciesPayload ¶
type ListRiskPoliciesPayload struct {
ApikeyToken *string
SessionToken *string
ProjectSlugInput *string
}
ListRiskPoliciesPayload is the payload type of the risk service listRiskPolicies method.
type ListRiskPoliciesResult ¶
type ListRiskPoliciesResult struct {
// The list of risk policies.
Policies []*types.RiskPolicy
}
ListRiskPoliciesResult is the result type of the risk service listRiskPolicies method.
type ListRiskResultsByChatPayload ¶
type ListRiskResultsByChatPayload struct {
ApikeyToken *string
SessionToken *string
ProjectSlugInput *string
// Cursor to fetch the next page of results.
Cursor *string
// Maximum number of results to return per page.
Limit *int
}
ListRiskResultsByChatPayload is the payload type of the risk service listRiskResultsByChat method.
type ListRiskResultsByChatResult ¶
type ListRiskResultsByChatResult struct {
// Risk results grouped by chat.
Chats []*types.RiskChatSummary
// Cursor for the next page of results.
NextCursor *string
}
ListRiskResultsByChatResult is the result type of the risk service listRiskResultsByChat method.
type ListRiskResultsPayload ¶
type ListRiskResultsPayload struct {
ApikeyToken *string
SessionToken *string
ProjectSlugInput *string
// Optional policy ID to filter by.
PolicyID *string
// Optional chat ID to filter by.
ChatID *string
// Cursor to fetch the next page of results.
Cursor *string
// Maximum number of results to return per page.
Limit *int
}
ListRiskResultsPayload is the payload type of the risk service listRiskResults method.
type ListRiskResultsResult ¶
type ListRiskResultsResult struct {
// The list of risk results.
Results []*types.RiskResult
// Total number of findings across all enabled policies.
TotalCount int64
// Cursor for the next page of results.
NextCursor *string
}
ListRiskResultsResult is the result type of the risk service listRiskResults method.
type ListShadowMCPApprovalsPayload ¶
type ListShadowMCPApprovalsPayload struct {
ApikeyToken *string
SessionToken *string
ProjectSlugInput *string
// The risk policy ID.
PolicyID string
}
ListShadowMCPApprovalsPayload is the payload type of the risk service listShadowMCPApprovals method.
type ListShadowMCPApprovalsResult ¶
type ListShadowMCPApprovalsResult struct {
// The approved shadow-MCP servers for the policy (URL- or command-keyed).
Approvals []*types.ShadowMCPApproval
}
ListShadowMCPApprovalsResult is the result type of the risk service listShadowMCPApprovals method.
type RevokeShadowMCPApprovalPayload ¶
type RevokeShadowMCPApprovalPayload struct {
ApikeyToken *string
SessionToken *string
ProjectSlugInput *string
// The risk policy ID.
PolicyID string
// The MCP server identifier to revoke — exactly the value used to approve.
Match string
}
RevokeShadowMCPApprovalPayload is the payload type of the risk service revokeShadowMCPApproval method.
type RiskCapabilitiesResult ¶
type RiskCapabilitiesResult struct {
// Whether the prompt-injection ML classifier is configured on this server.
PiClassifierEnabled bool
}
RiskCapabilitiesResult is the result type of the risk service getRiskCapabilities method.
type Service ¶
type Service interface {
// Create a new risk analysis policy for the current project.
CreateRiskPolicy(context.Context, *CreateRiskPolicyPayload) (res *types.RiskPolicy, err error)
// List all risk analysis policies for the current project.
ListRiskPolicies(context.Context, *ListRiskPoliciesPayload) (res *ListRiskPoliciesResult, err error)
// Get server-side risk analysis capabilities for the current project.
GetRiskCapabilities(context.Context, *GetRiskCapabilitiesPayload) (res *RiskCapabilitiesResult, err error)
// Get a risk analysis policy by ID.
GetRiskPolicy(context.Context, *GetRiskPolicyPayload) (res *types.RiskPolicy, err error)
// Update a risk analysis policy.
UpdateRiskPolicy(context.Context, *UpdateRiskPolicyPayload) (res *types.RiskPolicy, err error)
// Delete a risk analysis policy.
DeleteRiskPolicy(context.Context, *DeleteRiskPolicyPayload) (err error)
// List risk analysis results for the current project.
ListRiskResults(context.Context, *ListRiskResultsPayload) (res *ListRiskResultsResult, err error)
// List risk results grouped by chat session for the current project.
ListRiskResultsByChat(context.Context, *ListRiskResultsByChatPayload) (res *ListRiskResultsByChatResult, err error)
// Get the analysis status of a risk policy including progress and workflow
// state.
GetRiskPolicyStatus(context.Context, *GetRiskPolicyStatusPayload) (res *types.RiskPolicyStatus, err error)
// List shadow-MCP approvals (URL- or command-keyed) for a policy. Temporary
// Redis-backed storage; will move to a dedicated table once the feature
// graduates.
ListShadowMCPApprovals(context.Context, *ListShadowMCPApprovalsPayload) (res *ListShadowMCPApprovalsResult, err error)
// Approve a shadow-MCP server so the named policy stops blocking calls to it.
// `match` is the same opaque server identifier surfaced in `RiskResult.match`
// — typically a server URL, stdio command, or `mcp__<server>__` prefix.
ApproveShadowMCP(context.Context, *ApproveShadowMCPPayload) (res *types.ShadowMCPApproval, err error)
// Remove a previously-approved shadow-MCP server for a policy.
RevokeShadowMCPApproval(context.Context, *RevokeShadowMCPApprovalPayload) (err error)
// Manually trigger risk analysis for a policy, starting or signaling the drain
// workflow. Defaults to the most recent 100 unanalyzed messages; pass
// `limit=0` to backfill every unanalyzed message.
TriggerRiskAnalysis(context.Context, *TriggerRiskAnalysisPayload) (err error)
}
Manage risk analysis policies and view scan results.
type TriggerRiskAnalysisPayload ¶
type TriggerRiskAnalysisPayload struct {
ApikeyToken *string
SessionToken *string
ProjectSlugInput *string
// The policy ID.
ID string
// Cap the backfill at the most recent N unanalyzed messages. Defaults to 100
// (the recent-N drain budget). Pass 0 to request a full backfill of every
// unanalyzed message.
Limit int32
}
TriggerRiskAnalysisPayload is the payload type of the risk service triggerRiskAnalysis method.
type UpdateRiskPolicyPayload ¶
type UpdateRiskPolicyPayload struct {
ApikeyToken *string
SessionToken *string
ProjectSlugInput *string
// The policy ID.
ID string
// The policy name.
Name string
// Detection sources to enable.
Sources []string
// Presidio entity types to detect.
PresidioEntities []string
// Prompt-injection detection rule ids to enable in addition to the heuristic
// baseline (e.g. 'deberta-v3-classifier').
PromptInjectionRules []string
// Whether the policy is active.
Enabled *bool
// Policy action: flag or block.
Action *string
// Whether the policy name should be auto-generated.
AutoName *bool
// Optional message shown to end users when this policy blocks an action or
// surfaces a flagged finding. Send an empty string to clear.
UserMessage *string
}
UpdateRiskPolicyPayload is the payload type of the risk service updateRiskPolicy method.