Documentation ¶
Overview ¶
Package secrets give access to Google Secret Manager secrets easily and keeping the values updated.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Read ¶
Read a secret and return its value. Multiple reads of the same secret will return a cached version.
Types ¶
type ChangeHook ¶
type ChangeHook func(val *Value)
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
Value is a secret accesor that will keep its own value updated in background. When accessed it will return the latest available version of the secret.
func (*Value) OnChange ¶
func (val *Value) OnChange(hook ChangeHook)
OnChange registers a hook to be called when a value change is detected. In the hook you can update clients or other actions the application needs.
Click to show internal directories.
Click to hide internal directories.