Documentation
¶
Overview ¶
Package decision owns the single BrokerKit decision path used by every transport.
Index ¶
- type ActivationValidator
- type ActivationValidatorFunc
- type Options
- type Result
- type Service
- func (s *Service) ApproveToken(ctx context.Context, id, token, actor string, ref notify.MessageRef) (grants.Grant, error)
- func (s *Service) Decide(ctx context.Context, id string, action operatorv1.Action, actor string, ...) (Result, error)
- func (s *Service) DenyToken(ctx context.Context, id, token, actor string, ref notify.MessageRef) (grants.Grant, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivationValidator ¶
type ActivationValidator interface {
ValidateActivation(context.Context, grants.Grant, grants.ApprovalConstraints) error
}
ActivationValidator is the provider-owned fail-closed approval check.
type ActivationValidatorFunc ¶
ActivationValidatorFunc adapts a function to ActivationValidator.
func (ActivationValidatorFunc) ValidateActivation ¶
func (f ActivationValidatorFunc) ValidateActivation(ctx context.Context, grant grants.Grant, constraints grants.ApprovalConstraints) error
type Options ¶
type Options struct {
Store *grants.Store
Validator ActivationValidator
Broker string
Audit audit.Recorder
}
Options assembles the transport-independent decision path.
type Result ¶
type Result struct {
grants.OperatorDecisionResult
AuditExportFailed bool
}
Result is a committed revision-bound decision and its export diagnostic.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the only first-party entry point for operator decisions.
func (*Service) ApproveToken ¶
func (s *Service) ApproveToken(ctx context.Context, id, token, actor string, ref notify.MessageRef) (grants.Grant, error)
ApproveToken applies a single-use notification-channel approval through the same validator.
Click to show internal directories.
Click to hide internal directories.