Documentation ¶
Index ¶
- Variables
- func CheckIfGitRepo(path string, shouldWarn bool) bool
- func CheckIfPrefix(input string) bool
- func CompareStrings(str1, str2 string, print bool) (bool, error)
- func DownloadSecret(secretID string, secretString string, secretsPath string, delimiter string) error
- func EnsurePath(path string) error
- func FormatPrefixString(prefix string) string
- func GitCheckForUpdate(tc *http.Client, parentCtx context.Context, currentVersion string) (*semver.Version, error)
- func GitControlSecrets(secretIDs []string, secretsPath string) error
- func GitDiff(secretsPath string) error
- func GitLatestRelease(currentVersion, token string) error
- func GitStatus(path string) error
- func OpenWithEditor(files []string, path string) error
- func PullSecretNames(secretsPath string) ([]string, error)
- func PushPostRun(secretsPath string, cleanLocalSecrets bool) error
- func RunCommand(interpreter string, args []string) (string, error)
- func ShowFile(file string) error
- func Untar(dst string, r io.Reader) error
Constants ¶
This section is empty.
Variables ¶
var TemplateFuncs = map[string]interface{}{
"default": dfault,
"quote": quote,
}
Functions ¶
func CheckIfGitRepo ¶
CheckIfGitRepo - runs git diff on the secrets folder - checks path for a .git folder and returns true if found
func CheckIfPrefix ¶
CheckIfPrefix returns true of input string ends with a / or *
func DownloadSecret ¶
func DownloadSecret(secretID string, secretString string, secretsPath string, delimiter string) error
DownloadSecret - Creates the directory path using the secrets name and the delimiter set ususally to /, then writes the secret the final file
func EnsurePath ¶
EnsurePath - prints directory path to secrets folder and will create the path if it does not exist
func FormatPrefixString ¶
FormatPrefixString returns string with /* as the last two characters
func GitCheckForUpdate ¶
func GitCheckForUpdate(tc *http.Client, parentCtx context.Context, currentVersion string) (*semver.Version, error)
GitCheckForUpdate returns an error and a semver containing the updated tag if it exists
func GitControlSecrets ¶
GitControlSecrets - creates a local git repo and commits the initially downloaded secrets
func GitLatestRelease ¶
GitLatestRelease downloads the latest version of jaws if there is a newer version
func OpenWithEditor ¶
OpenWithEditor will open a list of files with whatever the env var EDITIOR is set to
func PullSecretNames ¶
PullSecretNames walks the secretsPath and creates a list of secrets that are in there. Returns a list of local secrets and an error
func PushPostRun ¶
PushPostRun - Cleans the secrets folder after Pushing them
func RunCommand ¶
RunCommand takes an interpreter with a list of arguments and runs the command returning the output as a string and an error
Types ¶
This section is empty.