cargo

package
v0.72.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorSpecNotFound

func ErrorSpecNotFound(name string) error

Types

type CompiledPackage

type CompiledPackage struct {
	Name     string `yaml:"name"`
	Stemcell string `yaml:"stemcell"`
}

type ComponentLock

type ComponentLock struct {
	Name    string `yaml:"name"`
	SHA1    string `yaml:"sha1"`
	Version string `yaml:"version,omitempty"`

	StemcellOS      string `yaml:"-"`
	StemcellVersion string `yaml:"-"`

	RemoteSource string `yaml:"remote_source"`
	RemotePath   string `yaml:"remote_path"`
}

ComponentLock represents an exact build of a bosh release It may identify the where the release is cached; it may identify the stemcell used to compile the release.

All fields must be comparable because this struct may be used as a key type in a map. Don't add array or map fields.

func (ComponentLock) ParseVersion

func (lock ComponentLock) ParseVersion() (*semver.Version, error)

func (ComponentLock) ReleaseSlug

func (lock ComponentLock) ReleaseSlug() boshdir.ReleaseSlug

func (ComponentLock) Spec

func (lock ComponentLock) Spec() ComponentSpec

func (ComponentLock) StemcellSlug

func (lock ComponentLock) StemcellSlug() boshdir.OSVersionSlug

func (ComponentLock) String

func (lock ComponentLock) String() string

func (ComponentLock) UnsetStemcell

func (lock ComponentLock) UnsetStemcell() ComponentLock

func (ComponentLock) WithRemote

func (lock ComponentLock) WithRemote(source, path string) ComponentLock

func (ComponentLock) WithSHA1

func (lock ComponentLock) WithSHA1(sum string) ComponentLock

type ComponentSpec

type ComponentSpec struct {
	// Name is a required field and must be set with the bosh release name
	Name string `yaml:"name"`

	// Version if not set, it will default to ">0".
	// See https://github.com/Masterminds/semver for syntax
	Version string `yaml:"version,omitempty"`

	// StemcellOS may be set when a specifying a component
	// compiled with a particular stemcell. Usually you should
	// also set StemcellVersion when setting this field.
	StemcellOS string `yaml:"os,omitempty"`

	// StemcellVersion may be set when a specifying a component
	// compiled with a particular stemcell. Usually you should
	// also set StemcellOS when setting this field.
	StemcellVersion string `yaml:"stemcell_version,omitempty"`

	// GitHubRepository are where the BOSH release source code is
	GitHubRepository string `yaml:"github_repository,omitempty"`
}

func (ComponentSpec) Lock

func (spec ComponentSpec) Lock() ComponentLock

func (ComponentSpec) OSVersionSlug

func (spec ComponentSpec) OSVersionSlug() boshdir.OSVersionSlug

func (ComponentSpec) ReleaseSlug

func (spec ComponentSpec) ReleaseSlug() boshdir.ReleaseSlug

func (ComponentSpec) UnsetStemcell

func (spec ComponentSpec) UnsetStemcell() ComponentSpec

func (ComponentSpec) VersionConstraints

func (spec ComponentSpec) VersionConstraints() (*semver.Constraints, error)

type ConfigFileError

type ConfigFileError struct {
	HumanReadableConfigFileName string
	// contains filtered or unexported fields
}

func (ConfigFileError) Error

func (err ConfigFileError) Error() string

func (ConfigFileError) Unwrap

func (err ConfigFileError) Unwrap() error

type Generator

type Generator struct{}

func NewGenerator

func NewGenerator() Generator

func (Generator) Execute

func (g Generator) Execute(template proofing.ProductTemplate, config OpsManagerConfig) Manifest

type InstanceGroup

type InstanceGroup struct {
	Name       string             `yaml:"name"`
	AZs        []string           `yaml:"azs"`
	Lifecycle  string             `yaml:"lifecycle"`
	Stemcell   string             `yaml:"stemcell"`
	Instances  int                `yaml:"instances"`
	Jobs       []InstanceGroupJob `yaml:"jobs"`
	Properties interface{}        `yaml:"properties"`
}

type InstanceGroupJob

type InstanceGroupJob struct {
	Name       string      `yaml:"name"`
	Release    string      `yaml:"release"`
	Provides   interface{} `yaml:"provides"`
	Consumes   interface{} `yaml:"consumes"`
	Properties interface{} `yaml:"properties"`
}

type Kilnfile

type Kilnfile struct {
	ReleaseSources  []ReleaseSourceConfig `yaml:"release_sources,omitempty"`
	Slug            string                `yaml:"slug,omitempty"`
	PreGaUserGroups []string              `yaml:"pre_ga_user_groups,omitempty"`
	Releases        []ComponentSpec       `yaml:"releases,omitempty"`
	TileNames       []string              `yaml:"tile_names,omitempty"`
	Stemcell        Stemcell              `yaml:"stemcell_criteria,omitempty"`
}

func InterpolateAndParseKilnfile

func InterpolateAndParseKilnfile(in io.Reader, templateVariables map[string]interface{}) (Kilnfile, error)

func (Kilnfile) ComponentSpec

func (kf Kilnfile) ComponentSpec(name string) (ComponentSpec, bool)

type KilnfileLoader

type KilnfileLoader struct{}

func (KilnfileLoader) LoadKilnfiles

func (k KilnfileLoader) LoadKilnfiles(fs billy.Filesystem, kilnfilePath string, variablesFiles, variables []string) (Kilnfile, KilnfileLock, error)

func (KilnfileLoader) SaveKilnfileLock

func (KilnfileLoader) SaveKilnfileLock(fs billy.Filesystem, kilnfilePath string, updatedKilnfileLock KilnfileLock) error

type KilnfileLock

type KilnfileLock struct {
	Releases []ComponentLock `yaml:"releases"`
	Stemcell Stemcell        `yaml:"stemcell_criteria"`
}

func (KilnfileLock) FindReleaseWithName

func (k KilnfileLock) FindReleaseWithName(name string) (ComponentLock, error)

func (KilnfileLock) UpdateReleaseLockWithName

func (k KilnfileLock) UpdateReleaseLockWithName(name string, lock ComponentLock) error

type Manifest

type Manifest struct {
	Name           string          `yaml:"name"`
	Releases       []Release       `yaml:"releases"`
	Stemcells      []Stemcell      `yaml:"stemcells"`
	Update         Update          `yaml:"update"`
	Variables      []Variable      `yaml:"variables"`
	InstanceGroups []InstanceGroup `yaml:"instance_groups"`
}

type OpsManagerConfig

type OpsManagerConfig struct {
	DeploymentName    string
	AvailabilityZones []string
	Stemcells         []opsman.Stemcell
	ResourceConfigs   []opsman.ResourceConfig
}

type Release

type Release struct {
	Name    string `yaml:"name"`
	SHA1    string `yaml:"sha1"`
	Version string `yaml:"version"`
}

type ReleaseManifest

type ReleaseManifest struct {
	CompiledPackages []CompiledPackage `yaml:"compiled_packages"`
	Name             string            `yaml:"name"`
	Version          string            `yaml:"version"`
}

type ReleaseSourceConfig

type ReleaseSourceConfig struct {
	Type            string `yaml:"type,omitempty"`
	ID              string `yaml:"id,omitempty"`
	Publishable     bool   `yaml:"publishable,omitempty"`
	Bucket          string `yaml:"bucket,omitempty"`
	Region          string `yaml:"region,omitempty"`
	AccessKeyId     string `yaml:"access_key_id,omitempty"`
	SecretAccessKey string `yaml:"secret_access_key,omitempty"`
	PathTemplate    string `yaml:"path_template,omitempty"`
	Endpoint        string `yaml:"endpoint,omitempty"`
	Org             string `yaml:"org,omitempty"`
	GithubToken     string `yaml:"github_token,omitempty"`
	Repo            string `yaml:"repo,omitempty"`
	ArtifactoryHost string `yaml:"artifactory_host,omitempty"`
	Username        string `yaml:"username,omitempty"`
	Password        string `yaml:"password,omitempty"`
}

type Stemcell

type Stemcell struct {
	Alias   string `yaml:"alias,omitempty"`
	OS      string `yaml:"os"`
	Version string `yaml:"version"`
}

type Update

type Update struct {
	Canaries        int    `yaml:"canaries"`
	CanaryWatchTime string `yaml:"canary_watch_time"`
	UpdateWatchTime string `yaml:"update_watch_time"`
	MaxInFlight     int    `yaml:"max_in_flight"`
	MaxErrors       int    `yaml:"max_errors"`
	Serial          bool   `yaml:"serial"`
}

type Variable

type Variable struct {
	Name    string      `yaml:"name"`
	Options interface{} `yaml:"options"`
	Type    string      `yaml:"type"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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