manifest

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 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

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

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

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 for providers, HashicorpUrlTemplate is used
	// If non is specified for tofu, TofuURLTemplate is used
	// https://github.com/cloudfoundry/cloud-service-broker/pull/975/commits/d1bf775bebf46a5685a3f05524e0977f4ac0cd99
	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

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