validate

package
v0.0.0-...-8dc1d63 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncryptionKey

func EncryptionKey(input string) error

EncryptionKey ensures the string can be encrypted with the password.

func ExpandPath

func ExpandPath(relpath string) string

ExpandPath will replace the tilda with the user's home directory.

func Must

func Must(result string, err error) string

Must fails or returns a string from a prompt.

func MustSelect

func MustSelect(i int, result string, err error) string

MustSelect fails or returns a string from a select prompt.

func RequireAWSSessionInt

func RequireAWSSessionInt(input string) error

RequireAWSSessionInt ensures the input is a number.

func RequireFile

func RequireFile(input string) error

RequireFile ensures a file exists.

func RequireInt

func RequireInt(input string) error

RequireInt ensures the input is a number.

func RequirePEM

func RequirePEM(input string) error

RequirePEM ensures a file exists and is a PEM.

func RequireString

func RequireString(input string) error

RequireString ensures the string is not empty.

Types

type Passphrase

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

Passphrase .

func GeneratePassphrase

func GeneratePassphrase() *Passphrase

GeneratePassphrase will return a new passphrase.

func NewPassphrase

func NewPassphrase(encryptedValue string) *Passphrase

NewPassphrase .

func (*Passphrase) ID

func (p *Passphrase) ID() string

ID returns the encrypted value.

func (*Passphrase) Password

func (p *Passphrase) Password() string

Password returns the password if saved or prompted the user to enter it in.

Jump to

Keyboard shortcuts

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