qemucli

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 License: GPL-3.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeArg

func EncodeArg(a Arg) (string, *string, error)

func EncodeArgs

func EncodeArgs(args []Arg) ([]string, error)

Types

type Arg

type Arg interface {
	StringKey() string
	StringValue() string
	ValueType() ArgAcceptedValue
}

type ArgAcceptedValue

type ArgAcceptedValue string
const (
	ArgAcceptedValueUint     ArgAcceptedValue = "uint"
	ArgAcceptedValueString   ArgAcceptedValue = "string"
	ArgAcceptedValueKeyValue ArgAcceptedValue = "kv"
	ArgAcceptedValueNone     ArgAcceptedValue = "none"
)

type FlagArg

type FlagArg struct {
	// contains filtered or unexported fields
}

func MustNewFlagArg

func MustNewFlagArg(key string) *FlagArg

func NewFlagArg

func NewFlagArg(key string) (*FlagArg, error)

func (*FlagArg) StringKey

func (a *FlagArg) StringKey() string

func (*FlagArg) StringValue

func (a *FlagArg) StringValue() string

func (*FlagArg) ValueType

func (a *FlagArg) ValueType() ArgAcceptedValue

type KeyValueArg

type KeyValueArg struct {
	// contains filtered or unexported fields
}

func MustNewKeyValueArg

func MustNewKeyValueArg(key string, items []KeyValueArgItem) *KeyValueArg

func NewKeyValueArg

func NewKeyValueArg(key string, items []KeyValueArgItem) (*KeyValueArg, error)

func (*KeyValueArg) StringKey

func (a *KeyValueArg) StringKey() string

func (*KeyValueArg) StringValue

func (a *KeyValueArg) StringValue() string

func (*KeyValueArg) ValueType

func (a *KeyValueArg) ValueType() ArgAcceptedValue

type KeyValueArgItem

type KeyValueArgItem struct {
	Key   string
	Value string
}

type StringArg

type StringArg struct {
	// contains filtered or unexported fields
}

func MustNewStringArg

func MustNewStringArg(key string, value string) *StringArg

func NewStringArg

func NewStringArg(key string, value string) (*StringArg, error)

func (*StringArg) StringKey

func (a *StringArg) StringKey() string

func (*StringArg) StringValue

func (a *StringArg) StringValue() string

func (*StringArg) ValueType

func (a *StringArg) ValueType() ArgAcceptedValue

type UintArg

type UintArg struct {
	// contains filtered or unexported fields
}

func MustNewUintArg

func MustNewUintArg[T constraints.Integer](key string, value T) *UintArg

func NewUintArg

func NewUintArg(key string, value uint64) (*UintArg, error)

func (*UintArg) StringKey

func (a *UintArg) StringKey() string

func (*UintArg) StringValue

func (a *UintArg) StringValue() string

func (*UintArg) ValueType

func (a *UintArg) ValueType() ArgAcceptedValue

Jump to

Keyboard shortcuts

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