generate_password

package
v1.50.6 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePassword added in v1.38.0

func GeneratePassword() string

func RegisterHook

func RegisterHook(moduleValuesPath string, ns string, secretName string) bool

RegisterHook returns func to register common hook that generates and stores a password in the Secret.

Types

type Hook added in v1.38.0

type Hook struct {
	Secret    Secret
	ValuesKey string
}

func NewBasicAuthPlainHook added in v1.38.0

func NewBasicAuthPlainHook(moduleValuesPath string, ns string, secretName string) *Hook

func (*Hook) ExternalAuthKey added in v1.38.0

func (h *Hook) ExternalAuthKey() string

func (*Hook) Filter added in v1.38.0

Filter extracts password from the Secret. Password can be stored as a raw string or as a basic auth plain format (user:{PLAIN}password). Custom FilterFunc is called for custom password extraction.

func (*Hook) Handle added in v1.38.0

func (h *Hook) Handle(input *go_hook.HookInput) error

Handle restores password from the configuration or from the Secret and puts it to internal values. It generates new password if there is no password in the configuration and no Secret found.

func (*Hook) PasswordInternalKey added in v1.38.0

func (h *Hook) PasswordInternalKey() string

func (*Hook) PasswordKey added in v1.38.0

func (h *Hook) PasswordKey() string

type Secret added in v1.38.0

type Secret struct {
	Namespace string
	Name      string
}

Jump to

Keyboard shortcuts

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