cfg

package
v0.0.0-...-496ea3e Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Title      string
	Execute    string
	Goto       string
	Collectall bool
}

func (*Action) UnmarshalYAML

func (a *Action) UnmarshalYAML(unmarshal func(interface{}) error) error

type Cfg

type Cfg struct {
	Menu   string  `yaml:"menu"`
	Msg    string  `yaml:"msg"`
	Title  string  `yaml:"title"`
	Panels []*Form `yaml:",flow"`
	// contains filtered or unexported fields
}

func GetCfg

func GetCfg(path string) Cfg

Configuration factory

func (*Cfg) ShowFinished

func (c *Cfg) ShowFinished(e error)

func (*Cfg) ShowRunning

func (c *Cfg) ShowRunning()

func (*Cfg) Size

func (c *Cfg) Size()

set window size

func (*Cfg) Start

func (c *Cfg) Start()

start showing the Configured wizard

func (*Cfg) Taskfile

func (c *Cfg) Taskfile() string

func (*Cfg) UnmarshalYAML

func (c *Cfg) UnmarshalYAML(unmarshal func(interface{}) error) error

type Dsize

type Dsize struct {
	W float32
	H float32
}

type Form

type Form struct {
	Title string  `yaml:"title"`
	Items []*Item `yaml:"form,flow"`
	// contains filtered or unexported fields
}

func (*Form) HasMenu

func (f *Form) HasMenu() bool

func (*Form) MenuItem

func (f *Form) MenuItem() (*fyne.MenuItem, error)

get the menuitem that will diplay the panell

func (*Form) UnmarshalYAML

func (f *Form) UnmarshalYAML(unmarshal func(interface{}) error) error

type Item

type Item struct {

	// name: text
	Name  string   `yaml:"name"`
	Label string   `yaml:"label"`
	Type  TypeItem `yaml:"type"`

	Options []string `yaml:"options,flow"`
	Todo    Action   `yaml:"action"`
	LoadOn  string   `yaml:"loadon"`
	// contains filtered or unexported fields
}

A Form item

func (*Item) UnmarshalYAML

func (i *Item) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*Item) Val

func (i *Item) Val() string

get the item value from default or from the runtime cache

type TypeItem

type TypeItem string

Form item type

const (
	Text     TypeItem = "text"
	Password TypeItem = "password"
	File     TypeItem = "file"
	FileOpen TypeItem = "file_open"
	FileSave TypeItem = "file_save"
	Dir      TypeItem = "dir"
	Select   TypeItem = "select"
	Execute  TypeItem = "execute"
	Cancel   TypeItem = "cancel"
	Next     TypeItem = "next"
	Back     TypeItem = "back"
)

Jump to

Keyboard shortcuts

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