result

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	General `yaml:",inline"`

	// The entered text.
	Text string
}

Entry is the result type for options dialogs.

type File

type File struct {
	General `yaml:",inline"`

	// The selected paths.
	Paths []string
}

File is the result type for file dialogs.

type General

type General struct {
	Action         actionState
	ExtraButtonIdx uint `yaml:"extraButtonIdx"`
}

func CancelResult

func CancelResult() General

CancelResult creates a canceled res.

func ExtraButtonResult

func ExtraButtonResult(i uint) General

ExtraButtonResult creates a res.

func OkResult

func OkResult() General

OkResult creates a accpted res.

func (*General) IsCanceled

func (g *General) IsCanceled() bool

IsCanceled tells if the user canceled or closed the dialog.

func (*General) IsExtraButton

func (g *General) IsExtraButton() (bool, uint)

IsExtraButton tells if the user pressed an extra button.

func (*General) IsOk

func (g *General) IsOk() bool

IsOk tells if the user clicked ok.

func (*General) IsUnset

func (g *General) IsUnset() bool

IsUnset tells if result is unset.

type JSONResult

type JSONResult struct {
	Version int
	Timeout bool
	Result  interface{} `yaml:",inline"`
}

func NewJSONResult

func NewJSONResult(res interface{}) JSONResult

NewJSONResult returns a new JSON result.

type Message

type Message struct {
	General `yaml:",inline"`
}

Message is the result type for message dialogs.

type Options

type Options struct {
	General `yaml:",inline"`

	// The chosen options indices. Only valid in `IsOk()`.
	Options []uint
}

Options is the result type for options dialogs.

Jump to

Keyboard shortcuts

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