cdep

package
v0.0.0-...-4eb781d Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBranch = "master"

DefaultBranch is the default main branch

View Source
const Version = "0.6"

Variables

View Source
var ErrorCodeMapping = map[string]string{
	"config_not_on_master":      "Your config repo is not on master, please swap your HEAD back to master.",
	"frozen_without_commit":     "We found a resource where the config is locked, but no commit is specified.",
	"frozen":                    "The resource you're trying to update is currently frozen.",
	"nothing_changed":           "Running this tool has resulted in no change.",
	"unknown_environment":       "You've provided an environment that does not exist in the provided system.",
	"unknown_system":            "You've provided a system that does not exist.",
	"unknown_type":              "You're trying to update something this tool cannot handle.",
	"working_copy_dirty":        "Your config repo working copy is dirty, please clean it up and try again.",
	"too_many_apps":             "You can only specify one application for web updates",
	"web_deployment_not_found":  "The commit hash discovered has not been pushed to s3 yet",
	"terraform_token_not_found": "No Terraform token found. Please generate one on Terraform (https://app.terraform.io/app/settings/tokens) and put it into the environment variable \"CUVVA_TERRAFORM_TOKEN\".",
}
View Source
var OverruleChecks = map[string]string{
	"working_copy_dirty": "Does not check if the working copy is dirty first",
}
View Source
var Systems = map[string]map[string]struct{}{
	"nonprod": {
		"avocado":   {},
		"basil":     {},
		"coconut":   {},
		"pretzel":   {},
		"ephemeral": {},
		"test":      {},
		"all":       {},
	},
	"prod": {
		"prod": {},
		"all":  {},
	},
}

TODO(gm): Make this more dynamic

View Source
var Types = map[string]struct{}{
	"lambda":   {},
	"lambdas":  {},
	"service":  {},
	"services": {},
	"terra":    {},
}
View Source
var WebTypes = map[string]struct{}{
	"cloudfront": {},
	"cf":         {},
}

Functions

func ListEnvironments

func ListEnvironments(system string) []string

ListEnvironments returns a set of allowed environments

func ListSystems

func ListSystems() []string

ListSystems returns a set of allowed systems

func ListTypes

func ListTypes() []string

ListTypes returns a set of allowed types

func ListWebTypes

func ListWebTypes() []string

ListWebTypes returns a set of allowed web types

func ParseTypeArg

func ParseTypeArg(in string) (string, error)

func ParseWebTypeArg

func ParseWebTypeArg(in string) (string, error)

func ValidateSystem

func ValidateSystem(sys string) error

func ValidateSystemEnvironment

func ValidateSystemEnvironment(sys, env string) error

ValidateSystemEnvironment against the allowed options

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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