Documentation ¶
Overview ¶
Package smcache is an implementation of the Cache within acme autocert that will store data within Google Cloud's Secret Manager.
It uses the Google created GRPC client to communicate with the Secret Manager API, which allows the autocert library to Get/Put/Detelete certificates within Secret Manager.
For more details, see the README.md, which is published at https://github.com/jwendel/smcache
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSMCache ¶
NewSMCache creates a struct that implements the `autocert.Cache` interface. It uses the Config passed in to drive the behavior of this client.
Types ¶
type Config ¶
type Config struct { // ProjectID is the GCP Project ID where the Secrets will be stored. // This is the "Project ID" as seen in Google Cloud console. // Example ID: "my-project-1234". // This field is Required. ProjectID string // SecretPrefix is a string that will be put before the secret name. // This is useful for for IAM access control. As well, it's useful // for grouping secrets by application. // Optional, defaults to no-prefix. SecretPrefix string // If true, smcache will not delete old SecretVersions of Certificates. // If false, when autoert stores a certificate that is already in Secret Manager, // smcache will attempt to delete all old versions of that certificate. // Optional, defaults to false. KeepOldCertificates bool // DebugLogging controls if logging is enabled. // If true, smcache will log some status messages to log.Prtinf(). // This will not logany sensitive data, it should just be key // names and paths. // Optional, defaults to false. DebugLogging bool }
Config is passed into NewSMCache as a way to configure how SMCache will behave through it's lifespan.
Directories ¶
Path | Synopsis |
---|---|
example
|
|
autocert
Package autocert is a simple demo of use smcache with autocert.
|
Package autocert is a simple demo of use smcache with autocert. |
simple
secret-test is a sample app that uses smcache without the autocert library.
|
secret-test is a sample app that uses smcache without the autocert library. |
internal
|
|
api/mock
Package mock_mocks is a generated GoMock package.
|
Package mock_mocks is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.