Documentation ¶
Overview ¶
Code generated by MockGen. DO NOT EDIT. Source: scaleway_wrapper.go
Generated by this command:
mockgen -source scaleway_wrapper.go -destination mock_scaleway_wrapper.go -package scw_secret_manager
Package scw_secret_manager is a generated GoMock package.
Index ¶
- func CleanUp(t *testing.T, IDs []string)
- type IScaleWayWrapper
- type LocalScaleWayWrapper
- func (scalewayWrapper *LocalScaleWayWrapper) CreateNewSecretVersion(secret Secret, data []byte) error
- func (scalewayWrapper *LocalScaleWayWrapper) DeleteSecret(id string) error
- func (scalewayWrapper *LocalScaleWayWrapper) DeleteSecretVersion(id string, revision string) error
- func (scalewayWrapper *LocalScaleWayWrapper) GetSecretData(secretName string, revision string) ([]byte, error)
- func (ScalewayWrapper *LocalScaleWayWrapper) ListSecretVersions(secretID string) (SecretVersionHolder, error)
- func (scalewayWrapper *LocalScaleWayWrapper) ListSecrets(names ...string) (SecretHolder, error)
- func (scalewayWrapper *LocalScaleWayWrapper) SetSecret(secretName string, secretValue []byte) (Secret, error)
- type MockIScaleWayWrapper
- func (m *MockIScaleWayWrapper) CreateNewSecretVersion(secret Secret, data []byte) error
- func (m *MockIScaleWayWrapper) DeleteSecret(id string) error
- func (m *MockIScaleWayWrapper) DeleteSecretVersion(id, revision string) error
- func (m *MockIScaleWayWrapper) EXPECT() *MockIScaleWayWrapperMockRecorder
- func (m *MockIScaleWayWrapper) GetSecretData(secretName, revision string) ([]byte, error)
- func (m *MockIScaleWayWrapper) ListSecretVersions(secretID string) (SecretVersionHolder, error)
- func (m *MockIScaleWayWrapper) ListSecrets(names ...string) (SecretHolder, error)
- func (m *MockIScaleWayWrapper) SetSecret(secretName string, secretValue []byte) (Secret, error)
- type MockIScaleWayWrapperMockRecorder
- func (mr *MockIScaleWayWrapperMockRecorder) CreateNewSecretVersion(secret, data any) *gomock.Call
- func (mr *MockIScaleWayWrapperMockRecorder) DeleteSecret(id any) *gomock.Call
- func (mr *MockIScaleWayWrapperMockRecorder) DeleteSecretVersion(id, revision any) *gomock.Call
- func (mr *MockIScaleWayWrapperMockRecorder) GetSecretData(secretName, revision any) *gomock.Call
- func (mr *MockIScaleWayWrapperMockRecorder) ListSecretVersions(secretID any) *gomock.Call
- func (mr *MockIScaleWayWrapperMockRecorder) ListSecrets(names ...any) *gomock.Call
- func (mr *MockIScaleWayWrapperMockRecorder) SetSecret(secretName, secretValue any) *gomock.Call
- type ScaleWaySetupData
- type ScalewayWrapper
- func (scalewayWrapper *ScalewayWrapper) CreateNewSecretVersion(secret Secret, data []byte) error
- func (scalewayWrapper *ScalewayWrapper) DeleteSecret(id string) error
- func (scalewayWrapper *ScalewayWrapper) DeleteSecretVersion(id string, revision string) error
- func (scalewayWrapper *ScalewayWrapper) GetSecretData(secretName string, revision string) ([]byte, error)
- func (ScalewayWrapper *ScalewayWrapper) ListSecretVersions(secretID string) (SecretVersionHolder, error)
- func (scalewayWrapper *ScalewayWrapper) ListSecrets(names ...string) (SecretHolder, error)
- func (scalewayWrapper *ScalewayWrapper) SetSecret(secretName string, secretValue []byte) (Secret, error)
- type Secret
- type SecretHolder
- type SecretVersion
- type SecretVersionHolder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IScaleWayWrapper ¶
type IScaleWayWrapper interface { ListSecrets(names ...string) (SecretHolder, error) ListSecretVersions(secretID string) (SecretVersionHolder, error) GetSecretData(secretName string, revision string) ([]byte, error) SetSecret(secretName string, secretValue []byte) (Secret, error) CreateNewSecretVersion(secret Secret, data []byte) error DeleteSecret(id string) error DeleteSecretVersion(id string, revision string) error }
func NewScaleWayWrapper ¶
func NewScaleWayWrapper(setupData ScaleWaySetupData) IScaleWayWrapper
Used godotenv to read you enviroment variables
func NewScaleWayWrapperForDev ¶
func NewScaleWayWrapperForDev(initEmpty ...bool) IScaleWayWrapper
Loads the following environment variables:
- ENCRYPTION_KEY base64 encoded encryption key 32 bytes long
- API_KEY base64 encoded api key 32 bytes long
- PRIVATE_KEY ECDSA Private Key in PEM format encoded as base64 for easy parsing (in one line)
If initEmpty is set to true, the keyStore is initialized empty
func NewScaleWayWrapperFromEnv ¶
func NewScaleWayWrapperFromEnv() IScaleWayWrapper
type LocalScaleWayWrapper ¶
type LocalScaleWayWrapper struct {
// contains filtered or unexported fields
}
func (*LocalScaleWayWrapper) CreateNewSecretVersion ¶
func (scalewayWrapper *LocalScaleWayWrapper) CreateNewSecretVersion(secret Secret, data []byte) error
func (*LocalScaleWayWrapper) DeleteSecret ¶
func (scalewayWrapper *LocalScaleWayWrapper) DeleteSecret(id string) error
func (*LocalScaleWayWrapper) DeleteSecretVersion ¶
func (scalewayWrapper *LocalScaleWayWrapper) DeleteSecretVersion(id string, revision string) error
func (*LocalScaleWayWrapper) GetSecretData ¶
func (scalewayWrapper *LocalScaleWayWrapper) GetSecretData(secretName string, revision string) ([]byte, error)
func (*LocalScaleWayWrapper) ListSecretVersions ¶
func (ScalewayWrapper *LocalScaleWayWrapper) ListSecretVersions(secretID string) (SecretVersionHolder, error)
func (*LocalScaleWayWrapper) ListSecrets ¶
func (scalewayWrapper *LocalScaleWayWrapper) ListSecrets(names ...string) (SecretHolder, error)
type MockIScaleWayWrapper ¶
type MockIScaleWayWrapper struct {
// contains filtered or unexported fields
}
MockIScaleWayWrapper is a mock of IScaleWayWrapper interface.
func NewMockIScaleWayWrapper ¶
func NewMockIScaleWayWrapper(ctrl *gomock.Controller) *MockIScaleWayWrapper
NewMockIScaleWayWrapper creates a new mock instance.
func (*MockIScaleWayWrapper) CreateNewSecretVersion ¶
func (m *MockIScaleWayWrapper) CreateNewSecretVersion(secret Secret, data []byte) error
CreateNewSecretVersion mocks base method.
func (*MockIScaleWayWrapper) DeleteSecret ¶
func (m *MockIScaleWayWrapper) DeleteSecret(id string) error
DeleteSecret mocks base method.
func (*MockIScaleWayWrapper) DeleteSecretVersion ¶
func (m *MockIScaleWayWrapper) DeleteSecretVersion(id, revision string) error
DeleteSecretVersion mocks base method.
func (*MockIScaleWayWrapper) EXPECT ¶
func (m *MockIScaleWayWrapper) EXPECT() *MockIScaleWayWrapperMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockIScaleWayWrapper) GetSecretData ¶
func (m *MockIScaleWayWrapper) GetSecretData(secretName, revision string) ([]byte, error)
GetSecretData mocks base method.
func (*MockIScaleWayWrapper) ListSecretVersions ¶
func (m *MockIScaleWayWrapper) ListSecretVersions(secretID string) (SecretVersionHolder, error)
ListSecretVersions mocks base method.
func (*MockIScaleWayWrapper) ListSecrets ¶
func (m *MockIScaleWayWrapper) ListSecrets(names ...string) (SecretHolder, error)
ListSecrets mocks base method.
type MockIScaleWayWrapperMockRecorder ¶
type MockIScaleWayWrapperMockRecorder struct {
// contains filtered or unexported fields
}
MockIScaleWayWrapperMockRecorder is the mock recorder for MockIScaleWayWrapper.
func (*MockIScaleWayWrapperMockRecorder) CreateNewSecretVersion ¶
func (mr *MockIScaleWayWrapperMockRecorder) CreateNewSecretVersion(secret, data any) *gomock.Call
CreateNewSecretVersion indicates an expected call of CreateNewSecretVersion.
func (*MockIScaleWayWrapperMockRecorder) DeleteSecret ¶
func (mr *MockIScaleWayWrapperMockRecorder) DeleteSecret(id any) *gomock.Call
DeleteSecret indicates an expected call of DeleteSecret.
func (*MockIScaleWayWrapperMockRecorder) DeleteSecretVersion ¶
func (mr *MockIScaleWayWrapperMockRecorder) DeleteSecretVersion(id, revision any) *gomock.Call
DeleteSecretVersion indicates an expected call of DeleteSecretVersion.
func (*MockIScaleWayWrapperMockRecorder) GetSecretData ¶
func (mr *MockIScaleWayWrapperMockRecorder) GetSecretData(secretName, revision any) *gomock.Call
GetSecretData indicates an expected call of GetSecretData.
func (*MockIScaleWayWrapperMockRecorder) ListSecretVersions ¶
func (mr *MockIScaleWayWrapperMockRecorder) ListSecretVersions(secretID any) *gomock.Call
ListSecretVersions indicates an expected call of ListSecretVersions.
func (*MockIScaleWayWrapperMockRecorder) ListSecrets ¶
func (mr *MockIScaleWayWrapperMockRecorder) ListSecrets(names ...any) *gomock.Call
ListSecrets indicates an expected call of ListSecrets.
type ScaleWaySetupData ¶
type ScalewayWrapper ¶
type ScalewayWrapper struct { Client scw.Client Api *secret_manager.API PROJECT_ID string }
func (*ScalewayWrapper) CreateNewSecretVersion ¶
func (scalewayWrapper *ScalewayWrapper) CreateNewSecretVersion(secret Secret, data []byte) error
func (*ScalewayWrapper) DeleteSecret ¶
func (scalewayWrapper *ScalewayWrapper) DeleteSecret(id string) error
func (*ScalewayWrapper) DeleteSecretVersion ¶
func (scalewayWrapper *ScalewayWrapper) DeleteSecretVersion(id string, revision string) error
func (*ScalewayWrapper) GetSecretData ¶
func (scalewayWrapper *ScalewayWrapper) GetSecretData(secretName string, revision string) ([]byte, error)
func (*ScalewayWrapper) ListSecretVersions ¶
func (ScalewayWrapper *ScalewayWrapper) ListSecretVersions(secretID string) (SecretVersionHolder, error)
func (*ScalewayWrapper) ListSecrets ¶
func (scalewayWrapper *ScalewayWrapper) ListSecrets(names ...string) (SecretHolder, error)
type Secret ¶
type Secret secret_manager.Secret
type SecretHolder ¶
type SecretVersion ¶
type SecretVersion secret_manager.SecretVersion
type SecretVersionHolder ¶
type SecretVersionHolder struct { SecretVersions []SecretVersion TotalCount uint32 }