functions

package
v0.0.1-beta07 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigFile = ConfigFileDir + "/" + ConfigFileName
View Source
const ConfigFileDir = "/etc/kude/function"
View Source
const ConfigFileName = "config.yaml"
View Source
const DockerCacheDir = "/workspace/.cache"
View Source
const DockerTempDir = "/workspace/.temp"

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotate

type Annotate struct {
	Name     string                  `mapstructure:"name"`
	Value    string                  `mapstructure:"value"`
	Path     string                  `mapstructure:"path"`
	Includes []kyaml.TargetingFilter `mapstructure:"includes"`
	Excludes []kyaml.TargetingFilter `mapstructure:"excludes"`
}

func (*Annotate) Invoke

func (f *Annotate) Invoke(_ *log.Logger, pwd, _, _ string, r io.Reader, w io.Writer) error

type CreateConfigMap

type CreateConfigMap struct {
	Name      string                 `mapstructure:"name"`
	Namespace string                 `mapstructure:"namespace"`
	Immutable *bool                  `mapstructure:"immutable"`
	Contents  []CreateConfigMapEntry `mapstructure:"contents"`
}

func (*CreateConfigMap) Invoke

func (f *CreateConfigMap) Invoke(_ *log.Logger, pwd, _, _ string, r io.Reader, w io.Writer) error

type CreateConfigMapEntry

type CreateConfigMapEntry struct {
	Key   string `mapstructure:"key"`
	Value string `mapstructure:"value"`
	Path  string `mapstructure:"path"`
}

type CreateNamespace

type CreateNamespace struct {
	Name string `mapstructure:"name"`
}

func (*CreateNamespace) Invoke

func (f *CreateNamespace) Invoke(_ *log.Logger, _, _, _ string, r io.Reader, w io.Writer) error

type CreateSecret

type CreateSecret struct {
	Name      string              `mapstructure:"name"`
	Namespace string              `mapstructure:"namespace"`
	Immutable *bool               `mapstructure:"immutable"`
	Type      string              `mapstructure:"type"`
	Contents  []CreateSecretEntry `mapstructure:"contents"`
}

func (*CreateSecret) Invoke

func (f *CreateSecret) Invoke(_ *log.Logger, pwd, _, _ string, r io.Reader, w io.Writer) error

type CreateSecretEntry

type CreateSecretEntry struct {
	Key   string `mapstructure:"key"`
	Value string `mapstructure:"value"`
	Path  string `mapstructure:"path"`
}

type Function

type Function interface {
	Invoke(logger *log.Logger, pwd, cacheDir, tempDir string, r io.Reader, w io.Writer) error
}

type FunctionInvoker

type FunctionInvoker struct {
	Function       Function
	Pwd            string
	Logger         *log.Logger
	ConfigFileDir  string
	ConfigFileName string
	CacheDir       string
	TempDir        string
	Viper          *viper.Viper
}

func (*FunctionInvoker) Invoke

func (f *FunctionInvoker) Invoke(input io.Reader, output io.Writer, opts ...viper.DecoderConfigOption) error

func (*FunctionInvoker) MustInvoke

func (f *FunctionInvoker) MustInvoke()

type Helm

type Helm struct {
	Version string   `mapstructure:"helm-version"`
	Args    []string `mapstructure:"args"`
}

func (*Helm) Invoke

func (f *Helm) Invoke(logger *log.Logger, pwd, cacheDir, tempDir string, r io.Reader, w io.Writer) error

type Label

type Label struct {
	Name     string                  `mapstructure:"name"`
	Value    string                  `mapstructure:"value"`
	Path     string                  `mapstructure:"path"`
	Includes []kyaml.TargetingFilter `mapstructure:"includes"`
	Excludes []kyaml.TargetingFilter `mapstructure:"excludes"`
}

func (*Label) Invoke

func (f *Label) Invoke(_ *log.Logger, pwd, _, _ string, r io.Reader, w io.Writer) error

type SetNamespace

type SetNamespace struct {
	Namespace string                  `mapstructure:"namespace"`
	Includes  []kyaml.TargetingFilter `mapstructure:"includes"`
	Excludes  []kyaml.TargetingFilter `mapstructure:"excludes"`
}

func (*SetNamespace) Invoke

func (f *SetNamespace) Invoke(_ *log.Logger, _, _, _ string, r io.Reader, w io.Writer) error

type YQ

type YQ struct {
	Expression string `mapstructure:"expression"`
}

func (*YQ) Invoke

func (f *YQ) Invoke(logger *log.Logger, pwd, _, _ string, r io.Reader, w io.Writer) error

Jump to

Keyboard shortcuts

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