permission

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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

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 UnrecognizedAllowDenyReason

func UnrecognizedAllowDenyReason(reply capspermission.Reply) string

UnrecognizedAllowDenyReason formats a reason for an unrecognized allow/deny reply.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL