policy

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package policy implements the declaration based policy checks for connecting or permitting installation of sdks based on their slots and plugs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckInterfaces

func CheckInterfaces(sdkInfo *sdk.Info) error

CheckInterfaces checks whether plugs and slots of sdk are allowed for installation.

Types

type ConnectCandidate

type ConnectCandidate struct {
	Plug            *interfaces.ConnectedPlug
	Slot            *interfaces.ConnectedSlot
	BaseDeclaration *asserts.BaseDeclaration
}

ConnectCandidate represents a candidate connection.

func (*ConnectCandidate) Check

func (connc *ConnectCandidate) Check() (interfaces.SideArity, 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) (any, error)

func (*ConnectCandidate) SlotAttr

func (connc *ConnectCandidate) SlotAttr(arg string) (any, error)

type InstallCandidate

type InstallCandidate struct {
	Sdk             *sdk.Info
	BaseDeclaration *asserts.BaseDeclaration
}

InstallCandidate represents a candidate SDK for installation.

func (*InstallCandidate) Check

func (ic *InstallCandidate) Check() error

Check checks whether the installation is allowed.

Jump to

Keyboard shortcuts

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