package
0.0.0-20250312152250-ea85ec9d2454
Repository: https://github.com/snapcore/snapd.git
Documentation: pkg.go.dev
# Packages
The errors package defines common error types which are used across the prompting subsystems, along with constructors for specific errors based on those broader types.
Package patterns provides types and functions for working with path patterns for request rules related to AppArmor Prompting.
Package requestrules provides support for holding outstanding request prompts for AppArmor prompting.
Package requestrules provides support for storing request rules for AppArmor prompting.
# Functions
AbstractPermissionsFromAppArmorPermissions returns the list of permissions corresponding to the given AppArmor permissions for the given interface.
AbstractPermissionsToAppArmorPermissions returns AppArmor permissions corresponding to the given permissions for the given interface.
AvailablePermissions returns the list of available permissions for the given interface.
EnsureStateDir creates the state directory with appropriate permissions.
FirstLifespanGreater returns true if the first of the two given lifespan/expiration pairs supersedes the second.
No description provided by the author
StateDir returns the path to the prompting state directory.
# Constants
LifespanForever indicates that the reply/rule should never expire.
LifespanSingle indicates that a reply should only apply once, and should not be used to create a rule.
LifespanTimespan indicates that a reply/rule should apply for a given duration or until a given expiration timestamp.
LifespanUnset indicates that no lifespan was specified, and should only be used while unmarshalling lifespan fields marked as omitempty.
OutcomeAllow indicates that a corresponding request should be allowed.
OutcomeDeny indicates that a corresponding request should be denied.
OutcomeUnset indicates that no outcome was specified, and should only be used while unmarshalling outcome fields marked as omitempty.
# Variables
SupportedRuleLifespans is exported so interfaces/promptin/requestrules can use it when constructing a ErrRuleLifespanSingle.
# Structs
Constraints hold information about the applicability of a new rule to particular paths and permissions.
Metadata stores information about the origin or applicability of a prompt or rule.
PermissionEntry holds the outcome associated with a particular permission and the lifespan for which that outcome is applicable.
ReplyConstraints hold information about the applicability of a reply to particular paths and permissions.
RuleConstraints hold information about the applicability of an existing rule to particular paths and permissions.
RuleConstraintsPatch hold partial rule contents which will be used to modify an existing rule.
RulePermissionEntry holds the outcome associated with a particular permission and the lifespan for which that outcome is applicable.
# Type aliases
No description provided by the author
LifespanType describes the temporal scope for which a reply or rule applies.
OutcomeType describes the outcome associated with a reply or rule.
PermissionMap is a map from permissions to their corresponding entries, which contain information about the outcome and lifespan for those permissions.
RulePermissionMap is a map from permissions to their corresponding entries, which contain information about the outcome and lifespan for those permissions.