Documentation ¶
Overview ¶
Package psadm is a generated GoMock package.
Index ¶
- type CachedClient
- func (c *CachedClient) GetParameter(ctx context.Context, key string) (string, error)
- func (c *CachedClient) GetParameterByTime(ctx context.Context, key string, at time.Time) (*Parameter, error)
- func (c *CachedClient) GetParameterWithDescription(ctx context.Context, key string) (*Parameter, error)
- func (c *CachedClient) GetParametersByPath(ctx context.Context, pathPrefix string) ([]*Parameter, error)
- func (c *CachedClient) PutParameter(ctx context.Context, p *Parameter, overwrite bool) error
- type Client
- func (c *Client) CachedClient(cache *cache.Cache) *CachedClient
- func (c *Client) GetParameter(ctx context.Context, key string) (string, error)
- func (c *Client) GetParameterByTime(ctx context.Context, key string, at time.Time) (*Parameter, error)
- func (c *Client) GetParameterWithDescription(ctx context.Context, key string) (*Parameter, error)
- func (c *Client) GetParametersByPath(ctx context.Context, pathPrefix string) ([]*Parameter, error)
- func (c *Client) PutParameter(ctx context.Context, param *Parameter, overwrite bool) error
- func (c *Client) SingleflightClientWithCache(cache *cache.Cache) *SingleflightClient
- type Mockclient
- func (m *Mockclient) EXPECT() *MockclientMockRecorder
- func (m *Mockclient) GetParameter(arg0 context.Context, arg1 string) (string, error)
- func (m *Mockclient) GetParameterByTime(arg0 context.Context, arg1 string, arg2 time.Time) (*Parameter, error)
- func (m *Mockclient) GetParameterWithDescription(arg0 context.Context, arg1 string) (*Parameter, error)
- func (m *Mockclient) GetParametersByPath(arg0 context.Context, arg1 string) ([]*Parameter, error)
- func (m *Mockclient) PutParameter(arg0 context.Context, arg1 *Parameter, arg2 bool) error
- type MockclientMockRecorder
- func (mr *MockclientMockRecorder) GetParameter(arg0, arg1 any) *gomock.Call
- func (mr *MockclientMockRecorder) GetParameterByTime(arg0, arg1, arg2 any) *gomock.Call
- func (mr *MockclientMockRecorder) GetParameterWithDescription(arg0, arg1 any) *gomock.Call
- func (mr *MockclientMockRecorder) GetParametersByPath(arg0, arg1 any) *gomock.Call
- func (mr *MockclientMockRecorder) PutParameter(arg0, arg1, arg2 any) *gomock.Call
- type MockssmClient
- func (m *MockssmClient) DescribeParameters(arg0 context.Context, arg1 *ssm.DescribeParametersInput, ...) (*ssm.DescribeParametersOutput, error)
- func (m *MockssmClient) EXPECT() *MockssmClientMockRecorder
- func (m *MockssmClient) GetParameter(arg0 context.Context, arg1 *ssm.GetParameterInput, arg2 ...func(*ssm.Options)) (*ssm.GetParameterOutput, error)
- func (m *MockssmClient) GetParameterHistory(arg0 context.Context, arg1 *ssm.GetParameterHistoryInput, ...) (*ssm.GetParameterHistoryOutput, error)
- func (m *MockssmClient) PutParameter(arg0 context.Context, arg1 *ssm.PutParameterInput, arg2 ...func(*ssm.Options)) (*ssm.PutParameterOutput, error)
- type MockssmClientMockRecorder
- func (mr *MockssmClientMockRecorder) DescribeParameters(arg0, arg1 any, arg2 ...any) *gomock.Call
- func (mr *MockssmClientMockRecorder) GetParameter(arg0, arg1 any, arg2 ...any) *gomock.Call
- func (mr *MockssmClientMockRecorder) GetParameterHistory(arg0, arg1 any, arg2 ...any) *gomock.Call
- func (mr *MockssmClientMockRecorder) PutParameter(arg0, arg1 any, arg2 ...any) *gomock.Call
- type Parameter
- type SingleflightClient
- func (c *SingleflightClient) GetParameter(ctx context.Context, key string) (string, error)
- func (c *SingleflightClient) GetParameterByTime(ctx context.Context, key string, at time.Time) (*Parameter, error)
- func (c *SingleflightClient) GetParameterWithDescription(ctx context.Context, key string) (*Parameter, error)
- func (c *SingleflightClient) GetParametersByPath(ctx context.Context, pathPrefix string) ([]*Parameter, error)
- func (c *SingleflightClient) PutParameter(ctx context.Context, p *Parameter, overwrite bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachedClient ¶
type CachedClient struct {
// contains filtered or unexported fields
}
CachedClient is a cache-aware psadmin client.
func (*CachedClient) GetParameter ¶
func (*CachedClient) GetParameterByTime ¶
func (*CachedClient) GetParameterWithDescription ¶
func (*CachedClient) GetParametersByPath ¶
func (*CachedClient) PutParameter ¶
PutParameter forwards a call to the underlying client. It doesn't do any caching.
type Client ¶
type Client struct {
SSM ssmClient
}
Client wraps the SSM client for psadm.
func (*Client) CachedClient ¶
func (c *Client) CachedClient(cache *cache.Cache) *CachedClient
CachedClient returns a client with caching.
func (*Client) GetParameter ¶
GetParameter returns the decrypted parameter.
func (*Client) GetParameterByTime ¶
func (c *Client) GetParameterByTime(ctx context.Context, key string, at time.Time) (*Parameter, error)
GetParameterByTime returns the latest parameter.
func (*Client) GetParameterWithDescription ¶
func (*Client) GetParametersByPath ¶
GetParametersByPath gets all parameters having given path prefix.
func (*Client) PutParameter ¶
PutParameter puts param into Parameter Store.
func (*Client) SingleflightClientWithCache ¶
func (c *Client) SingleflightClientWithCache(cache *cache.Cache) *SingleflightClient
SingleflightClient returns a client with single flight caching.
type Mockclient ¶
type Mockclient struct {
// contains filtered or unexported fields
}
Mockclient is a mock of client interface.
func NewMockclient ¶
func NewMockclient(ctrl *gomock.Controller) *Mockclient
NewMockclient creates a new mock instance.
func (*Mockclient) EXPECT ¶
func (m *Mockclient) EXPECT() *MockclientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*Mockclient) GetParameter ¶
GetParameter mocks base method.
func (*Mockclient) GetParameterByTime ¶
func (m *Mockclient) GetParameterByTime(arg0 context.Context, arg1 string, arg2 time.Time) (*Parameter, error)
GetParameterByTime mocks base method.
func (*Mockclient) GetParameterWithDescription ¶
func (m *Mockclient) GetParameterWithDescription(arg0 context.Context, arg1 string) (*Parameter, error)
GetParameterWithDescription mocks base method.
func (*Mockclient) GetParametersByPath ¶
GetParametersByPath mocks base method.
func (*Mockclient) PutParameter ¶
PutParameter mocks base method.
type MockclientMockRecorder ¶
type MockclientMockRecorder struct {
// contains filtered or unexported fields
}
MockclientMockRecorder is the mock recorder for Mockclient.
func (*MockclientMockRecorder) GetParameter ¶
func (mr *MockclientMockRecorder) GetParameter(arg0, arg1 any) *gomock.Call
GetParameter indicates an expected call of GetParameter.
func (*MockclientMockRecorder) GetParameterByTime ¶
func (mr *MockclientMockRecorder) GetParameterByTime(arg0, arg1, arg2 any) *gomock.Call
GetParameterByTime indicates an expected call of GetParameterByTime.
func (*MockclientMockRecorder) GetParameterWithDescription ¶
func (mr *MockclientMockRecorder) GetParameterWithDescription(arg0, arg1 any) *gomock.Call
GetParameterWithDescription indicates an expected call of GetParameterWithDescription.
func (*MockclientMockRecorder) GetParametersByPath ¶
func (mr *MockclientMockRecorder) GetParametersByPath(arg0, arg1 any) *gomock.Call
GetParametersByPath indicates an expected call of GetParametersByPath.
func (*MockclientMockRecorder) PutParameter ¶
func (mr *MockclientMockRecorder) PutParameter(arg0, arg1, arg2 any) *gomock.Call
PutParameter indicates an expected call of PutParameter.
type MockssmClient ¶
type MockssmClient struct {
// contains filtered or unexported fields
}
MockssmClient is a mock of ssmClient interface.
func NewMockssmClient ¶
func NewMockssmClient(ctrl *gomock.Controller) *MockssmClient
NewMockssmClient creates a new mock instance.
func (*MockssmClient) DescribeParameters ¶
func (m *MockssmClient) DescribeParameters(arg0 context.Context, arg1 *ssm.DescribeParametersInput, arg2 ...func(*ssm.Options)) (*ssm.DescribeParametersOutput, error)
DescribeParameters mocks base method.
func (*MockssmClient) EXPECT ¶
func (m *MockssmClient) EXPECT() *MockssmClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockssmClient) GetParameter ¶
func (m *MockssmClient) GetParameter(arg0 context.Context, arg1 *ssm.GetParameterInput, arg2 ...func(*ssm.Options)) (*ssm.GetParameterOutput, error)
GetParameter mocks base method.
func (*MockssmClient) GetParameterHistory ¶
func (m *MockssmClient) GetParameterHistory(arg0 context.Context, arg1 *ssm.GetParameterHistoryInput, arg2 ...func(*ssm.Options)) (*ssm.GetParameterHistoryOutput, error)
GetParameterHistory mocks base method.
func (*MockssmClient) PutParameter ¶
func (m *MockssmClient) PutParameter(arg0 context.Context, arg1 *ssm.PutParameterInput, arg2 ...func(*ssm.Options)) (*ssm.PutParameterOutput, error)
PutParameter mocks base method.
type MockssmClientMockRecorder ¶
type MockssmClientMockRecorder struct {
// contains filtered or unexported fields
}
MockssmClientMockRecorder is the mock recorder for MockssmClient.
func (*MockssmClientMockRecorder) DescribeParameters ¶
func (mr *MockssmClientMockRecorder) DescribeParameters(arg0, arg1 any, arg2 ...any) *gomock.Call
DescribeParameters indicates an expected call of DescribeParameters.
func (*MockssmClientMockRecorder) GetParameter ¶
func (mr *MockssmClientMockRecorder) GetParameter(arg0, arg1 any, arg2 ...any) *gomock.Call
GetParameter indicates an expected call of GetParameter.
func (*MockssmClientMockRecorder) GetParameterHistory ¶
func (mr *MockssmClientMockRecorder) GetParameterHistory(arg0, arg1 any, arg2 ...any) *gomock.Call
GetParameterHistory indicates an expected call of GetParameterHistory.
func (*MockssmClientMockRecorder) PutParameter ¶
func (mr *MockssmClientMockRecorder) PutParameter(arg0, arg1 any, arg2 ...any) *gomock.Call
PutParameter indicates an expected call of PutParameter.
type Parameter ¶
type Parameter struct { Description string `yaml:"description"` KMSKeyID string `yaml:"kmskeyid"` Name string `yaml:"name"` Type string `yaml:"type"` Value string `yaml:"value"` }
Parameter is the parameter exported by psadm. This should be sufficient for import and export.
type SingleflightClient ¶
type SingleflightClient struct {
// contains filtered or unexported fields
}
SingleflightClient is a duplicate function call suppression client.
func (*SingleflightClient) GetParameter ¶
func (*SingleflightClient) GetParameterByTime ¶
func (*SingleflightClient) GetParameterWithDescription ¶
func (*SingleflightClient) GetParametersByPath ¶
func (*SingleflightClient) PutParameter ¶
PutParameter forwards a call to the underlying client. It doesn't do any deduplication.