shalm

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2020 License: Apache-2.0 Imports: 54 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DockerTag

func DockerTag() string

DockerTag -

func NewChartFunction

func NewChartFunction(repo Repo, dir string, options ...ChartOption) func(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (value starlark.Value, e error)

NewChartFunction -

func NewHelmChartFunction added in v0.7.0

func NewHelmChartFunction(repo Repo, dir string, options ...ChartOption) func(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (value starlark.Value, e error)

NewHelmChartFunction -

func NewJewel added in v0.5.6

func NewJewel(backend JewelBackend, name string) (starlark.Value, error)

NewJewel -

func ReadYamlFile added in v0.5.2

func ReadYamlFile(filename string) (starlark.Value, error)

ReadYamlFile -

func Version

func Version() string

Version -

func WriteYamlFile added in v0.5.2

func WriteYamlFile(filename string, value starlark.Value) error

WriteYamlFile -

Types

type Chart

type Chart interface {
	GetGenus() string
	GetName() string
	GetVersion() *semver.Version
	GetNamespace() string
	Apply(thread *starlark.Thread, k k8s.K8s) error
	Delete(thread *starlark.Thread, k k8s.K8s, options *DeleteOptions) error
	Template(thread *starlark.Thread, k k8s.K8s) k8s.Stream
	Package(writer io.Writer, helmFormat bool) error
	AddUsedBy(reference string, k k8s.K8s) (int, error)
	RemoveUsedBy(reference string, k k8s.K8s) (int, error)
}

Chart -

type ChartOption

type ChartOption func(options *ChartOptions)

ChartOption -

func WithArgs

func WithArgs(args starlark.Tuple) ChartOption

WithArgs -

func WithGenus added in v0.6.10

func WithGenus(value string) ChartOption

WithGenus -

func WithKwArgs

func WithKwArgs(kwargs []starlark.Tuple) ChartOption

WithKwArgs -

func WithNamespace

func WithNamespace(namespace string) ChartOption

WithNamespace -

func WithProperties added in v0.7.0

func WithProperties(properties *starlark.Dict) ChartOption

WithProperties -

func WithReadOnly added in v0.5.1

func WithReadOnly(value bool) ChartOption

WithReadOnly -

func WithSkipChart added in v0.5.1

func WithSkipChart(value bool) ChartOption

WithSkipChart -

func WithSuffix

func WithSuffix(suffix string) ChartOption

WithSuffix -

func WithValues added in v0.5.1

func WithValues(values map[string]interface{}) ChartOption

WithValues -

func WithVersion added in v0.6.2

func WithVersion(value *semver.Version) ChartOption

WithVersion -

type ChartOptions

type ChartOptions struct {
	GenusAndVersion
	// contains filtered or unexported fields
}

ChartOptions -

func (*ChartOptions) AddFlags

func (v *ChartOptions) AddFlags(flagsSet *pflag.FlagSet)

AddFlags -

func (*ChartOptions) KwArgs added in v0.7.0

func (v *ChartOptions) KwArgs(f *starlark.Function) []starlark.Tuple

func (*ChartOptions) Merge

func (v *ChartOptions) Merge() ChartOption

Merge -

type ChartValue

type ChartValue interface {
	Chart
	StructPropertyValue
}

ChartValue -

type ComplexJewelBackend added in v0.5.6

type ComplexJewelBackend interface {
	JewelBackend
	Template() (map[string][]byte, error)
	Delete(map[string][]byte) error
}

ComplexJewelBackend -

type DeleteOptions added in v0.7.0

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

DeleteOptions -

func (*DeleteOptions) AddFlags added in v0.7.0

func (s *DeleteOptions) AddFlags(flagsSet *pflag.FlagSet)

AddFlags -

type DirCache

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

DirCache -

func NewDirCache

func NewDirCache(baseDir string) *DirCache

NewDirCache -

func (*DirCache) WrapDir

func (d *DirCache) WrapDir(load LoadDir) OpenDirCache

WrapDir -

func (*DirCache) WrapReader

func (d *DirCache) WrapReader(load LoadReader) OpenReaderCache

WrapReader -

type GenusAndVersion added in v0.7.0

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

func NewGenusAndVersion added in v0.7.0

func NewGenusAndVersion(url string) *GenusAndVersion

func (*GenusAndVersion) AsOptions added in v0.7.0

func (s *GenusAndVersion) AsOptions() []ChartOption

type JewelBackend added in v0.5.6

type JewelBackend interface {
	Name() string
	Keys() map[string]JewelValue
	Apply(map[string][]byte) (map[string][]byte, error)
}

JewelBackend -

type JewelValue added in v0.6.8

type JewelValue struct {
	Name      string
	Converter func(data []byte) (starlark.Value, error)
}

JewelValue -

type LoadDir

type LoadDir = func(name string, targetDir func() (string, error), etagOld string) (etagNew string, err error)

LoadDir -

type LoadReader

type LoadReader = func(name string, etagOld string) (reader io.ReadCloser, etagNew string, err error)

LoadReader -

type OpenDirCache

type OpenDirCache = func(name string) (cachedDir string, err error)

OpenDirCache -

type OpenReaderCache

type OpenReaderCache = func(name string) (io.ReadCloser, error)

OpenReaderCache -

type Properties added in v0.7.0

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

Properties -

func (*Properties) GetValue added in v0.7.0

func (p *Properties) GetValue() starlark.Value

GetValue -

func (*Properties) Set added in v0.7.0

func (p *Properties) Set(val string) error

Set -

func (Properties) String added in v0.7.0

func (p Properties) String() string

func (Properties) Type added in v0.7.0

func (p Properties) Type() string

Type -

type Property added in v0.7.0

type Property interface {
	ReadProperty
	SetValue(value starlark.Value) error
}

Property -

type PropertyValue added in v0.7.0

type PropertyValue interface {
	Property
	starlark.HasAttrs
}

PropertyValue -

type ReadProperty added in v0.7.0

type ReadProperty interface {
	GetValue() starlark.Value
	GetValueOrDefault() starlark.Value
}

ReadProperty -

type Repo

type Repo interface {
	// Get -
	Get(thread *starlark.Thread, url string, options ...ChartOption) (ChartValue, error)
	// GetFromSpec -
	GetFromSpec(thread *starlark.Thread, spec *shalmv1a2.ChartSpec, options ...ChartOption) (ChartValue, error)
	// List -
	List(thread *starlark.Thread, k8s k8s.K8s, listOptions *RepoListOptions) ([]ChartValue, error)
}

Repo -

func NewRepo

func NewRepo(config ...RepoConfig) (Repo, error)

NewRepo -

type RepoConfig

type RepoConfig func(r *repoConfigs) error

RepoConfig -

func WithBasicAuth

func WithBasicAuth(url string, username string, password string) RepoConfig

WithBasicAuth -

func WithCatalog added in v0.7.0

func WithCatalog(url string) RepoConfig

WithCatalog -

func WithConfigFile

func WithConfigFile(filename string) RepoConfig

WithConfigFile -

func WithTokenAuth

func WithTokenAuth(url string, token string) RepoConfig

WithTokenAuth -

type RepoListOptions added in v0.6.2

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

RepoListOptions -

func (*RepoListOptions) AddFlags added in v0.6.10

func (s *RepoListOptions) AddFlags(flagsSet *pflag.FlagSet)

AddFlags -

type StructPropertyValue added in v0.7.0

type StructPropertyValue interface {
	Property
	starlark.HasSetField
}

type Vault added in v0.5.6

type Vault interface {
	Write(name string, data map[string][]byte) error
	Read(name string) (map[string][]byte, error)
	IsNotExist(err error) bool
}

Vault -

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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