Documentation
¶
Overview ¶
Package policy implements the declaration based policy checks for connecting or permitting installation of snaps based on their slots and plugs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectCandidate ¶
type ConnectCandidate struct {
Plug *interfaces.ConnectedPlug
PlugSnapDeclaration *asserts.SnapDeclaration
Slot *interfaces.ConnectedSlot
SlotSnapDeclaration *asserts.SnapDeclaration
BaseDeclaration *asserts.BaseDeclaration
Model *asserts.Model
Store *asserts.Store
}
ConnectCandidate represents a candidate connection.
func (*ConnectCandidate) Check ¶
func (connc *ConnectCandidate) Check() error
Check checks whether the connection is allowed.
func (*ConnectCandidate) CheckAutoConnect ¶
func (connc *ConnectCandidate) CheckAutoConnect() (interfaces.SideArity, error)
CheckAutoConnect checks whether the connection is allowed to auto-connect.
func (*ConnectCandidate) PlugAttr ¶
func (connc *ConnectCandidate) PlugAttr(arg string) (interface{}, error)
func (*ConnectCandidate) SlotAttr ¶
func (connc *ConnectCandidate) SlotAttr(arg string) (interface{}, error)
type InstallCandidate ¶
type InstallCandidate struct {
Snap *snap.Info
SnapDeclaration *asserts.SnapDeclaration
BaseDeclaration *asserts.BaseDeclaration
Model *asserts.Model
Store *asserts.Store
}
InstallCandidate represents a candidate snap for installation.
func (*InstallCandidate) Check ¶
func (ic *InstallCandidate) Check() error
Check checks whether the installation is allowed.
type InstallCandidateMinimalCheck ¶
type InstallCandidateMinimalCheck struct {
Snap *snap.Info
BaseDeclaration *asserts.BaseDeclaration
Model *asserts.Model
Store *asserts.Store
}
InstallCandidateMinimalCheck represents a candidate snap installed with --dangerous flag that should pass minimum checks against snap type (if present). It doesn't check interface attributes.
func (*InstallCandidateMinimalCheck) Check ¶
func (ic *InstallCandidateMinimalCheck) Check() error
Check checks whether the installation is allowed.