Documentation
¶
Overview ¶
Package providers owns the tenant-wide LLM provider catalog: rows in the providers table, their encrypted API keys, and the lifecycle (create / list / update / delete). Mutations gate through authz.Authorize(TenantProviderManage) (admin); List gates through TenantProviderView (manager+) so anyone who can configure an agent's models can resolve provider id→name. API keys are write-once: set on create/update, encrypted at rest, and never returned to any caller.
Index ¶
- type CreateRequest
- type Result
- type Service
- func (s *Service) Create(ctx context.Context, p authz.Principal, req CreateRequest) (Result, error)
- func (s *Service) Delete(ctx context.Context, p authz.Principal, id uuid.UUID) error
- func (s *Service) List(ctx context.Context, p authz.Principal) ([]Result, error)
- func (s *Service) Update(ctx context.Context, p authz.Principal, id uuid.UUID, req UpdateRequest) (Result, error)
- type UpdateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRequest ¶
type Result ¶
Result is the persisted row. The API key is never included — it's write-once and stays encrypted at rest; the row's has-key state is derived from the ciphertext column (see convert.ProviderToProto).