alfred

package
v0.0.0-...-381c4e2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPoolMatchBuilder

func GetPoolMatchBuilder() schnittstellen.Pool[MatchBuilder, *MatchBuilder]

Types

type Item

type Item struct {
	Title        string         `json:"title,omitempty"`
	Arg          string         `json:"arg,omitempty"`
	Subtitle     string         `json:"subtitle,omitempty"`
	Match        *catgut.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 {
	bytes.Buffer
}

func NewMatchBuilder

func NewMatchBuilder() *MatchBuilder

func (*MatchBuilder) AddMatch

func (mb *MatchBuilder) AddMatch(s string)

func (*MatchBuilder) AddMatchBytes

func (mb *MatchBuilder) AddMatchBytes(s []byte)

func (*MatchBuilder) AddMatches

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

func (*MatchBuilder) Bytes

func (mb *MatchBuilder) Bytes() []byte

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