Documentation ¶
Overview ¶
Package secretmanager loads configuration from GCP Secret Manager.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option = option.ClientOption
func WithFilter ¶
WithFilter provides [filter] that will be used to select a set of secrets.
[filter]: // https://cloud.google.com/secret-manager/docs/filtering
func WithNameSplitter ¶
WithNameSplitter provides the function used to split secret names into nested keys. If it returns an nil/[]string{}/[]string{""}, the secret will be ignored.
For example, with the default splitter, an secret name like "PARENT-CHILD-KEY" would be split into "PARENT", "CHILD", and "KEY".
func WithPollInterval ¶
WithPollInterval provides the interval for polling the configuration.
The default interval is 1 minute.
func WithProject ¶
WithProject provides GCP project ID.
By default, it fetches project ID from metadata server.
type SecretManager ¶
type SecretManager struct {
// contains filtered or unexported fields
}
SecretManager is a Provider that loads configuration from GCP Secret Manager.
To create a new SecretManager, call New.
func New ¶
func New(opts ...Option) *SecretManager
New creates a SecretManager with the given endpoint and Option(s).
func (*SecretManager) Status ¶ added in v0.8.0
func (m *SecretManager) Status(onStatus func(bool, error))
func (*SecretManager) String ¶
func (m *SecretManager) String() string