Documentation
¶
Index ¶
- Constants
- Variables
- func AddEditInPlaceSupport(cmd *cobra.Command, p *bool)
- func AddInputFileSupport(cmd *cobra.Command, p *string)
- func AddOutputFileSupport(cmd *cobra.Command, p *string)
- func AddSetValuesSupport(cmd *cobra.Command, p *[]string)
- func AddUseAlternateDelimitersSupport(cmd *cobra.Command, p *bool)
- func AddValuesFileSupport(cmd *cobra.Command, p *[]string)
- func ExitIfError(err error)
- func GetSecrets(files []string, funcMap template.FuncMap) error
- func LogIfError(err error)
- func ParseSecretsTemplate(data []byte, funcMap template.FuncMap) ([]byte, error)
- func ReadFileOrStdin(input string) ([]byte, error)
- func ReadSetValues() error
- func ReadValuesFiles() error
- func WriteFileOrStdout(data []byte, output string) error
- type SecretClient
Constants ¶
const ( // AltLeftDelim for go templating AltLeftDelim = "<<" // AltRightDelim for go templating AltRightDelim = ">>" // DefaultLeftDelim for go templating DefaultLeftDelim = "{{" // DefaultRightDelim for go templating DefaultRightDelim = "}}" // DefaultCacheTTL secrets client default cache TTL DefaultCacheTTL = 5 * time.Minute )
Variables ¶
Functions ¶
func AddEditInPlaceSupport ¶
AddEditInPlaceSupport will add the standard edit in place option and store the user input in the provided bool variable.
func AddInputFileSupport ¶
AddInputFileSupport will add the standard dockcmd input file option and store the user input in the provided string variable.
func AddOutputFileSupport ¶
AddOutputFileSupport will add the standard dockcmd output file option and store the user input in the provided string variable.
func AddSetValuesSupport ¶
AddSetValuesSupport will add the standard values array and store in the provided string array variable.
func AddUseAlternateDelimitersSupport ¶
AddUseAlternateDelimitersSupport will add the standard use alternate delimeters option and store the user input in the provided bool variable.
func AddValuesFileSupport ¶
AddValuesFileSupport will add the standard values file array and store in the provided string array variable.
func ExitIfError ¶ added in v1.6.0
func ExitIfError(err error)
ExitIfError will generically handle an error by logging its contents and exiting with a return code of 1.
func GetSecrets ¶ added in v1.6.0
GetSecrets process get-secrets request.
func LogIfError ¶ added in v1.6.0
func LogIfError(err error)
func ParseSecretsTemplate ¶
ParseSecretsTemplate uses the provided funcMap to parse secrets.
func ReadFileOrStdin ¶
ReadFileOrStdin will read from stdin if "-" is passed as input string or it will the files contents to a byte array.
func ReadSetValues ¶
func ReadSetValues() error
ReadSetValues will add all of the values passed in with --set and store the values in ValuesMap.
func ReadValuesFiles ¶
func ReadValuesFiles() error
func WriteFileOrStdout ¶
WriteFileOrStdout will write the provided data to stdout or to the specified file.