Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientFactory ¶
type ClientFactory interface {
NewSecretClient(ctx context.Context) (SecretClient, error)
}
ClientFactory is used to create SecretClient, which is the GRPC Secret Client in normal use, but can be mocked for tests.
type SecretClient ¶
type SecretClient interface { AccessSecretVersion(req *smpb.AccessSecretVersionRequest) (*smpb.AccessSecretVersionResponse, error) ListSecretVersions(req *smpb.ListSecretVersionsRequest) SecretListIterator DestroySecretVersion(req *smpb.DestroySecretVersionRequest) (*smpb.SecretVersion, error) CreateSecret(req *smpb.CreateSecretRequest) (*smpb.Secret, error) AddSecretVersion(req *smpb.AddSecretVersionRequest) (*smpb.SecretVersion, error) DeleteSecret(req *smpb.DeleteSecretRequest) error Close() error }
SecretClient is a wrapper around the secretmanager APIs that are used by smcache. It is entirely for the purpose of being able to mock these for testing.
type SecretClientFactoryImpl ¶
type SecretClientFactoryImpl struct{}
SecretClientFactoryImpl implements ClientFactory for the real GRPC client.
func (*SecretClientFactoryImpl) NewSecretClient ¶
func (*SecretClientFactoryImpl) NewSecretClient(ctx context.Context) (SecretClient, error)
NewSecretClient creates a GRPC NewClient for secretmanager.
type SecretListIterator ¶
type SecretListIterator interface {
Next() (*smpb.SecretVersion, error)
}
SecretListIterator is an interface for the GRPC secret manager response from ListSecretVersions.
Click to show internal directories.
Click to hide internal directories.