env

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// IndicatingLabel is label key indicating application is an env
	IndicatingLabel = "cli.env.oam.dev/name"
	// RawType is component type of raw
	RawType = "raw"
	// DefaultEnvName is name of default env
	DefaultEnvName = "default"
	// DefaultEnvNamespace is namespace of default env
	DefaultEnvNamespace = "default"
	// AppNameSchema is used to generate env app name
	AppNameSchema = "vela-env-%s"
	// AppNamePrefix is prefix of AppNameSchema
	AppNamePrefix = "vela-env-"
)

Variables

This section is empty.

Functions

func CreateEnv

func CreateEnv(envName string, envArgs *types.EnvMeta) error

CreateEnv will create e env. Because Env equals to namespace, one env should not be updated

func DeleteEnv

func DeleteEnv(envName string) (string, error)

DeleteEnv will delete env and its application

func GetCurrentEnv added in v1.1.4

func GetCurrentEnv() (*types.EnvMeta, error)

GetCurrentEnv will get current env, create default env if not exist

func GetEnvByName

func GetEnvByName(name string) (*types.EnvMeta, error)

GetEnvByName will get env info by name

func ListEnvs

func ListEnvs(envName string) ([]*types.EnvMeta, error)

ListEnvs will list all envs if envName specified, return list that only contains one env

func SetEnv

func SetEnv(envName string) (string, error)

SetEnv will set the current env to the specified one

Types

This section is empty.

Jump to

Keyboard shortcuts

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