uxHelpers

package
v1.0.20-alpha Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckZeropsProcess

func CheckZeropsProcess(
	processId uuid.ProcessId,
	restApiClient *zeropsRestApiClient.Handler,
) func(ctx context.Context) error

func PrintOrgSelector

func PrintOrgSelector(
	ctx context.Context,
	uxBlocks uxBlock.UxBlocks,
	restApiClient *zeropsRestApiClient.Handler,
) (*entity.Org, error)

func PrintProjectList

func PrintProjectList(
	ctx context.Context,
	uxBlocks uxBlock.UxBlocks,
	restApiClient *zeropsRestApiClient.Handler) error

func PrintProjectSelector

func PrintProjectSelector(
	ctx context.Context,
	uxBlocks uxBlock.UxBlocks,
	restApiClient *zeropsRestApiClient.Handler,
) (*entity.Project, error)

func PrintServiceList

func PrintServiceList(
	ctx context.Context,
	uxBlocks uxBlock.UxBlocks,
	restApiClient *zeropsRestApiClient.Handler,
	project entity.Project,
) error

func PrintServiceSelector

func PrintServiceSelector(
	ctx context.Context,
	uxBlocks uxBlock.UxBlocks,
	restApiClient *zeropsRestApiClient.Handler,
	project entity.Project,
) (*entity.Service, error)

func PrintServiceStackTypeSelector

func PrintServiceStackTypeSelector(
	ctx context.Context,
	uxBlocks uxBlock.UxBlocks,
	restApiClient *zeropsRestApiClient.Handler,
) (result entity.ServiceStackType, _ error)

func PrintServiceStackTypeVersionSelector

func PrintServiceStackTypeVersionSelector(
	ctx context.Context,
	uxBlocks uxBlock.UxBlocks,
	restApiClient *zeropsRestApiClient.Handler,
	opts ...options.Option[printServiceStackTypeVersionSelector],
) (entity.ServiceStackTypeVersion, error)

func PrintServiceStackTypeVersionSelectorWithServiceStackTypeIdFilter

func PrintServiceStackTypeVersionSelectorWithServiceStackTypeIdFilter(in entity.ServiceStackType) options.Option[printServiceStackTypeVersionSelector]

func ProcessCheckWithSpinner

func ProcessCheckWithSpinner(
	ctx context.Context,
	uxBlocks uxBlock.UxBlocks,
	processList []Process,
) error

func SelectOne

func SelectOne[T any](ctx context.Context, uxBlocks uxBlock.UxBlocks, list []T, opts ...options.Option[selectOneConfig[T]]) (result T, _ error)

func SelectOneWithHeader

func SelectOneWithHeader[T any](columns ...string) options.Option[selectOneConfig[T]]

func SelectOneWithNotFound

func SelectOneWithNotFound[T any](label string) options.Option[selectOneConfig[T]]

func SelectOneWithRow

func SelectOneWithRow[T any](in func(T) []string) options.Option[selectOneConfig[T]]

func SelectOneWithSelectLabel

func SelectOneWithSelectLabel[T any](label string) options.Option[selectOneConfig[T]]

func YesNoPrompt added in v1.0.8

func YesNoPrompt(
	ctx context.Context,
	uxBlocks uxBlock.UxBlocks,
	questionMessage string,
) (bool, error)

Types

type Process

type Process struct {
	F                   func(ctx context.Context) error
	RunningMessage      string
	ErrorMessageMessage string
	SuccessMessage      string
}

Jump to

Keyboard shortcuts

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