boshupdate

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 20 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDirector

func NewDirector(config BoshConfig) (director.Director, error)

NewDirector -

Types

type BoshConfig

type BoshConfig struct {
	URL          string   `yaml:"url"`
	LogLevel     string   `yaml:"log_level"`
	CaCert       string   `yaml:"ca_cert"`
	Username     string   `yaml:"username"`
	Password     string   `yaml:"password"`
	ClientID     string   `yaml:"client_id"`
	ClientSecret string   `yaml:"client_secret"`
	Excludes     []string `yaml:"excludes"`
	Proxy        string   `yaml:"proxy"`
}

BoshConfig -

func (*BoshConfig) IsExcluded

func (c *BoshConfig) IsExcluded(name string) bool

IsExcluded - Tells if name is matching one of configured exclude filters

type BoshDeploymentData

type BoshDeploymentData struct {
	Deployment   string        `yaml:"deployment"`
	ManifestName string        `yaml:"manifest"`
	Ref          string        `yaml:"current"`
	HasError     bool          `yaml:"has_error"`
	BoshReleases []BoshRelease `yaml:"bosh_releases"`
}

BoshDeploymentData -

type BoshManifest

type BoshManifest struct {
	Releases []BoshRelease `yaml:"releases"`
}

BoshManifest -

type BoshRelease

type BoshRelease struct {
	Name    string `yaml:"name"`
	URL     string `yaml:"url"`
	Version string `yaml:"version"`
}

BoshRelease -

type Config

type Config struct {
	Log    LogConfig    `yaml:"log"`
	Bosh   BoshConfig   `yaml:"bosh"`
	Github GithubConfig `yaml:"github"`
}

Config -

func NewConfig

func NewConfig(file io.Reader) *Config

NewConfig - Creates and validates config from given reader

func (*Config) Validate

func (c *Config) Validate() error

Validate - Validate configuration object

type Formatter

type Formatter struct {
	Match   string `yaml:"match"`
	Replace string `yaml:"replace"`
}

Formatter -

func (*Formatter) DoesMatch added in v0.5.0

func (s *Formatter) DoesMatch(ref string) bool

Match -

func (*Formatter) Format

func (s *Formatter) Format(ref string) string

Format - Format input string according to Match regexp and Replace directive

type GenericReleaseConfig

type GenericReleaseConfig struct {
	Owner  string     `yaml:"owner"`
	Repo   string     `yaml:"repo"`
	Types  []string   `yaml:"types"`
	Format *Formatter `yaml:"format"`
}

GenericReleaseConfig -

func (*GenericReleaseConfig) HasType

func (c *GenericReleaseConfig) HasType(name string) bool

HasType -

type GenericReleaseData

type GenericReleaseData struct {
	GenericReleaseConfig `yaml:",inline"`
	HasError             bool      `yaml:"has-error"`
	Versions             []Version `yaml:"versions"`
	LatestVersion        Version   `yaml:"latest"`
	Name                 string    `yaml:"name"`
}

GenericReleaseData -

func NewGenericReleaseData

func NewGenericReleaseData(config GenericReleaseConfig, name string) GenericReleaseData

NewGenericReleaseData -

type GithubConfig

type GithubConfig struct {
	UpdateInterval   string                            `yaml:"update_interval"`
	Token            string                            `yaml:"token"`
	ManifestReleases map[string]*ManifestReleaseConfig `yaml:"manifest_releases"`
	GenericReleases  map[string]*GenericReleaseConfig  `yaml:"generic_releases"`
}

GithubConfig -

type GithubRef

type GithubRef struct {
	Ref  string
	Time int64
}

GithubRef -

type LogConfig

type LogConfig struct {
	JSON  bool   `yaml:"json"`
	Level string `yaml:"level"`
}

LogConfig -

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager -

func NewManager

func NewManager(config Config) (*Manager, error)

NewManager -

func (*Manager) GetBoshDeployments

func (a *Manager) GetBoshDeployments() ([]BoshDeploymentData, error)

GetBoshDeployments -

func (*Manager) GetGenericReleases

func (a *Manager) GetGenericReleases() []GenericReleaseData

GetGenericReleases -

func (*Manager) GetManifestReleases

func (a *Manager) GetManifestReleases() []ManifestReleaseData

GetManifestReleases -

func (*Manager) RenderManifest

func (a *Manager) RenderManifest(manifest []byte, item ManifestReleaseData) ([]byte, error)

RenderManifest -

type ManifestReleaseConfig

type ManifestReleaseConfig struct {
	GenericReleaseConfig `yaml:",inline"`
	Manifest             string   `yaml:"manifest"`
	Ops                  []string `yaml:"ops"`
	Vars                 []string `yaml:"vars"`
	Matchers             []string `yaml:"matchers"`
}

ManifestReleaseConfig -

func (*ManifestReleaseConfig) Match

func (c *ManifestReleaseConfig) Match(name string) bool

type ManifestReleaseData

type ManifestReleaseData struct {
	ManifestReleaseConfig `yaml:",inline"`
	HasError              bool          `yaml:"has-error"`
	Name                  string        `yaml:"name"`
	Versions              []Version     `yaml:"versions"`
	LatestVersion         Version       `yaml:"latest"`
	BoshReleases          []BoshRelease `yaml:"bosh_releases"`
}

ManifestReleaseData -

func NewManifestReleaseData

func NewManifestReleaseData(config ManifestReleaseConfig, name string) ManifestReleaseData

NewManifestReleaseData -

type Version

type Version struct {
	GitRef       string `yaml:"gitref"`
	Version      string `yaml:"version"`
	Time         int64  `yaml:"time"`
	ExpiredSince int64  `yaml:"expired_since"`
}

Version -

func NewVersion

func NewVersion(gitref string, version string, timestamp int64) Version

func (Version) GetStatus

func (r Version) GetStatus(latest Version) string

GetStatus -

Jump to

Keyboard shortcuts

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