Documentation
¶
Index ¶
- Constants
- func FilterChoices(choices []string, query string) []string
- func GUID() string
- func SelfUpdate(plist []byte, icons []ServiceIcon) (err error)
- type AlfredOutput
- type AlfredOutputItem
- type Config
- type PArray
- type PBool
- type PDict
- type PInteger
- type PList
- type PReal
- type PString
- type ScoredChoices
- type ServiceConfig
- type ServiceIcon
- type URITemplate
Constants ¶
View Source
const ( PListHeader = `<?xml version="1.0" encoding="UTF-8"?>` PListDoctype = `<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">` )
Variables ¶
This section is empty.
Functions ¶
func FilterChoices ¶
func SelfUpdate ¶
func SelfUpdate(plist []byte, icons []ServiceIcon) (err error)
Types ¶
type AlfredOutput ¶
type AlfredOutput []AlfredOutputItem
<?xml version="1.0"?> <items>
<item uid="#{q dashboard_name}" valid="YES" autocomplete="#{q dashboard_name}">
<title>#{dashboard_name}</title>
<arg>https://app.datadoghq.com/screen/#{dashboard_id}</arg>
</item>
</items>
func (AlfredOutput) MakeXML ¶
func (a AlfredOutput) MakeXML() ([]byte, error)
func (AlfredOutput) MarshalXML ¶
func (a AlfredOutput) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type AlfredOutputItem ¶
type Config ¶
type Config map[string]*ServiceConfig
{
"myservice": {
"template": "https://foo/bar/{id}/{kind}",
"substitutions": {
"myshortcut": {
"id": "5000",
"kind": "funny"
}
}
}
}
func ReadConfig ¶
func (Config) GetService ¶
func (c Config) GetService(service string) (ServiceConfig, error)
type PArray ¶
func (PArray) MarshalXML ¶
type PDict ¶
func (PDict) MarshalXML ¶
type PList ¶
type PList PDict
func MakeWorkflowPList ¶
func (PList) MarshalXML ¶
func (PList) PListWithHeader ¶
type ScoredChoices ¶
func NewScoredChoices ¶
func NewScoredChoices(choices []string, query string) ScoredChoices
func (ScoredChoices) Len ¶
func (a ScoredChoices) Len() int
func (ScoredChoices) Less ¶
func (a ScoredChoices) Less(i, j int) bool
func (ScoredChoices) Swap ¶
func (a ScoredChoices) Swap(i, j int)
type ServiceConfig ¶
type ServiceConfig struct {
GUID string `json:"-"`
Template URITemplate `json:"template"`
Keyword string `json:"keyword"`
Substitutions map[string]map[string]interface{} `json:"substitutions"`
}
func (*ServiceConfig) Shortcuts ¶
func (s *ServiceConfig) Shortcuts() []string
type ServiceIcon ¶
func DownloadServiceIcons ¶
func DownloadServiceIcons(c Config) ([]ServiceIcon, error)
type URITemplate ¶
type URITemplate uritemplates.UriTemplate
func (*URITemplate) UnmarshalJSON ¶
func (t *URITemplate) UnmarshalJSON(b []byte) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.
