release

package
v0.0.0-...-e2c346a Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2015 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJobReader

func NewJobReader(
	archivePath string,
	extractedJobPath string,
	extractor boshcmd.Compressor,
	fs boshsys.FileSystem,
) *jobReader

func NewPackageRepo

func NewPackageRepo() *packageRepo

func NewReader

func NewReader(
	tarFilePath string,
	extractedReleasePath string,
	fs boshsys.FileSystem,
	extractor boshcmd.Compressor,
) *reader

Types

type Extractor

type Extractor interface {
	Extract(releaseTarballPath string) (Release, error)
}

func NewExtractor

func NewExtractor(
	fs boshsys.FileSystem,
	compressor boshcmd.Compressor,
	validator Validator,
	logger boshlog.Logger,
) Extractor

type Job

type Job struct {
	Name          string
	Fingerprint   string
	SHA1          string
	ExtractedPath string
	Templates     map[string]string
	PackageNames  []string
	Packages      []*Package
	Properties    map[string]PropertyDefinition
}

func (Job) FindTemplateByValue

func (j Job) FindTemplateByValue(value string) (string, bool)

type JobManifest

type JobManifest struct {
	Name       string                        `yaml:"name"`
	Templates  map[string]string             `yaml:"templates"`
	Packages   []string                      `yaml:"packages"`
	Properties map[string]PropertyDefinition `yaml:"properties"`
}

type JobReader

type JobReader interface {
	Read() (Job, error)
}

type Manager

type Manager interface {
	Add(Release)
	List() []Release
	FindByName(name string) (releases []Release, found bool)
	Find(name, version string) (release Release, found bool)
	DeleteAll() error
}

func NewManager

func NewManager(
	logger boshlog.Logger,
) Manager

type Package

type Package struct {
	Name          string
	Fingerprint   string
	SHA1          string
	Dependencies  []*Package
	ExtractedPath string
}

func (Package) String

func (p Package) String() string

type PropertyDefinition

type PropertyDefinition struct {
	Description string      `yaml:"description"`
	RawDefault  interface{} `yaml:"default"`
}

func (PropertyDefinition) Default

func (d PropertyDefinition) Default() (interface{}, error)

type Reader

type Reader interface {
	Read() (Release, error)
}

type Release

type Release interface {
	Name() string
	Version() string
	Jobs() []Job
	Packages() []*Package
	FindJobByName(jobName string) (job Job, found bool)
	Delete() error
	Exists() bool
}

func NewRelease

func NewRelease(
	name string,
	version string,
	jobs []Job,
	packages []*Package,
	extractedPath string,
	fs boshsys.FileSystem,
) Release

type Validator

type Validator interface {
	Validate(release Release) error
}

func NewValidator

func NewValidator(fs boshsys.FileSystem) Validator

Directories

Path Synopsis
set

Jump to

Keyboard shortcuts

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