alfred

package
v0.0.0-...-1c9a7a8 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateItemsJson

func GenerateItemsJson(i []Item) (j string, err error)

Types

type Item

type Item struct {
	Title        string   `json:"title,omitempty"`
	Arg          string   `json:"arg,omitempty"`
	Subtitle     string   `json:"subtitle,omitempty"`
	Match        string   `json:"match,omitempty"`
	Icon         ItemIcon `json:"icon,omitempty"`
	Uid          string   `json:"uid,omitempty"`
	ItemType     string   `json:"type,omitempty"`
	QuicklookUrl string   `json:"quicklookurl,omitempty"`
	Text         ItemText `json:"text,omitempty"`
}

func (*Item) Reset

func (i *Item) Reset()

type ItemIcon

type ItemIcon struct {
	Type string `json:"type,omitempty"`
	Path string `json:"path,omitempty"`
}

type ItemPool

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

func MakeItemPool

func MakeItemPool() ItemPool

func (ItemPool) Get

func (ip ItemPool) Get() *Item

func (ItemPool) Put

func (ip ItemPool) Put(i *Item)

type ItemText

type ItemText struct {
	Copy string `json:"copy,omitempty"`
}

type MatchBuilder

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

func NewMatchBuilder

func NewMatchBuilder() MatchBuilder

func (MatchBuilder) AddMatch

func (mb MatchBuilder) AddMatch(s string)

func (MatchBuilder) AddMatches

func (mb MatchBuilder) AddMatches(s ...string)

func (MatchBuilder) String

func (mb MatchBuilder) String() string

type Writer

type Writer struct {
	ItemPool
	// contains filtered or unexported fields
}

func NewWriter

func NewWriter(out io.Writer) (w *Writer, err error)

func (*Writer) Close

func (w *Writer) Close() (err error)

func (*Writer) WriteItem

func (w *Writer) WriteItem(i *Item)

Jump to

Keyboard shortcuts

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