Documentation
¶
Overview ¶
Package resources owns the per-user inventory and management surface for reusable connections, MCP servers, and exec endpoints.
Index ¶
- type Consumer
- type Resource
- type Service
- func (s *Service) Consumers(ctx context.Context, p authz.Principal, typ string, id uuid.UUID) ([]Consumer, error)
- func (s *Service) Delete(ctx context.Context, p authz.Principal, typ string, id uuid.UUID) error
- func (s *Service) List(ctx context.Context, p authz.Principal) ([]Resource, error)
- func (s *Service) Rename(ctx context.Context, p authz.Principal, typ string, id uuid.UUID, ...) error
- func (s *Service) Revoke(ctx context.Context, p authz.Principal, typ string, id uuid.UUID) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consumer ¶
type Consumer struct {
AgentID uuid.UUID
AgentName string
AgentSlug string
NeedType string
NeedSlug string
CanAccessAgent bool
}
Consumer identifies an agent need bound to a resource.
type Resource ¶
type Resource struct {
ID uuid.UUID
Type string // connection | mcp_server | exec_endpoint
Slug string
Name string
DisplayName string
AuthMode string
Authorized bool
AgentCount int32
Capabilities []string
CreatedAt pgtype.Timestamptz
LastUsedAt pgtype.Timestamptz
}
Resource is one resource available to the caller through ownership or a grant. It carries no secret material.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) Consumers ¶
func (s *Service) Consumers(ctx context.Context, p authz.Principal, typ string, id uuid.UUID) ([]Consumer, error)
Consumers lists every agent need bound to a resource. Resource view capability is required; agent membership is not, because the grant controls visibility of this resource-level relationship.
func (*Service) List ¶
List returns resources available through ownership or a resource grant and exposes the caller's capabilities on each one.
Click to show internal directories.
Click to hide internal directories.