Documentation ¶
Index ¶
Constants ¶
View Source
const Spacer = " "
Variables ¶
View Source
var Config = domain.ConfigPath{ domain.Alfred: "preferences/features/websearch/prefs.plist", domain.Albert: "org.albert.extension.websearch/engines.json", }
Functions ¶
This section is empty.
Types ¶
type AlbertSites ¶
type AlbertSites []*SiteConfig
func (*AlbertSites) Convert ¶
func (a *AlbertSites) Convert(dict ConfigDict) Sites
func (*AlbertSites) Decode ¶
func (a *AlbertSites) Decode(r io.ReadSeeker) error
func (*AlbertSites) Encode ¶
func (a *AlbertSites) Encode(dict ConfigDict) ([]byte, error)
func (*AlbertSites) List ¶ added in v0.2.0
func (a *AlbertSites) List() []*SiteConfig
func (*AlbertSites) Populate ¶ added in v0.2.0
func (a *AlbertSites) Populate(dict ConfigDict)
type AlfredSites ¶
type AlfredSites struct { CustomSites `plist:"customSites"` // contains filtered or unexported fields }
func (*AlfredSites) Convert ¶
func (a *AlfredSites) Convert(dict ConfigDict) Sites
func (*AlfredSites) Decode ¶
func (a *AlfredSites) Decode(r io.ReadSeeker) error
func (*AlfredSites) Encode ¶
func (a *AlfredSites) Encode(dict ConfigDict) ([]byte, error)
func (*AlfredSites) List ¶ added in v0.2.0
func (a *AlfredSites) List() []*SiteConfig
func (*AlfredSites) Populate ¶ added in v0.2.0
func (a *AlfredSites) Populate(dict ConfigDict)
type ConfigDict ¶
type ConfigDict map[Id]*SiteConfig
func (ConfigDict) String ¶
func (d ConfigDict) String() string
type CustomSites ¶
type CustomSites map[string]*SiteConfig
type Launcher ¶
type Launcher struct { Type domain.Type BasePath string ConfigPath string FileInfo os.FileInfo Sites Sites }
func (*Launcher) Populate ¶
func (l *Launcher) Populate(dict ConfigDict)
func (*Launcher) Save ¶
func (l *Launcher) Save(dict ConfigDict) error
type Pair ¶
type Pair [2]*Launcher
func (*Pair) Diff ¶ added in v0.2.0
func (p *Pair) Diff(dict ConfigDict) string
func (*Pair) Merge ¶
func (p *Pair) Merge(dict ConfigDict)
func (*Pair) Save ¶
func (p *Pair) Save(dict ConfigDict) error
type SiteConfig ¶
type SiteConfig struct { Uuid string `plist:"uuid,omitempty" json:"-"` Enabled bool `plist:"enabled" json:"-"` Utf8 bool `plist:"utf8" json:"-"` Trigger string `plist:"keyword" json:"trigger"` Name string `plist:"text" json:"name"` Url string `plist:"url" json:"url"` IconPath string `plist:"-" json:"iconPath"` }
func (*SiteConfig) Albert ¶
func (s *SiteConfig) Albert()
func (*SiteConfig) Alfred ¶
func (s *SiteConfig) Alfred()
func (*SiteConfig) Id ¶
func (s *SiteConfig) Id() Id
func (*SiteConfig) Normalize ¶
func (s *SiteConfig) Normalize()
func (*SiteConfig) PreserveUuid ¶
func (s *SiteConfig) PreserveUuid(key string)
type Sites ¶ added in v0.2.0
type Sites interface { List() []*SiteConfig Decode(io.ReadSeeker) error Encode(ConfigDict) ([]byte, error) Populate(ConfigDict) Convert(ConfigDict) Sites }
Click to show internal directories.
Click to hide internal directories.