Versions in this module Expand all Collapse all v0 v0.0.1 Apr 3, 2024 Changes in this version + var ErrEmptyBody = errors.New("response has empty body") + var ErrEmptyPalette = errors.New("palette may not be empty") + var ErrGet = errors.New("executing get request") + var ErrParseBody = errors.New("parsing response body") + var ErrPost = errors.New("executing post request") + var ErrReadBody = errors.New("reading response body") + var ErrResponseStatus = errors.New("invalid response status") + var ErrURLParse = errors.New("parsing URL") + var ErrValidation = errors.New("validation error") + func PaletteQueue(ctx context.Context, model string, cm *ColorMind, chanSize int) (chan *color.RGBA, chan error) + type Color color.RGBA + func (c *Color) Marshal() ([]byte, error) + func (c *Color) Unmarshal(v []byte) error + type ColorMind struct + Client *http.Client + URL string + func New() *ColorMind + func (c *ColorMind) GetPalette(model string, p *Palette) (*Palette, error) + func (c *ColorMind) GetPaletteWithContext(ctx context.Context, model string, p *Palette) (*Palette, error) + func (c *ColorMind) ListModels() ([]string, error) + func (c *ColorMind) ListModelsWithContext(ctx context.Context) ([]string, error) + type Palette [5]*color.RGBA + func (p *Palette) MarshalJSON() ([]byte, error) + func (p *Palette) UnmarshalJSON(b []byte) error