Documentation
¶
Overview ¶
Package sysapproach is the library behind the sysapproach CLI.
Index ¶
Constants ¶
const DefaultUserAgent = "sysapproach-cli/dev (+https://github.com/tamnd/sysapproach-cli)"
DefaultUserAgent identifies the client to the server. An honest User-Agent is both polite and the thing most likely to keep a session unblocked.
const Host = "book.systemsapproach.org"
Host is the canonical hostname of the book site.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chapter ¶
type Chapter struct {
Rank int `json:"rank" csv:"rank" tsv:"rank"`
Number int `json:"number" csv:"number" tsv:"number"`
Title string `json:"title" csv:"title" tsv:"title"`
URL string `json:"url" csv:"url" tsv:"url"`
}
Chapter is one chapter of Computer Networks: A Systems Approach.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client talks to book.systemsapproach.org over HTTPS.
type Config ¶
type Config struct {
BaseURL string
Rate time.Duration
Timeout time.Duration
Retries int
UserAgent string
}
Config holds per-client tunables, all of which have sane defaults.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns a Config with polite, safe defaults.
type Domain ¶
type Domain struct{}
Domain is the sysapproach 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.