Documentation
¶
Index ¶
- func HelmVendorPath(a app.App, d Descriptor) string
- func LocalVendorPath(a app.App, d Descriptor) string
- type DefaultInstallChecker
- type Descriptor
- type Helm
- type InstallChecker
- type Local
- func (l *Local) Description() string
- func (p *Local) IsInstalled() (bool, error)
- func (p *Local) Name() string
- func (l *Local) Path() string
- func (l *Local) Prototypes() (prototype.Prototypes, error)
- func (p *Local) RegistryName() string
- func (p *Local) String() string
- func (p *Local) Version() string
- type Package
- type TrueInstallChecker
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 ¶
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 ¶
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 ¶
Description returns the description for the Helm chart. The description is retrieved from the chart's Chart.yaml file.
func (*Helm) IsInstalled ¶
IsInstalled returns true if the package is installed.
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.
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 ¶
Description returns the description for the package. The description is ready from the package's parts.yaml.
func (*Local) IsInstalled ¶
IsInstalled returns true if the package is installed.
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.
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.