Documentation ¶
Index ¶
- type Client
- func (c *Client) Delete(ctx context.Context, names ...string) (errs error)
- func (c *Client) Get(ctx context.Context, name string) (out *Parameter, err error)
- func (c *Client) GetMultiple(ctx context.Context, names ...string) (out Parameters, errs error)
- func (c *Client) Put(ctx context.Context, parameters Parameters) (errs error)
- type ErrClientFailedToLoadAWSConfig
- type ErrClientFailedToSetOption
- type Option
- type Parameter
- type ParameterType
- type Parameters
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client defines a client for this package.
func New ¶
New creates and returns a new Client. The client itself is set up with tracing & logging. Additional options can be provided to modify its behavior, via the options slice. The client is used for interacting with parameters in AWS SSM Parameter Store.
func (*Client) GetMultiple ¶
GetMultiple retrieves one or more params from paramstore.
type ErrClientFailedToLoadAWSConfig ¶
type ErrClientFailedToLoadAWSConfig struct {
// contains filtered or unexported fields
}
func (ErrClientFailedToLoadAWSConfig) Error ¶
func (e ErrClientFailedToLoadAWSConfig) Error() string
ErrClientFailedToLoadAWSConfig is returned when the AWS config isn't able to be loaded from the AWS SDK being used in the client. This may occur when the environment isn't configured correctly to use the `awscli` for example.
type ErrClientFailedToSetOption ¶
type ErrClientFailedToSetOption struct {
// contains filtered or unexported fields
}
ErrClientFailedToSetOption is returned when an option encounters an error when trying to be set with the client.
func (ErrClientFailedToSetOption) Error ¶
func (e ErrClientFailedToSetOption) Error() string
type Option ¶
Option configures a paramstore client.
func WithAWSRegion ¶
WithAWSRegion configures the AWS region used in the client.
func WithBatchSize ¶
WithBatchSize configures the batchSize used by the client when retrieving from or uploading to paramstore.
func WithDecryption ¶
WithDecryption configures the decryption used by the client when retrieving from AWS SSM Parameter Store. This option must be given to decrypt any parameters returned to this client.
func WithLogLevel ¶
WithLogLevel sets the log level for the default logger.
func WithLogger ¶
WithLogger configures the logger used in the client.
type Parameter ¶
type Parameter struct { Name string // The name of the parameter. Value string // The value of the parameter. Type ParameterType // The type of the parameter. Overwrite bool // Used to overwrite existing parameters during Put(). }
Parameter is a thin wrapper over ssm/types.Parameter.
type ParameterType ¶
type ParameterType types.ParameterType
ParameterType is a thin wrapper over ssm/types.ParameterType. NOTE: This type exists to reduce the number of packages that anyone using this package needs to explicitly import into their own programs.
const ( ParameterTypeString ParameterType = ParameterType(types.ParameterTypeString) ParameterTypeStringList ParameterType = ParameterType(types.ParameterTypeStringList) ParameterTypeSecureString ParameterType = ParameterType(types.ParameterTypeSecureString) )
type Parameters ¶
type Parameters []Parameter
Parameters is a slice of Parameter.
func (Parameters) ToSliceString ¶
func (parameters Parameters) ToSliceString() (out []string)
ToSliceString converts a Params slice of names into a slice string.