Documentation
¶
Overview ¶
Package cricsheet handles Cricsheet archive data.
Index ¶
- type ArchiveFilter
- type Client
- func (c *Client) CacheDir() string
- func (c *Client) Details(matchID string) (*cricket.MatchDetails, error)
- func (c *Client) IndexLocal() ([]cricket.Match, error)
- func (c *Client) IndexLocalFiltered(filter ArchiveFilter) ([]cricket.Match, error)
- func (c *Client) RefreshAllJSON(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArchiveFilter ¶
type ArchiveFilter struct {
Formats []string
Teams []string
Competitions []string
RecentDays int
Limit int
}
ArchiveFilter filters locally indexed Cricsheet matches.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client reads and indexes local Cricsheet JSON files.
func (*Client) Details ¶
func (c *Client) Details(matchID string) (*cricket.MatchDetails, error)
Details reads a cached Cricsheet JSON match and maps it into a detail model.
func (*Client) IndexLocal ¶
IndexLocal scans cached JSON files and returns lightweight match entries.
func (*Client) IndexLocalFiltered ¶
func (c *Client) IndexLocalFiltered(filter ArchiveFilter) ([]cricket.Match, error)
IndexLocalFiltered scans cached JSON files and returns filtered match entries.
Click to show internal directories.
Click to hide internal directories.