gui

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunOSAScript

func RunOSAScript(ctx context.Context, script string, data interface{}, workingDir string) ([]byte, error)

Types

type EntryData

type EntryData struct {
	Operation string
	Text      string
	WithIcon  string

	Opts EntryOpts `json:"opts"`
}

Note: Adding member -> Check `NewFromEntry`.

func NewFromEntry

func NewFromEntry(m *MsgData) EntryData

Create new entry data from message data.

type EntryOpts

type EntryOpts struct {
	MsgOptions

	DefaultAnswer string `json:"defaultAnswer"`
	HiddenAnswer  bool   `json:"hiddenAnswer,omitempty"`
}

type FileData

type FileData struct {
	Operation string
	Separator string

	Opts FileOpts
}

type FileOpts

type FileOpts struct {
	WithPrompt      string   `json:"withPrompt,omitempty"`
	OfType          []string `json:"ofType,omitempty"`
	DefaultName     string   `json:"defaultName,omitempty"`
	DefaultLocation string   `json:"defaultLocation,omitempty"`
	Invisibles      bool     `json:"invisibles,omitempty"`
	Multiple        bool     `json:"multipleSelectionsAllowed,omitempty"`
	ShowPackages    bool     `json:"showPackageContents,omitempty"`
}

type MsgData

type MsgData struct {
	Operation string
	Text      string
	WithIcon  string

	Opts MsgOptions `json:"opts"`
}

type MsgOptions

type MsgOptions struct {
	Message       string   `json:"message,omitempty"`
	As            string   `json:"as,omitempty"`
	WithTitle     string   `json:"withTitle,omitempty"`
	Buttons       []string `json:"buttons,omitempty"`
	CancelButton  int      `json:"cancelButton,omitempty"`
	DefaultButton int      `json:"defaultButton,omitempty"`
}

type NotifyData

type NotifyData struct {
	Text string
	Opts NotifyOpts
}

type NotifyOpts

type NotifyOpts struct {
	WithTitle string `json:"withTitle"`
	Subtitle  string `json:"subtitle,omitempty"`
}

type OptionsData

type OptionsData struct {
	Operation string
	Separator string
	Items     []string

	Opts OptionsOpts
}

type OptionsOpts

type OptionsOpts struct {
	WithTitle                string   `json:"withTitle,omitempty"`
	WithPrompt               string   `json:"withPrompt,omitempty"`
	DefaultItems             []string `json:"defaultItems,omitempty"`
	OkButtonName             string   `json:"okButtonName,omitempty"`
	CancelButtonName         string   `json:"cancelButtonName,omitempty"`
	MultipleSelectionAllowed bool     `json:"multipleSelectionsAllowed,omitempty"`
	EmptySelectionAllowed    bool     `json:"emptySelectionAllowed,omitempty"`
}

Jump to

Keyboard shortcuts

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