Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OptionsFunc ¶
type OptionsFunc func(*ReadPasswordFromEnvVar)
OptionsFunc is a function used to configure ReadPasswordFromEnvVar
func WithEnvVar ¶
func WithEnvVar(envvar string) OptionsFunc
WithEnvVar set the environment variable that contains the password defined on it
type ReadPasswordFromEnvVar ¶
type ReadPasswordFromEnvVar struct {
// contains filtered or unexported fields
}
ReadPasswordFromEnvVar returns a password set in an environment variable
func NewReadPasswordFromEnvVar ¶
func NewReadPasswordFromEnvVar(options ...OptionsFunc) *ReadPasswordFromEnvVar
NewReadPasswordFromEnvVar returns a ReadPasswordFromEnvVar
func (*ReadPasswordFromEnvVar) Options ¶
func (s *ReadPasswordFromEnvVar) Options(opts ...OptionsFunc)
Options configure the ReadPasswordFromEnvVar
func (*ReadPasswordFromEnvVar) Read ¶
func (s *ReadPasswordFromEnvVar) Read() (string, error)
Read returns the password that is set in the environment variable defined on the envvar attribute
Click to show internal directories.
Click to hide internal directories.