model

package
v0.0.0-...-afffe8a Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	Name        string
	Description string
	Templates   []*JobTemplate
	Packages    Packages
	Path        string
	Fingerprint string
	SHA1        string
	Properties  []*JobProperty
	Version     string
	Release     *Release
	// contains filtered or unexported fields
}

Job represents a BOSH job

func (*Job) Extract

func (j *Job) Extract(destination string) (string, error)

Extract will extract the contents of the job archive to destination It creates a directory with the name of the job Returns the full path of the extracted archive

func (*Job) ValidateSHA1

func (j *Job) ValidateSHA1() error

ValidateSHA1 validates that the SHA1 of the actual job archive is the same as the one from the release manifest

type JobProperty

type JobProperty struct {
	Name        string
	Description string
	Default     interface{}
	Job         *Job
}

JobProperty is a generic key-value property referenced by a job

type JobTemplate

type JobTemplate struct {
	SourcePath      string
	DestinationPath string
	Job             *Job
	Content         string
}

JobTemplate represents a BOSH job template

type Jobs

type Jobs []*Job

Jobs is an array of Job*

func (Jobs) Len

func (slice Jobs) Len() int

Len implements the Len function to satisfy sort.Interface

func (Jobs) Less

func (slice Jobs) Less(i, j int) bool

Less implements the Less function to satisfy sort.Interface

func (Jobs) Swap

func (slice Jobs) Swap(i, j int)

Swap implements the Swap function to satisfy sort.Interface

type Package

type Package struct {
	Name         string
	Version      string
	Fingerprint  string
	SHA1         string
	Release      *Release
	Path         string
	Dependencies Packages
	// contains filtered or unexported fields
}

Package represents a BOSH package

func (*Package) Extract

func (p *Package) Extract(destination string) (string, error)

Extract will extract the contents of the package archive to destination It creates a directory with the name of the package Returns the full path of the extracted archive

func (*Package) ValidateSHA1

func (p *Package) ValidateSHA1() error

ValidateSHA1 validates that the SHA1 of the actual package archive is the same as the one from the release manifest

type Packages

type Packages []*Package

Packages is an array of *Package

func (Packages) Len

func (slice Packages) Len() int

Len implements the Len function to satisfy sort.Interface

func (Packages) Less

func (slice Packages) Less(i, j int) bool

Less implements the Less function to satisfy sort.Interface

func (Packages) Swap

func (slice Packages) Swap(i, j int)

Swap implements the Swap function to satisfy sort.Interface

type Release

type Release struct {
	Jobs               Jobs
	Packages           Packages
	License            ReleaseLicense
	Name               string
	UncommittedChanges bool
	CommitHash         string
	Version            string
	Path               string
	DevBOSHCacheDir    string
	// contains filtered or unexported fields
}

Release represents a BOSH release

func NewDevRelease

func NewDevRelease(path, releaseName, version, boshCacheDir string) (*Release, error)

NewDevRelease will create an instance of a BOSH development release

func (*Release) GetUniqueConfigs

func (r *Release) GetUniqueConfigs() map[string]*ReleaseConfig

GetUniqueConfigs returns all unique configs available in a release

func (*Release) LookupJob

func (r *Release) LookupJob(jobName string) (*Job, error)

LookupJob will find a job within a BOSH release

func (*Release) LookupPackage

func (r *Release) LookupPackage(packageName string) (*Package, error)

LookupPackage will find a package within a BOSH release

type ReleaseConfig

type ReleaseConfig struct {
	Name        string
	Description string
	Jobs        Jobs
	UsageCount  int
}

ReleaseConfig is a global deployment configuration key

type ReleaseLicense

type ReleaseLicense struct {
	// Files is a mapping of license file names to contents
	Files map[string][]byte
	// Release this license belongs to
	Release *Release
}

ReleaseLicense represents the license of a BOSH release

type Role

type Role struct {
	Name              string         `yaml:"name"`
	Jobs              Jobs           `yaml:"_,omitempty"`
	EnvironScripts    []string       `yaml:"environment_scripts"`
	Scripts           []string       `yaml:"scripts"`
	PostConfigScripts []string       `yaml:"post_config_scripts"`
	Type              string         `yaml:"type,omitempty"`
	JobNameList       []*roleJob     `yaml:"jobs"`
	Configuration     *configuration `yaml:"configuration"`
	// contains filtered or unexported fields
}

Role represents a collection of jobs that are colocated on a container

func (*Role) GetRoleDevVersion

func (r *Role) GetRoleDevVersion() string

GetRoleDevVersion gets the aggregate signature of all jobs and packages

func (*Role) GetScriptPaths

func (r *Role) GetScriptPaths() map[string]string

GetScriptPaths returns the paths to the startup / post configgin scripts for a role

type RoleManifest

type RoleManifest struct {
	Roles         []*Role        `yaml:"roles"`
	Configuration *configuration `yaml:"configuration"`
	// contains filtered or unexported fields
}

RoleManifest represents a collection of roles

func LoadRoleManifest

func LoadRoleManifest(manifestFilePath string, releases []*Release) (*RoleManifest, error)

LoadRoleManifest loads a yaml manifest that details how jobs get grouped into roles

Jump to

Keyboard shortcuts

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