Versions in this module Expand all Collapse all v0 v0.1.0 Jun 14, 2026 Changes in this version + const DefaultAPIKey + const DefaultBaseURL + const DefaultUserAgent + const Host + var ErrNotFound = errors.New("not found") + type Client struct + HTTP *http.Client + Rate time.Duration + Retries int + UserAgent string + func NewClient() *Client + func (c *Client) Food(ctx context.Context, fdcID int) (*Food, error) + func (c *Client) Get(ctx context.Context, rawURL string) ([]byte, error) + func (c *Client) List(ctx context.Context, dataType string, limit int) ([]*Food, error) + func (c *Client) Search(ctx context.Context, query, dataType string, limit int) ([]*Food, error) + type Config struct + APIKey string + BaseURL string + Rate time.Duration + Retries int + Timeout time.Duration + UserAgent string + func DefaultConfig() Config + type Domain struct + func (Domain) Classify(input string) (uriType, id string, err error) + func (Domain) Info() kit.DomainInfo + func (Domain) Locate(uriType, id string) (string, error) + func (Domain) Register(app *kit.App) + type Food struct + BrandOwner string + DataType string + Description string + ID int + Nutrients []Nutrient + type Nutrient struct + Name string + Unit string + Value float64