helpers

package
v0.0.0-...-31e3a40 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePrompt

func GeneratePrompt(pc PromptContent, v func(string) error) promptui.Prompt

GeneratePrompt generates our prompt UI template

func GetClusterID

func GetClusterID(t *types.DBInstance) *string

GetClusterID get's the clsuter id or nil as a getter this is the only one in helpers because it's needed for the initial load

func InstanceName

func InstanceName() *string

InstanceName generates a new random instance name for when one isn't provided

func PromptGetInput

func PromptGetInput(pc PromptContent) string

PromptGetInput get's the input and then returns it to the prompt

func PromptInput

func PromptInput(p promptui.Prompt) string

PromptInput runs the prompt for our command line

func RandomStateFileName

func RandomStateFileName() *string

RandomStateFileName generates a gob file name starting with a UUID

func WriteOutput

func WriteOutput(filename string, b bytes.Buffer) (int64, error)

WriteOutput turns bytes into a file

Types

type PromptContent

type PromptContent struct {
	ErrorMsg string
	Label    string
}

PromptContent is the struct that let's us have interactive prompts

Jump to

Keyboard shortcuts

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