Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoSuchEvent = fmt.Errorf("mock: no such event")
ErrNoSuchEvent is returned when an event does not exist in the mock db.
View Source
var ErrNoSuchTeam = fmt.Errorf("mock: no such team")
ErrNoSuchTeam is returned when a team does not exist in the mock db.
View Source
var ErrNoSuchYear = fmt.Errorf("mock: no such year")
ErrNoSuchYear is returned when a year does not exist in the mock db.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct { Events map[int][]event.BasicEvent // year --> events Matches map[string][]match.Match // eventkey --> matches Photos map[int]map[string]string // year --> eventkey --> photo }
DB mocks a TBA API Consumer.
func (DB) GetEvents ¶
func (db DB) GetEvents(year int) ([]event.BasicEvent, error)
GetEvents gets all events in the mock db for TBA by year.
func (DB) GetMatches ¶
GetMatches gets all matches in the mock db for TBA by eventKey.
Click to show internal directories.
Click to hide internal directories.