Documentation
¶
Index ¶
- func BrokerFrom(ctx context.Context) (capspermission.Broker, bool)
- func Cancelled(req capspermission.Request, reason string) capspermission.Result
- func CapabilityFrom(ctx context.Context) capspermission.Capability
- func DecodeReply(raw json.RawMessage) (capspermission.Reply, error)
- func EffectiveTimeout(req capspermission.Request, cap capspermission.Capability) time.Duration
- func MarshalReply(reply capspermission.Reply) json.RawMessage
- func MatchAllowDeny(reply capspermission.Reply) capspermission.AllowDenyMatch
- func MatchReply(reply capspermission.Reply, q capspermission.Question) capspermission.QuestionResult
- func NoHuman(req capspermission.Request, reason string) capspermission.Result
- func Superseded(req capspermission.Request, reason string) capspermission.Result
- func TimedOut(req capspermission.Request) capspermission.Result
- func UnrecognizedAllowDenyReason(reply capspermission.Reply) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BrokerFrom ¶
func BrokerFrom(ctx context.Context) (capspermission.Broker, bool)
func Cancelled ¶
func Cancelled(req capspermission.Request, reason string) capspermission.Result
func CapabilityFrom ¶
func CapabilityFrom(ctx context.Context) capspermission.Capability
func DecodeReply ¶
func DecodeReply(raw json.RawMessage) (capspermission.Reply, error)
func EffectiveTimeout ¶
func EffectiveTimeout(req capspermission.Request, cap capspermission.Capability) time.Duration
EffectiveTimeout resolves the wait limit for an interactive permission request.
func MarshalReply ¶
func MarshalReply(reply capspermission.Reply) json.RawMessage
func MatchAllowDeny ¶
func MatchAllowDeny(reply capspermission.Reply) capspermission.AllowDenyMatch
MatchAllowDeny parses a KindAllowDeny reply. Decision takes precedence; Text is a CLI fallback when Decision is empty.
func MatchReply ¶
func MatchReply(reply capspermission.Reply, q capspermission.Question) capspermission.QuestionResult
MatchReply resolves a KindQuestion reply against a question. Uses Selected and Text only; Decision is ignored.
func NoHuman ¶
func NoHuman(req capspermission.Request, reason string) capspermission.Result
func Superseded ¶
func Superseded(req capspermission.Request, reason string) capspermission.Result
func TimedOut ¶
func TimedOut(req capspermission.Request) capspermission.Result
func UnrecognizedAllowDenyReason ¶
func UnrecognizedAllowDenyReason(reply capspermission.Reply) string
UnrecognizedAllowDenyReason formats a reason for an unrecognized allow/deny reply.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.