Documentation ¶
Index ¶
- Variables
- func MergeSampleSnapYaml(snapYaml ...map[string]string) map[string]string
- func ReadAssertions(c *C, fn string) []asserts.Assertion
- func ValidateSeed(c *C, root, label string, usesSnapd bool, trusted []asserts.Assertion) seed.Seed
- func WriteAssertions(fn string, assertions ...asserts.Assertion)
- type SeedSnaps
- func (ss *SeedSnaps) AssertedSnap(snapName string) (snapFile string)
- func (ss *SeedSnaps) AssertedSnapID(snapName string) string
- func (ss *SeedSnaps) AssertedSnapInfo(snapName string) *snap.Info
- func (ss *SeedSnaps) AssertedSnapRevision(snapName string) *asserts.SnapRevision
- func (ss *SeedSnaps) MakeAssertedSnap(c *C, snapYaml string, files [][]string, revision snap.Revision, ...) (*asserts.SnapDeclaration, *asserts.SnapRevision)
- func (ss *SeedSnaps) SetSnapAssertionNow(t time.Time)
- func (ss *SeedSnaps) SetupAssertSigning(storeBrandID string)
- type TestingSeed16
- func (s *TestingSeed16) AssertsDir() string
- func (s *TestingSeed16) MakeAssertedSnap(c *C, snapYaml string, files [][]string, revision snap.Revision, ...) (snapFname string, snapDecl *asserts.SnapDeclaration, ...)
- func (s *TestingSeed16) MakeModelAssertionChain(brandID, model string, extras ...map[string]interface{}) []asserts.Assertion
- func (s *TestingSeed16) SnapsDir() string
- func (s *TestingSeed16) WriteAssertions(fn string, assertions ...asserts.Assertion)
- type TestingSeed20
Constants ¶
This section is empty.
Variables ¶
View Source
var SampleSnapYaml = map[string]string{
"core": `name: core
type: os
version: 1.0
`,
"pc-kernel": `name: pc-kernel
type: kernel
version: 1.0
`,
"pc": `name: pc
type: gadget
version: 1.0
`,
"classic-gadget": `name: classic-gadget
version: 1.0
type: gadget
`,
"required": `name: required
type: app
version: 1.0
`,
"classic-snap": `name: classic-snap
type: app
confinement: classic
version: 1.0
`,
"snapd": `name: snapd
type: snapd
version: 1.0
`,
"core18": `name: core18
type: base
version: 1.0
`,
"pc-kernel=18": `name: pc-kernel
type: kernel
version: 1.0
`,
"pc=18": `name: pc
type: gadget
base: core18
version: 1.0
`,
"classic-gadget18": `name: classic-gadget18
version: 1.0
base: core18
type: gadget
`,
"required18": `name: required18
type: app
base: core18
version: 1.0
`,
"core20": `name: core20
type: base
version: 1.0
`,
"pc-kernel=20": `name: pc-kernel
type: kernel
version: 1.0
`,
"pc=20": `name: pc
type: gadget
base: core20
version: 1.0
`,
"required20": `name: required20
type: app
base: core20
version: 1.0
`,
"optional20-a": `name: optional20-a
type: app
base: core20
version: 1.0
`,
"optional20-b": `name: optional20-b
type: app
base: core20
version: 1.0`,
"uboot-gadget=20": `name: uboot-gadget
type: gadget
base: core20
version: 1.0
`,
"arm-kernel=20": `name: arm-kernel
type: kernel
version: 1.0
`,
"test-devmode=20": `name: test-devmode
type: app
base: core20
version: 1.0
confinement: devmode
`,
}
Functions ¶
func MergeSampleSnapYaml ¶
func ReadAssertions ¶
func ValidateSeed ¶
func WriteAssertions ¶
Types ¶
type SeedSnaps ¶
type SeedSnaps struct { StoreSigning *assertstest.StoreStack Brands *assertstest.SigningAccounts // contains filtered or unexported fields }
SeedSnaps helps creating snaps for a seed.
func (*SeedSnaps) AssertedSnap ¶
func (*SeedSnaps) AssertedSnapID ¶
func (*SeedSnaps) AssertedSnapInfo ¶
func (*SeedSnaps) AssertedSnapRevision ¶
func (ss *SeedSnaps) AssertedSnapRevision(snapName string) *asserts.SnapRevision
func (*SeedSnaps) MakeAssertedSnap ¶
func (*SeedSnaps) SetSnapAssertionNow ¶
func (*SeedSnaps) SetupAssertSigning ¶
SetupAssertSigning initializes StoreSigning for storeBrandID and Brands.
type TestingSeed16 ¶
TestingSeed16 helps setting up a populated Core 16/18 testing seed.
func (*TestingSeed16) AssertsDir ¶
func (s *TestingSeed16) AssertsDir() string
func (*TestingSeed16) MakeAssertedSnap ¶
func (s *TestingSeed16) MakeAssertedSnap(c *C, snapYaml string, files [][]string, revision snap.Revision, developerID string) (snapFname string, snapDecl *asserts.SnapDeclaration, snapRev *asserts.SnapRevision)
func (*TestingSeed16) MakeModelAssertionChain ¶
func (s *TestingSeed16) MakeModelAssertionChain(brandID, model string, extras ...map[string]interface{}) []asserts.Assertion
func (*TestingSeed16) SnapsDir ¶
func (s *TestingSeed16) SnapsDir() string
func (*TestingSeed16) WriteAssertions ¶
func (s *TestingSeed16) WriteAssertions(fn string, assertions ...asserts.Assertion)
type TestingSeed20 ¶
TestingSeed20 helps setting up a populated Core 20 testing seed directory.
func (*TestingSeed20) MakeSeed ¶
func (s *TestingSeed20) MakeSeed(c *C, label, brandID, modelID string, modelHeaders map[string]interface{}, optSnaps []*seedwriter.OptionsSnap) *asserts.Model
MakeSeed creates the seed with given label and generates model assertions
func (*TestingSeed20) MakeSeedWithModel ¶
func (s *TestingSeed20) MakeSeedWithModel(c *C, label string, model *asserts.Model, optSnaps []*seedwriter.OptionsSnap)
MakeSeedWithModel creates the seed with given label for a given model
Click to show internal directories.
Click to hide internal directories.