config

package
v0.0.0-...-916e759 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("No local repository")

ErrNotFound indicates no local repository could be found.

Functions

This section is empty.

Types

type Configfile

type Configfile struct {

	// Repos points to the repository configuration
	Repos     *Repos     `yaml:"repos"`
	Workspace *Workspace `yaml:"workspace"`
	// contains filtered or unexported fields
}

Configfile is the top-level conifguration object for Helm.

func Load

func Load(filename string) (*Configfile, error)

Load loads a configuration by filename.

func Parse

func Parse(data []byte) (*Configfile, error)

Parse parses a byte slice into a *Configfile.

func (*Configfile) Save

func (c *Configfile) Save(filename string) error

Save writes the Configfile as YAML into the named file.

type Repos

type Repos struct {
	// Dir points to the directory where the Git repositories are stored.
	// Currently we do not expose this as a changeable option, but we may
	// choose to in the future.
	Dir string `yaml:"-"`
	// Default is the local name of the default repository.
	Default string `yaml:"default"`
	// Tables is a list of table items.
	Tables []*Table `yaml:"tables"`
}

Repos describes a collection of repository (table) mappings.

func (*Repos) Add

func (r *Repos) Add(name, repo string) error

Add adds the named remote and then fetches it.

func (*Repos) Delete

func (r *Repos) Delete(name string) error

Delete removes a local copy of a remote.

This destroys the on-disk cache and removes the entry from the YAML file.

func (*Repos) Exists

func (r *Repos) Exists(name string) bool

Exists checks if a repo exists by name

func (*Repos) RepoChart

func (r *Repos) RepoChart(name string) (string, string)

RepoChart takes a fully qualified name and returns a repo name and a chart name.

If no repo name is present in the fully qualified name, the default repo is returned.

func (*Repos) Update

func (r *Repos) Update(name string) error

Update performs an update of the local copy.

This does a Git fast-forward pull from the remote repo.

func (*Repos) UpdateAll

func (r *Repos) UpdateAll() error

UpdateAll does a git fast-forward pull from each remote repo.

type Table

type Table struct {
	// Name is the local name of the repository.
	Name string `yaml:"name"`
	// Repo is the remote Git URL to the repository.
	Repo string `yaml:"repo"`
}

Table describes a single table entry.

type Workspace

type Workspace struct {
	// Dir indicates where the workspace is.
	// Currently, this is not exposed via configuration.
	Dir string `yaml:"-"`
}

Workspace describes a workspace location and configuration.

Jump to

Keyboard shortcuts

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