Documentation ¶
Index ¶
- Variables
- type SecretManager
- func (s *SecretManager) AccessSecretVersion(ctx context.Context, req *secretmanagerpb.AccessSecretVersionRequest, ...) (*secretmanagerpb.AccessSecretVersionResponse, error)
- func (s *SecretManager) AddSecretVersion(ctx context.Context, req *secretmanagerpb.AddSecretVersionRequest, ...) (*secretmanagerpb.SecretVersion, error)
- func (s *SecretManager) CreateSecret(ctx context.Context, req *secretmanagerpb.CreateSecretRequest, ...) (*secretmanagerpb.Secret, error)
- func (s *SecretManager) DeleteSecret(ctx context.Context, req *secretmanagerpb.DeleteSecretRequest, ...) error
- func (s *SecretManager) GetSecretVersion(ctx context.Context, req *secretmanagerpb.GetSecretVersionRequest, ...) (*secretmanagerpb.SecretVersion, error)
- func (s *SecretManager) Reset()
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotConfigured = errors.New("mock function not configured")
)
Functions ¶
This section is empty.
Types ¶
type SecretManager ¶
type SecretManager struct { OnCreateSecret func(context.Context, *secretmanagerpb.CreateSecretRequest, ...gax.CallOption) (*secretmanagerpb.Secret, error) OnGetSecretVersion func(context.Context, *secretmanagerpb.GetSecretVersionRequest, ...gax.CallOption) (*secretmanagerpb.SecretVersion, error) OnAddSecretVersion func(context.Context, *secretmanagerpb.AddSecretVersionRequest, ...gax.CallOption) (*secretmanagerpb.SecretVersion, error) OnAccessSecretVersion func(context.Context, *secretmanagerpb.AccessSecretVersionRequest, ...gax.CallOption) (*secretmanagerpb.AccessSecretVersionResponse, error) OnDeleteSecret func(context.Context, *secretmanagerpb.DeleteSecretRequest, ...gax.CallOption) error }
func New ¶
func New() (s *SecretManager)
New returns a new secrets client mock. The On* functions can be used to configure the mock behavior directly. Functions that are not configured will return an error.
func (*SecretManager) AccessSecretVersion ¶
func (s *SecretManager) AccessSecretVersion(ctx context.Context, req *secretmanagerpb.AccessSecretVersionRequest, opts ...gax.CallOption) (*secretmanagerpb.AccessSecretVersionResponse, error)
func (*SecretManager) AddSecretVersion ¶
func (s *SecretManager) AddSecretVersion(ctx context.Context, req *secretmanagerpb.AddSecretVersionRequest, opts ...gax.CallOption) (*secretmanagerpb.SecretVersion, error)
func (*SecretManager) CreateSecret ¶
func (s *SecretManager) CreateSecret(ctx context.Context, req *secretmanagerpb.CreateSecretRequest, opts ...gax.CallOption) (*secretmanagerpb.Secret, error)
func (*SecretManager) DeleteSecret ¶
func (s *SecretManager) DeleteSecret(ctx context.Context, req *secretmanagerpb.DeleteSecretRequest, opts ...gax.CallOption) error
func (*SecretManager) GetSecretVersion ¶
func (s *SecretManager) GetSecretVersion(ctx context.Context, req *secretmanagerpb.GetSecretVersionRequest, opts ...gax.CallOption) (*secretmanagerpb.SecretVersion, error)
func (*SecretManager) Reset ¶
func (s *SecretManager) Reset()
Reset resets the state of the mock so all functions return an error.
Click to show internal directories.
Click to hide internal directories.