Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Secret ¶
type Secret[T any] struct { // contains filtered or unexported fields }
Secret define a wrapper of T to prevent unwanted exposure of a secret (in logs for example).
func (Secret[T]) ExposeSecret ¶
func (s Secret[T]) ExposeSecret() T
ExposeSecret returns the underlying secret. It is best practice to never store the secret and expose it only when needed.
func (Secret[T]) MarshalJSON ¶ added in v0.15.0
MarshalJSON implements json.Marshaler.
Click to show internal directories.
Click to hide internal directories.