databasePrompts

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NamePrompt          = "Database Name:"
	SelectPrompt        = "Select a Database:"
	DatabaseMatch       = "Match:"
	EncryptionPrompt    = "Encrypt Database:"
	EncryptionKeyPrompt = "Encryption Key:"
	MinPrompt           = "Minimum Replicas:"
	MaxPrompt           = "Maximum Replicas:"

	CreateThis                = "Create this database?"
	DeleteThis                = "Delete this database?"
	EditThis                  = "Edit this database?"
	NoneFound                 = "no databases found"
	NotFound                  = "database `%s` not found"
	ParsingMinFailed          = "parsing min(%s) as int failed with: %s"
	ParsingMaxFailed          = "parsing max(%s) as int failed with: %s"
	MinCannotBeGreaterThanMax = "min(%s) cannot be greater than max(%s)"
)

Variables

This section is empty.

Functions

func Edit

func Edit(ctx *cli.Context, prev *structureSpec.Database) error

func GetEncryption

func GetEncryption(ctx *cli.Context, prev ...bool) bool

func GetOrAskForMinMax

func GetOrAskForMinMax(c *cli.Context, prevMin, prevMax int, new bool) (intMin int, intMax int, min string, max string)

func GetOrRequireAMatch

func GetOrRequireAMatch(ctx *cli.Context, prev ...string) string

func GetOrRequireAnEncryptionKey

func GetOrRequireAnEncryptionKey(c *cli.Context, prev ...string) string

func GetOrSelect

func GetOrSelect(ctx *cli.Context) (*structureSpec.Database, error)

GetOrSelect will try to get the database from a name flag if it is not set in the flag it will offer a selection menu

func New

func New(ctx *cli.Context) (*structureSpec.Database, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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