pkg

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 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

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

HelmVendorPath returns a path for vendoring the described package.

func LocalVendorPath

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

LocalVendorPath returns a path for vendoring the described package.

Types

type DefaultInstallChecker

type DefaultInstallChecker struct {
	App app.App
}

DefaultInstallChecker checks if a package is installed.

func (*DefaultInstallChecker) IsInstalled

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

func Parse(id string) (Descriptor, error)

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

func (Descriptor) String

func (d Descriptor) String() string

type Helm

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

Helm is a package based on a Helm chart.

func NewHelm

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

NewHelm creates an instance of Helm.

func (*Helm) Description

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

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

IsInstalled returns true if the package is installed.

func (*Helm) Name

func (p *Helm) Name() string

Name returns the name for the package.

func (*Helm) Path

func (h *Helm) Path() string

Path returns local directory for vendoring the package.

func (*Helm) Prototypes

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

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

func (*Helm) RegistryName

func (p *Helm) RegistryName() string

RegistryName returns the registry name for the package.

func (*Helm) String

func (p *Helm) String() string

String implements Stringer

func (*Helm) Version

func (p *Helm) Version() string

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

type InstallChecker

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

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

Local is a package based on vendored contents.

func NewLocal

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

NewLocal creates an instance of Local.

func (*Local) Description

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

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

IsInstalled returns true if the package is installed.

func (*Local) Name

func (p *Local) Name() string

Name returns the name for the package.

func (*Local) Path

func (l *Local) Path() string

Path returns local directory for vendoring the package.

func (*Local) Prototypes

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

func (p *Local) RegistryName() string

RegistryName returns the registry name for the package.

func (*Local) String

func (p *Local) String() string

String implements Stringer

func (*Local) Version

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

type TrueInstallChecker struct{}

TrueInstallChecker implements an always-true InstallChecker.

func (TrueInstallChecker) IsInstalled

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