pkg

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HelmVendorPath added in v0.13.0

func HelmVendorPath(a app.App, d Descriptor) string

HelmVendorPath returns a path for vendoring the described package.

func LocalVendorPath added in v0.13.0

func LocalVendorPath(a app.App, d Descriptor) string

LocalVendorPath returns a path for vendoring the described package.

Types

type DefaultInstallChecker added in v0.12.0

type DefaultInstallChecker struct {
	App app.App
}

DefaultInstallChecker checks if a package is installed.

func (*DefaultInstallChecker) IsInstalled added in v0.12.0

func (ic *DefaultInstallChecker) IsInstalled(name string) (bool, error)

IsInstalled returns true if the package is installed. a package is installed if it has a libraries entry in app.yaml (globally or under an environment)

type Descriptor

type Descriptor struct {
	Registry string
	Name     string
	Version  string
}

Descriptor describes a package.

func Parse added in v0.12.0

func Parse(id string) (Descriptor, error)

Parse parses a package identifier into its components <registry>/<name>@<version>

func (Descriptor) String added in v0.13.0

func (d Descriptor) String() string

type Helm added in v0.12.0

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

Helm is a package based on a Helm chart.

func NewHelm added in v0.12.0

func NewHelm(a app.App, name, registryName, version string, installChecker InstallChecker) (*Helm, error)

NewHelm creates an instance of Helm.

func (*Helm) Description added in v0.12.0

func (h *Helm) Description() string

Description returns the description for the Helm chart. The description is retrieved from the chart's Chart.yaml file.

func (*Helm) IsInstalled added in v0.12.0

func (p *Helm) IsInstalled() (bool, error)

IsInstalled returns true if the package is installed.

func (*Helm) Name added in v0.12.0

func (p *Helm) Name() string

Name returns the name for the package.

func (*Helm) Path added in v0.12.0

func (h *Helm) Path() string

Path returns local directory for vendoring the package.

func (*Helm) Prototypes added in v0.12.0

func (h *Helm) Prototypes() (prototype.Prototypes, error)

Prototypes returns prototypes for this package. Currently, it returns a single prototype.

func (*Helm) RegistryName added in v0.12.0

func (p *Helm) RegistryName() string

RegistryName returns the registry name for the package.

func (*Helm) String added in v0.12.0

func (p *Helm) String() string

String implements Stringer

func (*Helm) Version added in v0.12.0

func (p *Helm) Version() string

Version returns the package version, or empty string if the package is unversioned.

type InstallChecker added in v0.12.0

type InstallChecker interface {
	// IsInstalled returns true if a package is installed.
	IsInstalled(name string) (bool, error)
}

InstallChecker checks if a package is installed.

type Local added in v0.12.0

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

Local is a package based on vendored contents.

func NewLocal added in v0.12.0

func NewLocal(a app.App, name, registryName string, version string, installChecker InstallChecker) (*Local, error)

NewLocal creates an instance of Local.

func (*Local) Description added in v0.12.0

func (l *Local) Description() string

Description returns the description for the package. The description is ready from the package's parts.yaml.

func (*Local) IsInstalled added in v0.12.0

func (p *Local) IsInstalled() (bool, error)

IsInstalled returns true if the package is installed.

func (*Local) Name added in v0.12.0

func (p *Local) Name() string

Name returns the name for the package.

func (*Local) Path added in v0.12.0

func (l *Local) Path() string

Path returns local directory for vendoring the package.

func (*Local) Prototypes added in v0.12.0

func (l *Local) Prototypes() (prototype.Prototypes, error)

Prototypes returns prototypes for this package. Prototypes are defined in the package's `prototypes` directory.

func (*Local) RegistryName added in v0.12.0

func (p *Local) RegistryName() string

RegistryName returns the registry name for the package.

func (*Local) String added in v0.12.0

func (p *Local) String() string

String implements Stringer

func (*Local) Version added in v0.12.0

func (p *Local) Version() string

Version returns the package version, or empty string if the package is unversioned.

type Package

type Package interface {
	// Name returns the name of the package.
	Name() string

	// RegistryName returns the registry name of the package.
	RegistryName() string

	// Version returns the package version, or empty string if the package is unversioned.
	Version() string

	// IsInstalled returns true if the package is installed.
	IsInstalled() (bool, error)

	// Description retrurns the package description
	Description() string

	// Prototypes returns prototypes defined in the package.
	Prototypes() (prototype.Prototypes, error)

	// Path returns local directory for vendoring the package.
	Path() string

	fmt.Stringer
}

Package is a ksonnet package.

type TrueInstallChecker added in v0.12.0

type TrueInstallChecker struct{}

TrueInstallChecker implements an always-true InstallChecker.

func (TrueInstallChecker) IsInstalled added in v0.12.0

func (ic TrueInstallChecker) IsInstalled(name string) (bool, error)

IsInstalled always returns true, signaling we knew the package was installed when it was bound to this installChecker.

Directories

Path Synopsis
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.

Jump to

Keyboard shortcuts

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