resolve

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OptionsFunc

type OptionsFunc func(*ReadPasswordResolve)

OptionsFunc is a function used to configure ReadPasswordResolve

func WithReader

func WithReader(reader ...PasswordReader) OptionsFunc

WithReader allow you to set a list of readers that you can use to resolve a password

type PasswordReader

type PasswordReader interface {
	Read() (string, error)
}

PasswordReader defines the implementation of a password reader

type ReadPasswordResolve

type ReadPasswordResolve struct {
	// contains filtered or unexported fields
}

ReadPasswordResolve contains multiple methods that can resolve a password

func NewReadPasswordResolve

func NewReadPasswordResolve(options ...OptionsFunc) *ReadPasswordResolve

NewReadPasswordResolve return a ReadPasswordResolve

func (*ReadPasswordResolve) Options

func (s *ReadPasswordResolve) Options(opts ...OptionsFunc)

Options configure the ReadPasswordResolve

func (*ReadPasswordResolve) Read

func (s *ReadPasswordResolve) Read() (string, error)

Read looks for the first reader defined into the reader attribute which returns a password

Jump to

Keyboard shortcuts

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