envvars

package
v2.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 3 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL