ralphred

package
v0.0.0-...-a37ef66 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Temperature        = "temperature"
	Distance           = "distance"
	DigitalInformation = "digital information"
	Time               = "time"
)
View Source
const CACHE_TTL int = 86400
View Source
const DevdocsBaseUrl string = "https://devdocs.io/"

Variables

This section is empty.

Functions

func Run

func Run(cmd string, query string)

Types

type AlfredItem

type AlfredItem struct {
	UID          string   `json:"uid,omitempty"`
	Title        string   `json:"title"`
	Subtitle     string   `json:"subtitle,omitempty"`
	Arg          []string `json:"arg"`
	Autocomplete string   `json:"autocomplete"`
}

type AlfredResponse

type AlfredResponse struct {
	Items []AlfredItem `json:"items"`
}

func (AlfredResponse) Print

func (resp AlfredResponse) Print()

type DevDocsDocEntry

type DevDocsDocEntry struct {
	Name string `json:"name"`
	Path string `json:"path"`
	Type string `json:"type"`
}

type DevDocsDocIndex

type DevDocsDocIndex struct {
	Entries []DevDocsDocEntry `json:"entries"`
	Types   []DevDocsDocType  `json:"types"`
}

type DevDocsDocType

type DevDocsDocType struct {
	Name  string `json:"name"`
	Count int64  `json:"count"`
	Slug  string `json:"slug"`
}

type DevdocsDocSet

type DevdocsDocSet struct {
	Name    string `json:"name"`
	Slug    string `json:"slug"`
	Type    string `json:"type"`
	Version string `json:"version"`
	Release string `json:"release"`
	Mtime   int64  `json:"mtime"`
	DBSize  int64  `json:"db_size"`
}

type MatchedUnit

type MatchedUnit struct {
	Unit   Unit
	Prefix Prefix
}

func (MatchedUnit) FromBase

func (u MatchedUnit) FromBase(measurement float64) float64

func (MatchedUnit) Scale

func (u MatchedUnit) Scale() float64

func (MatchedUnit) Symbol

func (u MatchedUnit) Symbol() string

func (MatchedUnit) ToBase

func (u MatchedUnit) ToBase(measurement float64) float64

type Prefix

type Prefix struct {
	Name     string
	Symbol   string
	Exponent float64
	Base     float64
}

type StringConversion

type StringConversion struct {
	Description string
	Convert     func(string) string
}

type TimeOperation

type TimeOperation struct {
	Commands []string
	Apply    func(time.Time, []string) (time.Time, error)
}

type Unit

type Unit struct {
	Name     string
	Symbol   string
	Type     string
	Prefixes []Prefix
	ToBase   func(float64) float64
	FromBase func(float64) float64
}

type WeekdayOperation

type WeekdayOperation string
const (
	NextWeekday WeekdayOperation = "next"
	PrevWeekday WeekdayOperation = "prev"
	ThisWeekday WeekdayOperation = "this"
)

Jump to

Keyboard shortcuts

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