api

package
v0.3.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

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.

Directories

Path Synopsis
Package mock_mocks is a generated GoMock package.
Package mock_mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL