types

package
v0.0.0-...-88e28f6 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CacheOptionJsonFile = NewStringOption("jsonfile")
	CacheOptionMemory   = NewStringOption("memory")
)
View Source
var (
	FlagNonInteractive = BoolFlag{Name: "yes", Short: "y", DefaultValue: false, Usage: "Non-interactive mode: Skips all prompts (default false)", Required: false}
)

Functions

This section is empty.

Types

type BoolFlag

type BoolFlag struct {
	Name         string
	Short        string
	DefaultValue bool
	Usage        string
	Prompt       string
	Required     bool
}

type CmdConfig

type CmdConfig struct {
	Name  string
	Short string
}

func (CmdConfig) PromptString

func (c CmdConfig) PromptString() string

type IntFlag

type IntFlag struct {
	Name         string
	Short        string
	DefaultValue int64
	Usage        string
	Prompt       string
	Required     bool
	ValidateFn   func(input string) error
}

type Option

type Option[T any] interface {
	Name() string
	Value() T
	StringValue() string
}

type OptionFlag

type OptionFlag[T any] struct {
	Name         string
	Short        string
	DefaultValue Option[T]
	Options      []Option[T]
	Usage        string
	Prompt       string
	Required     bool
	ValidateFn   func(input string) error
}

type PoolOption

type PoolOption struct {
	Option[uint64]
	// contains filtered or unexported fields
}

func NewPoolOption

func NewPoolOption(pool querytypes.PoolResponse) PoolOption

func (PoolOption) Name

func (o PoolOption) Name() string

func (PoolOption) StringValue

func (o PoolOption) StringValue() string

func (PoolOption) Value

func (o PoolOption) Value() uint64

type StringFlag

type StringFlag struct {
	Name         string
	Short        string
	DefaultValue string
	Usage        string
	Prompt       string
	Required     bool
	ValidateFn   func(input string) error
}

type StringOption

type StringOption struct {
	Option[string]
	// contains filtered or unexported fields
}

func NewStringOption

func NewStringOption(value string) StringOption

func (StringOption) Name

func (o StringOption) Name() string

func (StringOption) StringValue

func (o StringOption) StringValue() string

func (StringOption) Value

func (o StringOption) Value() string

Jump to

Keyboard shortcuts

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