Documentation
¶
Overview ¶
Package chroma finds the colourways in jane's chroma repository on GitHub: the .css files of its colourways/sources folder, on its main branch.
GitHub's contents API lists the folder as JSON, each file with its name and the address it is downloaded from. The listing is asked at fetch time, so a colourway added to the repository is found with no change here.
GitHub limits an address that sends no token to sixty questions an hour. A fetch asks one.
The repository is public. This package only fetches to the machine it runs on.
The archive holds the same files wherever it is asked, and is asked only by name.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Colourways ¶
type Colourways struct {
// contains filtered or unexported fields
}
Colourways is the chroma repository's colourways at GitHub.
func New ¶
func New(get web.Web) (*Colourways, error)
New is the colourways asked through get. It refuses no web.
func (*Colourways) ByNameOnly ¶
func (*Colourways) ByNameOnly() bool
ByNameOnly says the archive is asked only when it is named: what it holds does not depend on a place in the sky.
func (*Colourways) Find ¶
func (colours *Colourways) Find(*celestialdata.Near) ( []*celestialdata.Product, error)
Find is every .css file GitHub lists in the folder, whatever the circle. A listing of none is an error, since the folder is not the one that was meant. An entry that is not a file, is not a .css file, has no address, or is not one plain file name is passed over.
func (*Colourways) Name ¶
func (colours *Colourways) Name() string
Name is the adapter's name as the command line takes it.