Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGCPSecretSource ¶
func NewGCPSecretSource(ctx context.Context, cfg *Config, client SecretVersionAccessor) (secrets.SecretSource, error)
NewGCPSecretSource creates a SecretSource backed by GCP Secret Manager. If client is nil, a new client is created using Application Default Credentials.
Types ¶
type Config ¶
type Config struct {
ProjectID string `env:"PROJECT_ID" json:"projectID"`
}
Config configures the GCP Secret Manager client.
type SecretVersionAccessor ¶
type SecretVersionAccessor interface {
AccessSecretVersion(ctx context.Context, req *secretmanagerpb.AccessSecretVersionRequest) (*secretmanagerpb.AccessSecretVersionResponse, error)
Close() error
}
SecretVersionAccessor abstracts AccessSecretVersion for testability.
Click to show internal directories.
Click to hide internal directories.