internal

package
v0.0.0-...-55a61f8 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: GPL-3.0 Imports: 9 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

func ValidateUC20SeedSystemLabel

func ValidateUC20SeedSystemLabel(label string) error

ValidateSeedSystemLabel checks whether the string is a valid UC20 seed system label.

Types

type AuxInfo20

type AuxInfo20 struct {
	Private bool   `json:"private,omitempty"`
	Contact string `json:"contact,omitempty"`
}

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

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"`
}

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