actions

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: 52 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OptionApp is app option.
	OptionApp = "app"
	// OptionAppRoot is the root directory of the application.
	OptionAppRoot = "app-root"
	// OptionArguments is arguments option. Used for passing arguments to prototypes.
	OptionArguments = "arguments"
	// OptionAsString is asString. Used for setting values as strings.
	OptionAsString = "as-string"
	// OptionClientConfig is clientConfig option.
	OptionClientConfig = "client-config"
	// OptionComponentName is a componentName option.
	OptionComponentName = "component-name"
	// OptionComponentNames is componentNames option.
	OptionComponentNames = "component-names"
	// OptionCreate is create option.
	OptionCreate = "create"
	// OptionDryRun is dryRun option.
	OptionDryRun = "dry-run"
	// OptionEnvName is envName option.
	OptionEnvName = "env-name"
	// OptionEnvName1 is envName1. Used for param diff.
	OptionEnvName1 = "env-name-1"
	// OptionEnvName2 is envName1. Used for param diff.
	OptionEnvName2 = "env-name-2"
	// OptionExtVarFiles is jsonnet ext var files.
	OptionExtVarFiles = "ext-vars-files"
	// OptionExtVars is jsonnet ext vars.
	OptionExtVars = "ext-vars"
	// OptionForce is force option.
	OptionForce = "force"
	// OptionFormat is format option.
	OptionFormat = "format"
	// OptionFs is fs option.
	OptionFs = "fs"
	// OptionGcTag is gcTag option.
	OptionGcTag = "gc-tag"
	// OptionGlobal is global option.
	OptionGlobal = "global"
	// OptionGracePeriod is gracePeriod option.
	OptionGracePeriod = "grace-period"
	// OptionHTTPClient is the http.Client for outbound network requests.
	OptionHTTPClient = "http-client"
	// OptionInstalled is for listing installed packages.
	OptionInstalled = "only-installed"
	// OptionJPaths is jsonnet paths.
	OptionJPaths = "jpaths"
	// OptionPkgName is (an optionally qualified) name of a package.
	OptionPkgName = "pkg-name"
	// OptionName is name option.
	OptionName = "name"
	// OptionModule is component module option.
	OptionModule = "module"
	// OptionNamespace is a cluster namespace option
	OptionNamespace = "namespace"
	// OptionNewRoot is init new root path option.
	OptionNewRoot = "root-path"
	// OptionNewEnvName is newEnvName option. Used for renaming environments.
	OptionNewEnvName = "new-env-name"
	// OptionOutput is output option.
	OptionOutput = "output"
	// OptionOverride is override option.
	OptionOverride = "override"
	// OptionPackageName is packageName option.
	OptionPackageName = "package-name"
	// OptionPath is path option.
	OptionPath = "path"
	// OptionQuery is query option.
	OptionQuery = "query"
	// OptionResolveImage is resolve image option. It is used to resolve docker image references
	// when setting parameters.
	OptionResolveImage = "resolve-image"
	// OptionServer is server option.
	OptionServer = "server"
	// OptionServerURI is serverURI option.
	OptionServerURI = "server-uri"
	// OptionSkipCheckUpgrade tells app not to emit upgrade warnings, probably because the user is already upgrading.
	OptionSkipCheckUpgrade = "skip-check-upgrade"
	// OptionSkipDefaultRegistries is skipDefaultRegistries option. Used by init.
	OptionSkipDefaultRegistries = "skip-default-registries"
	// OptionSkipGc is skipGc option.
	OptionSkipGc = "skip-gc"
	// OptionSpecFlag is specFlag option. Used for setting k8s spec.
	OptionSpecFlag = "spec-flag"
	// OptionSrc1 is src1 option.
	OptionSrc1 = "src-1"
	// OptionSrc2 is src2 option.
	OptionSrc2 = "src-2"
	// OptionTlaVarFiles is jsonnet tla var files.
	OptionTlaVarFiles = "tla-var-files"
	// OptionTlaVars is jsonnet tla vars.
	OptionTlaVars = "tla-vars"
	// OptionTLSSkipVerify specifies that tls server certifactes should not be verified.
	OptionTLSSkipVerify = "tls-skip-verify"
	// OptionUnset is unset option.
	OptionUnset = "unset"
	// OptionURI is uri option. Used for setting registry URI.
	OptionURI = "URI"
	// OptionWithoutModules is without modules option.
	OptionWithoutModules = "without-modules"
	// OptionValue is value option.
	OptionValue = "value"
	// OptionVersion is version option.
	OptionVersion = "version"
)
View Source
const (
	// OutputWide is wide output
	OutputWide = "wide"
	// OutputJSON is JSON output
	OutputJSON = "json"
)

Variables

View Source
var (
	// ErrDiffFound is an error returned when differences are found.
	ErrDiffFound = errors.New("differences found")
)
View Source
var (
	// ErrNotInApp is an error stating the user is not in a ksonnet application directory
	// hierarchy.
	ErrNotInApp = errors.Errorf("this command has to be run within a ksonnet application")
)

Functions

func RunApply

func RunApply(m map[string]interface{}) error

RunApply runs `apply`.

func RunComponentList

func RunComponentList(m map[string]interface{}) error

RunComponentList runs `component list`

func RunComponentRm

func RunComponentRm(m map[string]interface{}) error

RunComponentRm runs `component list`

func RunDelete

func RunDelete(m map[string]interface{}) error

RunDelete runs `delete`.

func RunDiff added in v0.11.0

func RunDiff(m map[string]interface{}) error

RunDiff runs `diff`

func RunEnvAdd

func RunEnvAdd(m map[string]interface{}) error

RunEnvAdd runs `env add`

func RunEnvCurrent

func RunEnvCurrent(m map[string]interface{}) error

RunEnvCurrent runs `env current`.

func RunEnvDescribe

func RunEnvDescribe(m map[string]interface{}) error

RunEnvDescribe runs `env describe` func RunEnvDescribe(ksApp app.App, envName string) error {

func RunEnvList

func RunEnvList(m map[string]interface{}) error

RunEnvList runs `env list`

func RunEnvRm

func RunEnvRm(m map[string]interface{}) error

RunEnvRm runs `env rm`

func RunEnvSet

func RunEnvSet(m map[string]interface{}) error

RunEnvSet runs `env set` func RunEnvSet(ksApp app.App, envName string, opts ...EnvSetOpt) error {

func RunEnvTargets

func RunEnvTargets(m map[string]interface{}) error

RunEnvTargets runs `env targets`

func RunEnvUpdate

func RunEnvUpdate(m map[string]interface{}) error

RunEnvUpdate runs `env update`.

func RunImport

func RunImport(m map[string]interface{}) error

RunImport runs `import`

func RunInit

func RunInit(m map[string]interface{}) error

RunInit initializes an app.

func RunModuleCreate

func RunModuleCreate(m map[string]interface{}) error

RunModuleCreate creates a module.

func RunModuleList

func RunModuleList(m map[string]interface{}) error

RunModuleList runs `module list`

func RunParamDelete

func RunParamDelete(m map[string]interface{}) error

RunParamDelete runs `param set`

func RunParamDiff

func RunParamDiff(m map[string]interface{}) error

RunParamDiff runs `param diff`.

func RunParamList

func RunParamList(m map[string]interface{}) error

RunParamList runs `param list`.

func RunParamSet

func RunParamSet(m map[string]interface{}) error

RunParamSet runs `param set`

func RunPkgDescribe

func RunPkgDescribe(m map[string]interface{}) error

RunPkgDescribe runs `pkg install`

func RunPkgInstall

func RunPkgInstall(m map[string]interface{}) error

RunPkgInstall runs `pkg install`

func RunPkgList

func RunPkgList(m map[string]interface{}) error

RunPkgList runs `pkg list`

func RunPkgRemove added in v0.13.0

func RunPkgRemove(m map[string]interface{}) error

RunPkgRemove runs `pkg list`

func RunPrototypeDescribe

func RunPrototypeDescribe(m map[string]interface{}) error

RunPrototypeDescribe runs `prototype describe`

func RunPrototypeList

func RunPrototypeList(m map[string]interface{}) error

RunPrototypeList runs `prototype list`

func RunPrototypePreview

func RunPrototypePreview(m map[string]interface{}) error

RunPrototypePreview runs `prototype describe`

func RunPrototypeSearch

func RunPrototypeSearch(m map[string]interface{}) error

RunPrototypeSearch runs `prototype search`

func RunPrototypeUse

func RunPrototypeUse(m map[string]interface{}) error

RunPrototypeUse runs `prototype use`

func RunRegistryAdd

func RunRegistryAdd(m map[string]interface{}) error

RunRegistryAdd runs `registry add`

func RunRegistryDescribe

func RunRegistryDescribe(m map[string]interface{}) error

RunRegistryDescribe runs `prototype list`

func RunRegistryList

func RunRegistryList(m map[string]interface{}) error

RunRegistryList runs `env list`

func RunRegistrySet added in v0.12.0

func RunRegistrySet(m map[string]interface{}) error

RunRegistrySet runs `env list`

func RunShow

func RunShow(m map[string]interface{}) error

RunShow runs `show`.

func RunUpgrade

func RunUpgrade(m map[string]interface{}) error

RunUpgrade runs `upgrade`.

func RunValidate

func RunValidate(m map[string]interface{}) error

RunValidate runs `ns list`

Types

type Apply

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

Apply collects options for applying objects to a cluster.

type ComponentList

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

ComponentList create a list of components in a module.

func NewComponentList

func NewComponentList(m map[string]interface{}) (*ComponentList, error)

NewComponentList creates an instance of ComponentList.

func (*ComponentList) Run

func (cl *ComponentList) Run() error

Run runs the ComponentList action.

type ComponentRm

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

ComponentRm removes a component from a module.

func NewComponentRm

func NewComponentRm(m map[string]interface{}) (*ComponentRm, error)

NewComponentRm creates an instance of ComponentRm.

func (*ComponentRm) Run

func (cr *ComponentRm) Run() error

Run runs the ComponentRm action.

type Delete

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

Delete collects options for applying objects to a cluster.

type Diff added in v0.11.0

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

Diff sets targets for an environment.

func NewDiff added in v0.11.0

func NewDiff(m map[string]interface{}) (*Diff, error)

NewDiff creates an instance of Diff.

func (*Diff) Run added in v0.11.0

func (d *Diff) Run() error

Run assigns targets to an environment.

type EnvAdd

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

EnvAdd sets targets for an environment.

func NewEnvAdd

func NewEnvAdd(m map[string]interface{}) (*EnvAdd, error)

NewEnvAdd creates an instance of EnvAdd.

func (*EnvAdd) Run

func (ea *EnvAdd) Run() error

Run assigns targets to an environment.

type EnvCurrent

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

EnvCurrent sets/unsets the current environment

type EnvDescribe

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

EnvDescribe describes an environment by printing its configuration.

func NewEnvDescribe

func NewEnvDescribe(m map[string]interface{}) (*EnvDescribe, error)

NewEnvDescribe creates an instance of EnvDescribe.

func (*EnvDescribe) Run

func (ed *EnvDescribe) Run() error

Run runs the EnvDescribe action.

type EnvList

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

EnvList lists available namespaces. To initialize EnvList, use the `NewEnvList` constructor.

func NewEnvList

func NewEnvList(m map[string]interface{}) (*EnvList, error)

NewEnvList creates an instance of EnvList

func (*EnvList) Run

func (el *EnvList) Run() error

Run runs the env list action.

type EnvRm

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

EnvRm sets targets for an environment.

func NewEnvRm

func NewEnvRm(m map[string]interface{}) (*EnvRm, error)

NewEnvRm creates an instance of EnvRm.

func (*EnvRm) Run

func (er *EnvRm) Run() error

Run assigns targets to an environment.

type EnvSet

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

EnvSet sets targets for an environment.

func NewEnvSet

func NewEnvSet(m map[string]interface{}) (*EnvSet, error)

NewEnvSet creates an instance of EnvSet.

func (*EnvSet) Run

func (es *EnvSet) Run() error

Run assigns targets to an environment.

type EnvSetOpt

type EnvSetOpt func(*EnvSet)

EnvSetOpt is an option for configuring EnvSet.

func EnvSetName

func EnvSetName(name string) EnvSetOpt

EnvSetName is an option for setting a new name.

func EnvSetNamespace

func EnvSetNamespace(nsName string) EnvSetOpt

EnvSetNamespace is an option for setting a new namespace name.

type EnvTargets

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

EnvTargets sets targets for an environment.

func NewEnvTargets

func NewEnvTargets(m map[string]interface{}) (*EnvTargets, error)

NewEnvTargets creates an instance of EnvTargets.

func (*EnvTargets) Run

func (et *EnvTargets) Run() error

Run assigns targets to an environment.

type EnvUpdate

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

EnvUpdate updates ksonnet lib for an environment.

type Import

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

Import imports files or directories into ksonnet.

func NewImport

func NewImport(m map[string]interface{}) (*Import, error)

NewImport creates an instance of Import. `module` is the name of the component and entity is the file or directory to import.

func (*Import) Run

func (i *Import) Run() error

Run runs the import process.

type Init

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

Init creates a component namespace

func NewInit

func NewInit(m map[string]interface{}) (*Init, error)

NewInit creates an instance of Init.

func (*Init) Run

func (i *Init) Run() error

Run runs that ns create action.

type ModuleCreate

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

ModuleCreate creates a component module

func NewModuleCreate

func NewModuleCreate(m map[string]interface{}) (*ModuleCreate, error)

NewModuleCreate creates an instance of ModuleCreate.

func (*ModuleCreate) Run

func (mc *ModuleCreate) Run() error

Run runs the module create action.

type ModuleList

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

ModuleList lists modules.

func NewModuleList

func NewModuleList(m map[string]interface{}) (*ModuleList, error)

NewModuleList creates an instance of ModuleList.

func (*ModuleList) Run

func (nl *ModuleList) Run() error

Run lists modules.

type ParamDelete

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

ParamDelete sets a parameter for a component.

func NewParamDelete

func NewParamDelete(m map[string]interface{}) (*ParamDelete, error)

NewParamDelete creates an instance of ParamDelete.

func (*ParamDelete) Run

func (pd *ParamDelete) Run() error

Run runs the action.

type ParamDiff

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

ParamDiff shows difference between params in two environments.

func NewParamDiff

func NewParamDiff(m map[string]interface{}) (*ParamDiff, error)

NewParamDiff creates an instance of ParamDiff.

func (*ParamDiff) Run

func (pd *ParamDiff) Run() error

Run runs the action.

type ParamList

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

ParamList lists parameters for a component.

func NewParamList

func NewParamList(m map[string]interface{}) (*ParamList, error)

NewParamList creates an instances of ParamList.

func (*ParamList) Run

func (pl *ParamList) Run() error

Run runs the ParamList action.

type ParamSet

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

ParamSet sets a parameter for a component.

func NewParamSet

func NewParamSet(m map[string]interface{}) (*ParamSet, error)

NewParamSet creates an instance of ParamSet.

func (*ParamSet) Run

func (ps *ParamSet) Run() error

Run runs the action.

type PkgDescribe

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

PkgDescribe describes a package.

func NewPkgDescribe

func NewPkgDescribe(m map[string]interface{}) (*PkgDescribe, error)

NewPkgDescribe creates an instance of PkgDescribe.

func (*PkgDescribe) Run

func (pd *PkgDescribe) Run() error

Run describes a package.

type PkgInstall

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

PkgInstall installs packages.

func NewPkgInstall

func NewPkgInstall(m map[string]interface{}) (*PkgInstall, error)

NewPkgInstall creates an instance of PkgInstall.

func (*PkgInstall) Run

func (pi *PkgInstall) Run() error

Run installs packages.

type PkgList

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

PkgList lists available registries

func NewPkgList

func NewPkgList(m map[string]interface{}) (*PkgList, error)

NewPkgList creates an instance of PkgList

func (*PkgList) Run

func (pl *PkgList) Run() error

Run runs the env list action.

type PkgRemove added in v0.13.0

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

PkgRemove removes packages

func NewPkgRemove added in v0.13.0

func NewPkgRemove(m map[string]interface{}) (*PkgRemove, error)

NewPkgRemove creates an instance of PkgInstall

func (*PkgRemove) Run added in v0.13.0

func (pr *PkgRemove) Run() error

Run removes packages

type PrototypeDescribe

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

PrototypeDescribe describes a prototype.

func NewPrototypeDescribe

func NewPrototypeDescribe(m map[string]interface{}) (*PrototypeDescribe, error)

NewPrototypeDescribe creates an instance of PrototypeDescribe

func (*PrototypeDescribe) Run

func (pd *PrototypeDescribe) Run() error

Run runs the env list action.

type PrototypeList

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

PrototypeList lists available prototypes.

func NewPrototypeList

func NewPrototypeList(m map[string]interface{}) (*PrototypeList, error)

NewPrototypeList creates an instance of PrototypeList

func (*PrototypeList) Run

func (pl *PrototypeList) Run() error

Run runs the env list action.

type PrototypePreview

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

PrototypePreview lists available namespaces

func NewPrototypePreview

func NewPrototypePreview(m map[string]interface{}) (*PrototypePreview, error)

NewPrototypePreview creates an instance of PrototypePreview

func (*PrototypePreview) Run

func (pp *PrototypePreview) Run() error

Run runs the env list action.

type PrototypeSearch

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

PrototypeSearch searches for prototypes by name.

func NewPrototypeSearch

func NewPrototypeSearch(m map[string]interface{}) (*PrototypeSearch, error)

NewPrototypeSearch creates an instance of PrototypeSearch

func (*PrototypeSearch) Run

func (ps *PrototypeSearch) Run() error

Run runs the env list action.

type PrototypeUse

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

PrototypeUse generates a component from a prototype.

func NewPrototypeUse

func NewPrototypeUse(m map[string]interface{}) (*PrototypeUse, error)

NewPrototypeUse creates an instance of PrototypeUse

func (*PrototypeUse) Run

func (pl *PrototypeUse) Run() error

Run runs the env list action.

type RegistryAdd

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

RegistryAdd adds a registry.

func NewRegistryAdd

func NewRegistryAdd(m map[string]interface{}) (*RegistryAdd, error)

NewRegistryAdd creates an instance of RegistryAdd.

func (*RegistryAdd) Run

func (ra *RegistryAdd) Run() error

Run adds a registry.

type RegistryDescribe

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

RegistryDescribe describes a registry

func NewRegistryDescribe

func NewRegistryDescribe(m map[string]interface{}) (*RegistryDescribe, error)

NewRegistryDescribe creates an instance of RegistryDescribe

func (*RegistryDescribe) Run

func (rd *RegistryDescribe) Run() error

Run runs the env list action.

type RegistryList

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

RegistryList lists available registries

func NewRegistryList

func NewRegistryList(m map[string]interface{}) (*RegistryList, error)

NewRegistryList creates an instance of RegistryList

func (*RegistryList) Run

func (rl *RegistryList) Run() error

Run runs the registry list action.

type RegistrySet added in v0.12.0

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

RegistrySet lists available registries

func NewRegistrySet added in v0.12.0

func NewRegistrySet(m map[string]interface{}) (*RegistrySet, error)

NewRegistrySet creates an instance of RegistrySet

type Show

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

Show shows objects.

type Upgrade

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

Upgrade upgrades an application.

type Validate

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

Validate lists namespaces.

func NewValidate

func NewValidate(m map[string]interface{}) (*Validate, error)

NewValidate creates an instance of Validate.

func (*Validate) Run

func (v *Validate) Run() error

Run lists namespaces.

Jump to

Keyboard shortcuts

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