Documentation
¶
Overview ¶
Copyright © 2023 Alexander Mancevice <alexander.mancevice@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index ¶
- Variables
- func Execute()
- func ExportParameters(path string)
- func ExportSecret(secretId string)
- func ExportVar(key string, val string)
- func GetAwsConfig() aws.Config
- func GetParametersByPath(ctx context.Context, api SsmGetParametersByPathApi, ...) (*ssm.GetParametersByPathOutput, error)
- func GetSecretValue(ctx context.Context, api SecretsManagerGetSecretValueApi, ...) (*secretsmanager.GetSecretValueOutput, error)
- type ConfigObject
- type LogWriter
- type SecretsManagerGetSecretValueApi
- type SsmGetParametersByPathApi
Constants ¶
This section is empty.
Variables ¶
var CliName string = "aws-env"
var CliVersion string = "0.1.1"
var DefaultConfigPath = "/var/task/.aws"
var HelpTemplate string = `
{{.Short}}
Usage:
{{.Name}} [OPTIONS] [ARGS...]
Options:
-h, --help show help
-v, --version show version
`
var ShowVersion bool
var UsageTemplate string = `
Usage:
{{.Name}} [OPTIONS] [ARGS...]
`
Functions ¶
func ExportParameters ¶
func ExportParameters(path string)
func ExportSecret ¶
func ExportSecret(secretId string)
func GetAwsConfig ¶
func GetParametersByPath ¶
func GetParametersByPath(ctx context.Context, api SsmGetParametersByPathApi, input *ssm.GetParametersByPathInput) (*ssm.GetParametersByPathOutput, error)
func GetSecretValue ¶
func GetSecretValue(ctx context.Context, api SecretsManagerGetSecretValueApi, input *secretsmanager.GetSecretValueInput) (*secretsmanager.GetSecretValueOutput, error)
Types ¶
type ConfigObject ¶
func GetConfig ¶
func GetConfig() ConfigObject
type SecretsManagerGetSecretValueApi ¶
type SecretsManagerGetSecretValueApi interface { GetSecretValue(ctx context.Context, params *secretsmanager.GetSecretValueInput, optFns ...func(*secretsmanager.Options)) (*secretsmanager.GetSecretValueOutput, error) }
type SsmGetParametersByPathApi ¶
type SsmGetParametersByPathApi interface { GetParametersByPath(ctx context.Context, params *ssm.GetParametersByPathInput, optFns ...func(*ssm.Options)) (*ssm.GetParametersByPathOutput, error) }