repository

package
v0.1.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2018 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidPackageName is raised when a chart package cannot be found
	ErrInvalidPackageName = errors.New("invalid package name")
	// ErrRepositoryNotFound is raised when the helm repository referenced in a package link cannot be found
	ErrRepositoryNotFound = errors.New("repository not found")
)
View Source
var (
	// ErrIndexNotFound is raised when the named index does not exist
	ErrIndexNotFound = errors.New("index not found")
)

Functions

This section is empty.

Types

type Archiver

type Archiver interface {
	Archive(io.Writer) error
}

Archiver produces a compressed tar archive.

type DependencyManager

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

DependencyManager handles the downloading of chart dependencies. A chart dependency is a reference to a versioned chart within a remote repository.

To download a chart, first its repository index is downloaded and then searched to find the chart dependency URLs.

func NewDependencyManager

func NewDependencyManager(logger log.Logger, indexManager *IndexManager) *DependencyManager

NewDependencyManager returns a new dependency manager.

func (*DependencyManager) AddRepository

func (dm *DependencyManager) AddRepository(repo Repository)

AddRepository adds a local repository for resolving local dependencies.

func (*DependencyManager) Download

func (dm *DependencyManager) Download(dependencies []*chartutil.Dependency) (map[string][]byte, error)

Download fetches multiple dependencies concurrently and returns a map of the (chart name, archive data).

func (*DependencyManager) IndexManager

func (dm *DependencyManager) IndexManager() *IndexManager

IndexManager returns the index manager.

type Index

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

Index handles the indexing of charts.

func NewIndex

func NewIndex() *Index

NewIndex returns a new Index.

func (*Index) Add

func (i *Index) Add(md *chart.Metadata, urls []string, createdAt time.Time) bool

Add adds a new package to the index.

func (*Index) CompressedWriteTo

func (i *Index) CompressedWriteTo(w io.Writer) (n int64, err error)

CompressedWriteTo is the same as WriteTo but with gzip compressed data.

func (*Index) Count

func (i *Index) Count() (int, int)

Count returns the number of charts and versions indexed.

func (*Index) Get

func (i *Index) Get(name, version string) (*repo.ChartVersion, error)

Get returns the metadata of a specific chart version.

func (*Index) Unmarshal

func (i *Index) Unmarshal(data []byte) error

Unmarshal decodes a YAML serialized repository index.

func (*Index) WriteTo

func (i *Index) WriteTo(w io.Writer) (n int64, err error)

WriteTo writes out a YAML serialized representation of the Index. This data is cached so that subsequent calls won't re-serialize an index that has not changed.

type IndexDirectories

type IndexDirectories []IndexDirectory

IndexDirectories is a slice of IndexDirectory

func (IndexDirectories) Match

func (id IndexDirectories) Match(path string) bool

Match checks whether a path matches any of the index directories

type IndexDirectory

type IndexDirectory struct {
	IndexName string
	Name      string
}

IndexDirectory maps a directory to a named index

type IndexManager

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

IndexManager manages multiple indexes

func NewIndexManager

func NewIndexManager() *IndexManager

NewIndexManager returns a new IndexManager

func (*IndexManager) Create

func (m *IndexManager) Create(name string) *Index

Create creates a new named index

func (*IndexManager) Get

func (m *IndexManager) Get(name string) (*Index, error)

Get returns an instance by name

func (*IndexManager) Names

func (m *IndexManager) Names() []string

Names returns all index names assigned to the manager

type Repository

type Repository interface {
	URL() string
	Name() string
	ChartPackage(string) (Archiver, error)
	Update() error
}

Repository represents a generic repository.

func NewGitBackedRepository

func NewGitBackedRepository(logger log.Logger, dependencyManager *DependencyManager, name, url string, directories []IndexDirectory) Repository

NewGitBackedRepository returns a new git-backed based repository.

Jump to

Keyboard shortcuts

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