manifest

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Input

type Input struct {
	Pos model.ConfigPos

	// The name of the template input, e.g. "my_service_account"
	Name model.String `yaml:"name"`
	// The value of the template input, e.g. "foo@iam.gserviceaccount.com".
	Value model.String `yaml:"value"`
}

Input is a YAML object representing an input value that was provided to the template when it was rendered.

func (*Input) UnmarshalYAML

func (i *Input) UnmarshalYAML(n *yaml.Node) error

UnmarshalYAML implements yaml.Unmarshaler.

func (*Input) Validate

func (i *Input) Validate() error

Validate() implements model.Validator.

type Manifest

type Manifest struct {
	Pos model.ConfigPos `yaml:"-"`

	// The template source address as passed to `abc templates render`.
	TemplateLocation model.String `yaml:"template_location"`

	// The dirhash (https://pkg.go.dev/golang.org/x/mod/sumdb/dirhash) of the
	// template source tree (not the output). This shows exactly what version of
	// the template was installed.
	TemplateDirhash model.String `yaml:"template_dirhash"`

	// The input values that were supplied by the user when rendering the template.
	Inputs []*Input `yaml:"inputs"`

	// The hash of each output file created by the template.
	OutputHashes []*OutputHash `yaml:"output_hashes"`
}

Manifest represents the contents of a manifest file. A manifest file is the set of all information that is needed to cleanly upgrade to a new template version in the future.

func (*Manifest) UnmarshalYAML

func (m *Manifest) UnmarshalYAML(n *yaml.Node) error

UnmarshalYAML implements yaml.Unmarshaler.

func (*Manifest) Upgrade

func (m *Manifest) Upgrade(ctx context.Context) (model.ValidatorUpgrader, error)

Upgrade implements model.ValidatorUpgrader.

func (*Manifest) Validate

func (m *Manifest) Validate() error

Validate() implements model.Validator.

type OutputHash

type OutputHash struct {
	Pos model.ConfigPos

	// The path, relative to the destination directory, of this file.
	File model.String `yaml:"file"`
	// The dirhash-style hash (see https://pkg.go.dev/golang.org/x/mod/sumdb/dirhash)
	// of this file. The format looks like "h1:0a1b2c3d...".
	Hash model.String `yaml:"hash"`
}

OutputHash records a checksum of a single file as it was created during template rendering.

func (*OutputHash) UnmarshalYAML

func (f *OutputHash) UnmarshalYAML(n *yaml.Node) error

UnmarshalYAML implements yaml.Unmarshaler.

func (*OutputHash) Validate

func (f *OutputHash) Validate() error

Validate() implements model.Validator.

Jump to

Keyboard shortcuts

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