manifest

package
v0.19.10 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: 8 Imported by: 0

Documentation

Overview

Package manifest is the data model for a manifest file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binary added in v0.10.0

type Binary struct {
	Name        string
	Version     string
	Source      string
	URLTemplate string
}

type Manifest

type Manifest struct {
	PackVersion                        int
	Name                               string
	Version                            string
	Metadata                           map[string]string
	Platforms                          []platform.Platform
	TerraformVersions                  []TerraformVersion
	TerraformProviders                 []TerraformProvider
	Binaries                           []Binary
	ServiceDefinitions                 []string
	Parameters                         []Parameter
	RequiredEnvVars                    []string
	EnvConfigMapping                   map[string]string
	TerraformUpgradePath               []*version.Version
	TerraformStateProviderReplacements map[string]string
}

Manifest is the internal model for the brokerpak manifest

func Parse

func Parse(input []byte) (*Manifest, error)

func (*Manifest) AppliesToCurrentPlatform

func (m *Manifest) AppliesToCurrentPlatform() bool

AppliesToCurrentPlatform returns true if the one of the platforms in the manifest match the current GOOS and GOARCH.

func (*Manifest) DefaultTerraformVersion

func (m *Manifest) DefaultTerraformVersion() (*version.Version, error)

func (*Manifest) Serialize added in v0.10.0

func (m *Manifest) Serialize() ([]byte, error)

type Parameter

type Parameter struct {
	Name        string `yaml:"name"`
	Description string `yaml:"description"`
}

func (*Parameter) Validate

func (param *Parameter) Validate() (errs *validation.FieldError)

Validate implements validation.Validatable.

type TerraformProvider added in v0.10.0

type TerraformProvider struct {
	Name        string
	Version     *version.Version
	Source      string
	Provider    tfproviderfqn.TfProviderFQN
	URLTemplate string
}

type TerraformResource

type TerraformResource struct {
	// Name holds the name of this resource. e.g. terraform-provider-google-beta
	Name string `yaml:"name"`

	// Version holds the version of the resource e.g. 1.19.0
	Version string `yaml:"version"`

	// Source holds the URI of an archive that contains the source code for this release.
	Source string `yaml:"source"`

	// Provider holds path to extract the provider path.
	Provider string `yaml:"provider,omitempty"`

	// URLTemplate holds a custom URL template to get the release of the given tool.
	// Parameters available are ${name}, ${version}, ${os}, and ${arch}.
	// If non is specified HashicorpUrlTemplate is used.
	URLTemplate string `yaml:"url_template,omitempty"`

	// Default is used to mark the default Terraform version when there is more than one
	Default bool `yaml:"default,omitempty"`
}

type TerraformUpgradePath

type TerraformUpgradePath struct {
	Version string `yaml:"version"`
}

type TerraformVersion added in v0.10.0

type TerraformVersion struct {
	Version     *version.Version
	Default     bool
	Source      string
	URLTemplate string
}

Jump to

Keyboard shortcuts

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