utils

package
v0.0.0-...-0a45487 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUserInput

func GetUserInput(
	prompt string,
) string

func GetUserInputFromList

func GetUserInputFromList(
	prompt string,
	selected string,
	options []string,
	validate bool,
) string

func GetYesNoUserInput

func GetYesNoUserInput(prompt string, defaultRespone bool) bool

func ShowCommentMessage

func ShowCommentMessage(message string, args ...interface{})

func ShowDangerMessage

func ShowDangerMessage(message string, args ...interface{})

func ShowErrorAndExit

func ShowErrorAndExit(message string)

func ShowErrorMessage

func ShowErrorMessage(message string)

func ShowInfoMessage

func ShowInfoMessage(message string, args ...interface{})

func ShowMessage

func ShowMessage(message string, args ...interface{})

func ShowNoteMessage

func ShowNoteMessage(message string, args ...interface{})

func ShowNoticeMessage

func ShowNoticeMessage(message string, args ...interface{})

func ShowWarningMessage

func ShowWarningMessage(message string, args ...interface{})

Types

type Option

type Option struct {
	Text    string
	Command func(data interface{}) error
}

type OptionSelector

type OptionSelector struct {
	Options []Option

	OptionListFilter map[string][]int
	OptionRoleFilter map[auth.Role]map[int]bool
}

func (OptionSelector) SelectOption

func (os OptionSelector) SelectOption(data interface{}, listFilter string, roleFilter auth.Role) error

Jump to

Keyboard shortcuts

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