Documentation
¶
Overview ¶
Package homebrew is the library behind the homebrew command line: the HTTP client and typed data models for the Homebrew formula API at formulae.brew.sh.
Index ¶
Constants ¶
const DefaultUserAgent = "Mozilla/5.0 (compatible; homebrew-cli/dev; +https://github.com/tamnd/homebrew-cli)"
DefaultUserAgent is the User-Agent sent with every request.
const Host = "formulae.brew.sh"
Host is the site this client talks to.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cask ¶
type Cask struct {
Rank int `json:"rank" csv:"rank" tsv:"rank"`
Token string `json:"token" csv:"token" tsv:"token"`
Name string `json:"name" csv:"name" tsv:"name"`
Desc string `json:"desc" csv:"desc" tsv:"desc"`
Homepage string `json:"homepage" csv:"homepage" tsv:"homepage"`
Version string `json:"version" csv:"version" tsv:"version"`
URL string `json:"url" csv:"url" tsv:"url"`
}
Cask is the public output type for a Homebrew cask.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client talks to formulae.brew.sh over HTTP.
type Config ¶
type Config struct {
BaseURL string
UserAgent string
Rate time.Duration
Timeout time.Duration
Retries int
}
Config holds all tunables for a Client.
type Domain ¶
type Domain struct{}
Domain is the homebrew driver. It carries no state; the per-run client is built by the factory Register hands kit.
func (Domain) Info ¶
func (Domain) Info() kit.DomainInfo
Info describes the scheme, the hostnames a pasted link is matched against, and the identity reused for the binary's help and version.
type Formula ¶
type Formula struct {
Rank int `json:"rank" csv:"rank" tsv:"rank"`
Name string `json:"name" csv:"name" tsv:"name"`
FullName string `json:"full_name" csv:"full_name" tsv:"full_name"`
Desc string `json:"desc" csv:"desc" tsv:"desc"`
License string `json:"license" csv:"license" tsv:"license"`
Homepage string `json:"homepage" csv:"homepage" tsv:"homepage"`
Version string `json:"version" csv:"version" tsv:"version"`
Tap string `json:"tap" csv:"tap" tsv:"tap"`
Dependencies []string `json:"dependencies" csv:"dependencies" tsv:"dependencies"`
URL string `json:"url" csv:"url" tsv:"url"`
}
Formula is the public output type for a Homebrew formula.