Alfred

package module
v0.0.0-...-16afd97 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

README

alfred-toolkit-go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WhoAMI

func WhoAMI() string

Types

type Alfred

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

func NewAlfred

func NewAlfred(id string) (*Alfred, error)

func (*Alfred) GetBundleDir

func (al *Alfred) GetBundleDir() string

func (*Alfred) GetBundleID

func (al *Alfred) GetBundleID() string

func (*Alfred) GetCacheDir

func (al *Alfred) GetCacheDir() string

func (*Alfred) GetDataDir

func (al *Alfred) GetDataDir() string

func (*Alfred) GetHomeDir

func (al *Alfred) GetHomeDir() string

func (*Alfred) GetID

func (al *Alfred) GetID() string

func (*Alfred) GetResult

func (al *Alfred) GetResult() *Res

func (*Alfred) Output

func (al *Alfred) Output() (int, error)

func (*Alfred) ResultAppend

func (al *Alfred) ResultAppend(it Item) *Alfred

func (*Alfred) ResultSet

func (al *Alfred) ResultSet(its []Item) *Alfred

func (*Alfred) ResultToIndentJson

func (al *Alfred) ResultToIndentJson() ([]byte, error)

func (*Alfred) ResultToJson

func (al *Alfred) ResultToJson() ([]byte, error)

func (*Alfred) SetCacheDir

func (al *Alfred) SetCacheDir(dir string) (*Alfred, error)

func (*Alfred) SetDataDir

func (al *Alfred) SetDataDir(dir string) (*Alfred, error)

type Icon

type Icon struct {
	Type string `json:"type"`
	Path string `json:"path"`
}

func NewDefaultIcon

func NewDefaultIcon() Icon

func NewErrorIcon

func NewErrorIcon() Icon

func NewFailIcon

func NewFailIcon() Icon

func NewIcon

func NewIcon(ty, path string) Icon

func NewSuccIcon

func NewSuccIcon() Icon

type Item

type Item struct {
	Uid          string `json:"uid"`
	Arg          string `json:"arg"`
	Type         string `json:"type"`
	Valid        bool   `json:"valid"`
	AutoComplete string `json:"autocomplete"`
	Title        string `json:"title"`
	SubTitle     string `json:"subtitle"`
	Icon         Icon   `json:"icon"`
}

func NewCommonItem

func NewCommonItem(title, subTitle, arg string) Item

func NewDefaultItem

func NewDefaultItem() Item

func NewErrorItem

func NewErrorItem(err error) Item

func NewErrorTitleItem

func NewErrorTitleItem(title, subTitle string) Item

func NewItem

func NewItem(title, subTitle, arg, auto, uid, ty string, valid bool, icon Icon) Item

func NewNoResultItem

func NewNoResultItem() Item

type Res

type Res struct {
	Items []Item `json:"items"`
}

func (*Res) Append

func (r *Res) Append(it Item) *Res

func (*Res) Set

func (r *Res) Set(its []Item) *Res

Jump to

Keyboard shortcuts

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