cli

package
v0.0.0-...-54d928c Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 21 Imported by: 5

Documentation

Index

Constants

View Source
const (
	// PathEnvKey ...
	PathEnvKey = "ENVMAN_ENVSTORE_PATH"
	// PathKey ...
	PathKey = "path"

	// LogLevelEnvKey ...
	LogLevelEnvKey = "LOGLEVEL"
	// LogLevelKey ...
	LogLevelKey = "loglevel"

	// KeyKey ...
	KeyKey = "key"

	// ValueKey ...
	ValueKey = "value"

	// ValueFileKey ...
	ValueFileKey = "valuefile"

	// NoExpandKey ...
	NoExpandKey = "no-expand"

	// AppendKey ...
	AppendKey = "append"

	// SkipIfEmptyKey ...
	SkipIfEmptyKey = "skip-if-empty"

	// SensitiveKey ...
	SensitiveKey = "sensitive"

	// ToolEnvKey ...
	ToolEnvKey = "ENVMAN_TOOLMODE"
	// ToolKey ...
	ToolKey = "tool"

	// ClearKey ....
	ClearKey = "clear"

	// HelpKey ...
	HelpKey = "help"

	// VersionKey ...
	VersionKey = "version"

	// ExpandKey ...
	ExpandKey = "expand"
	// SensitiveOnlyKey ...
	SensitiveOnlyKey = "sensitive-only"
	// FormatKey ...
	FormatKey = "format"
	// OutputFormatRaw ...
	OutputFormatRaw = "raw"
	// OutputFormatJSON ...
	OutputFormatJSON = "json"
)

Variables

View Source
var (
	// CurrentEnvStoreFilePath ...
	CurrentEnvStoreFilePath string

	// ToolMode ...
	ToolMode bool
)

Functions

func AddEnv

func AddEnv(envStorePth string, key string, value string, expand, replace, skipIfEmpty, sensitive bool) error

AddEnv ...

func ClearEnvs

func ClearEnvs(envStorePth string) error

ClearEnvs ...

func InitEnvStore

func InitEnvStore(envStorePth string, clear bool) error

InitEnvStore ...

func ParseEnvsYML

func ParseEnvsYML(bytes []byte) ([]models.EnvironmentItemModel, error)

ParseEnvsYML ...

func ReadAndEvaluateEnvs

func ReadAndEvaluateEnvs(envStorePth string, envSource env.EnvironmentSource) ([]string, error)

ReadAndEvaluateEnvs ...

func ReadEnvs

func ReadEnvs(pth string) ([]models.EnvironmentItemModel, error)

ReadEnvs ...

func ReadEnvsJSONList

func ReadEnvsJSONList(envStorePth string, expand, sensitiveOnly bool, envSource env.EnvironmentSource) (models.EnvsJSONListModel, error)

ReadEnvsJSONList ...

func ReadEnvsOrCreateEmptyList

func ReadEnvsOrCreateEmptyList(envStorePth string) ([]models.EnvironmentItemModel, error)

ReadEnvsOrCreateEmptyList ...

func Run

func Run()

Run the Envman CLI.

func UpdateOrAddToEnvlist

func UpdateOrAddToEnvlist(oldEnvSlice []models.EnvironmentItemModel, newEnv models.EnvironmentItemModel, replace bool) ([]models.EnvironmentItemModel, error)

UpdateOrAddToEnvlist ...

func WriteEnvMapToFile

func WriteEnvMapToFile(pth string, envs []models.EnvironmentItemModel) error

WriteEnvMapToFile ...

Types

type CommandModel

type CommandModel struct {
	Command      string
	Arguments    []string
	Environments []models.EnvironmentItemModel
}

CommandModel ...

type VersionOutputModel

type VersionOutputModel struct {
	Version     string `json:"version"`
	BuildNumber string `json:"build_number"`
	Commit      string `json:"commit"`
}

VersionOutputModel ...

Jump to

Keyboard shortcuts

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