Documentation ¶
Overview ¶
Package pstore implements a parameter store client used specifically to managing configuration data for microservices
Index ¶
- type AdapterAPI
- type Client
- func (c *Client) Collect(ctx context.Context, keys ...string) (map[string]string, []string, error)
- func (c *Client) Delete(ctx context.Context, key string) (string, error)
- func (c *Client) EnsurePathPrefix(path string) string
- func (c *Client) IsEncrypted() bool
- func (c *Client) Param(ctx context.Context, key string) (string, error)
- func (c *Client) Params(ctx context.Context, keys ...string) (map[string]string, error)
- func (c *Client) Path(ctx context.Context, path string, recursive ...bool) (map[string]string, error)
- func (c *Client) PathPagingConstructor() PathPagingConstructor
- func (c *Client) Put(ctx context.Context, key, value string, overwrite ...bool) (string, error)
- func (c *Client) ResolvePathPages(ctx context.Context, pager PathPaging) (map[string]string, error)
- func (c *Client) SetEncryption(value bool)
- func (c *Client) SetPathPagingConstructor(fn PathPagingConstructor)
- type PathPaging
- type PathPagingConstructor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdapterAPI ¶
type AdapterAPI interface { GetParameter(ctx context.Context, params *ssm.GetParameterInput, optFns ...func(*ssm.Options)) (*ssm.GetParameterOutput, error) GetParameters(ctx context.Context, params *ssm.GetParametersInput, optFns ...func(*ssm.Options)) (*ssm.GetParametersOutput, error) GetParametersByPath(ctx context.Context, params *ssm.GetParametersByPathInput, optFns ...func(*ssm.Options)) (*ssm.GetParametersByPathOutput, error) DeleteParameter(ctx context.Context, params *ssm.DeleteParameterInput, optFns ...func(*ssm.Options)) (*ssm.DeleteParameterOutput, error) PutParameter(ctx context.Context, params *ssm.PutParameterInput, optFns ...func(*ssm.Options)) (*ssm.PutParameterOutput, error) }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(api AdapterAPI, isEncrypted bool) (*Client, error)
NewClient simple constructor to inject private api and configuration values
func NewClientWithConfig ¶
func NewClientWithConfigMust ¶
func (*Client) Collect ¶
Collect retrieves one or many params regardless of hierarchy. Note: a second array of strings will report on any invalid params that were sent
func (*Client) Delete ¶
Delete will remove a single param from the store and return its old value. If the parameter does not exist a NotFound error is returned
func (*Client) EnsurePathPrefix ¶
func (*Client) IsEncrypted ¶
func (*Client) Param ¶
Param will retrieve a single parameter as `key` returning the value always as a string. If the parameter does not exist a NotFound error is returned
func (*Client) Params ¶
Params uses Param to retrieve multiple parameters from the given list of `keys`
func (*Client) Path ¶
func (c *Client) Path(ctx context.Context, path string, recursive ...bool) (map[string]string, error)
Path retrieves one or more params in a specific hierarchy, controlled by path.
func (*Client) PathPagingConstructor ¶
func (c *Client) PathPagingConstructor() PathPagingConstructor
func (*Client) Put ¶
Put will check the existence of the parameter and only change them if they are different, or it does not exist
func (*Client) ResolvePathPages ¶
func (*Client) SetEncryption ¶
func (*Client) SetPathPagingConstructor ¶
func (c *Client) SetPathPagingConstructor(fn PathPagingConstructor)
type PathPaging ¶
type PathPagingConstructor ¶
type PathPagingConstructor func(api AdapterAPI, in *ssm.GetParametersByPathInput) PathPaging
PathPagingConstructor constructor function used to create a new paginator for GetParametersByPath api call