internal

package
v0.0.0-...-b21f90c Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package internal (of seed) provides types and helpers used internally by both seed and seed/seedwriter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeSystemSnap

func MakeSystemSnap(snapName string, defaultChannel string, modes []string) *asserts.ModelSnap

Types

type AuxInfo20

type AuxInfo20 struct {
	Private bool                `json:"private,omitempty"`
	Links   map[string][]string `json:"links,omitempty"`
	Contact string              `json:"contact,omitempty"`
}

AuxInfo20 is an entry in the per-snap-id map that is aux-json

type Component20

type Component20 struct {
	// Name is the component name
	Name string `yaml:"name"`
	// Unasserted has the filename for an unasserted local component
	Unasserted string `yaml:"unasserted,omitempty"`
}

Component20 contains the options for components for grade: dangerous.

type Options20

type Options20 struct {
	Snaps []*Snap20 `yaml:"snaps"`
}

func ReadOptions20

func ReadOptions20(optionsFn string) (*Options20, error)

func (*Options20) Write

func (options *Options20) Write(optionsFn string) error

type Seed16

type Seed16 struct {
	Snaps []*Snap16 `yaml:"snaps"`
}

func ReadSeedYaml

func ReadSeedYaml(fn string) (*Seed16, error)

func (*Seed16) Write

func (seed *Seed16) Write(seedFn string) error

type Snap16

type Snap16 struct {
	Name string `yaml:"name"`

	// cross-reference/audit
	SnapID string `yaml:"snap-id,omitempty"`

	// bits that are orthongonal/not in assertions
	Channel string `yaml:"channel,omitempty"`
	DevMode bool   `yaml:"devmode,omitempty"`
	Classic bool   `yaml:"classic,omitempty"`

	Private bool `yaml:"private,omitempty"`

	Contact string `yaml:"contact,omitempty"`

	// no assertions are available in the seed for this snap
	Unasserted bool `yaml:"unasserted,omitempty"`

	File string `yaml:"file"`
}

Snap16 points to a snap in the seed to install, together with assertions (or alone if unasserted is true) it will be used to drive the installation and ultimately set SideInfo/SnapState for it.

type Snap20

type Snap20 struct {
	Name string `yaml:"name"`
	// id and unasserted can be both set, in which case it only
	// cross-references the model
	SnapID string `yaml:"id,omitempty"`

	// Unasserted has the filename for an unasserted local snap
	Unasserted string `yaml:"unasserted,omitempty"`

	Channel string `yaml:"channel,omitempty"`

	// Components is a list of component options. It is only valid to add a
	// list of unasserted local components when we are using an unasserted
	// local snap.
	Components []Component20 `yaml:"components,omitempty"`
}

Snap20 carries options for a model snap or an extra snap in grade: dangerous.

func (*Snap20) ID

func (sn *Snap20) ID() string

ID implements naming.SnapRef.

func (*Snap20) SnapName

func (sn *Snap20) SnapName() string

SnapName implements naming.SnapRef.

Jump to

Keyboard shortcuts

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