Documentation ¶
Index ¶
- func DoRequest(client *http.Client, key string, url string) ([]byte, error)
- func DryRun(w io.Writer, c Collection) (int, error)
- type Collection
- type Game
- type GameCollection
- func (gc *GameCollection) Append(g GameCollection)
- func (gc GameCollection) Datum(i int) interface{}
- func (gc GameCollection) FprintDatum(w io.Writer, i int) (int, error)
- func (gc GameCollection) GetWeek(week int) GameCollection
- func (gc GameCollection) ID(i int) int64
- func (gc GameCollection) Len() int
- func (gc GameCollection) LinkRefs(tc TeamCollection, vc VenueCollection, col *fs.CollectionRef) error
- func (gc GameCollection) Ref(i int) *fs.DocumentRef
- func (gc GameCollection) RefByID(id int64) (*fs.DocumentRef, bool)
- func (gc GameCollection) Split(include []int) (in GameCollection, out GameCollection)
- type LatLon
- type Team
- type TeamCollection
- func (tc TeamCollection) Datum(i int) interface{}
- func (tc TeamCollection) EliminateNonContenders(gc GameCollection) TeamCollection
- func (tc TeamCollection) FprintDatum(w io.Writer, i int) (int, error)
- func (tc TeamCollection) ID(i int) int64
- func (tc TeamCollection) Len() int
- func (tc TeamCollection) LinkRefs(vc VenueCollection, col *fs.CollectionRef) error
- func (tc TeamCollection) Ref(i int) *fs.DocumentRef
- func (tc TeamCollection) RefByID(id int64) (*fs.DocumentRef, bool)
- type TransactionIterator
- type Venue
- type VenueCollection
- func (vc VenueCollection) Datum(i int) interface{}
- func (vc VenueCollection) FprintDatum(w io.Writer, i int) (int, error)
- func (vc VenueCollection) ID(i int) int64
- func (vc VenueCollection) Len() int
- func (vc VenueCollection) LinkRefs(col *fs.CollectionRef) error
- func (vc VenueCollection) Ref(i int) *fs.DocumentRef
- func (vc VenueCollection) RefByID(id int64) (*fs.DocumentRef, bool)
- type Week
- type WeekCollection
- func (wc WeekCollection) Datum(i int) interface{}
- func (wc WeekCollection) FirstStartTime() time.Time
- func (wc WeekCollection) FprintDatum(w io.Writer, i int) (int, error)
- func (wc WeekCollection) ID(i int) int64
- func (wc WeekCollection) Len() int
- func (wc WeekCollection) LinkRefs(col *fs.CollectionRef) error
- func (wc WeekCollection) Ref(i int) *fs.DocumentRef
- func (wc WeekCollection) RefByID(id int64) (*fs.DocumentRef, bool)
- func (wc WeekCollection) Select(n int) (WeekCollection, bool)
- func (wc WeekCollection) Split(include []int) (in WeekCollection, out WeekCollection)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Collection ¶
type Game ¶
type Game struct { ID int64 `json:"id"` Week int `json:"week"` StartTime time.Time `json:"start_date"` StartTimeTBD bool `json:"start_time_tbd"` NeutralSite bool `json:"neutral_site"` VenueID int64 `json:"venue_id"` HomeID int64 `json:"home_id"` AwayID int64 `json:"away_id"` HomePoints *int `json:"home_points"` AwayPoints *int `json:"away_points"` }
type GameCollection ¶
type GameCollection struct {
// contains filtered or unexported fields
}
GameCollection is a collection of games meeting the IterableWriter interface.
func GetAllGames ¶
func (*GameCollection) Append ¶
func (gc *GameCollection) Append(g GameCollection)
func (GameCollection) Datum ¶
func (gc GameCollection) Datum(i int) interface{}
func (GameCollection) FprintDatum ¶
func (GameCollection) GetWeek ¶
func (gc GameCollection) GetWeek(week int) GameCollection
GetWeek splits the GameCollection into multiple GameCollections indexed by week.
func (GameCollection) ID ¶
func (gc GameCollection) ID(i int) int64
func (GameCollection) Len ¶
func (gc GameCollection) Len() int
Len gets the length of the collection
func (GameCollection) LinkRefs ¶
func (gc GameCollection) LinkRefs(tc TeamCollection, vc VenueCollection, col *fs.CollectionRef) error
func (GameCollection) Ref ¶
func (gc GameCollection) Ref(i int) *fs.DocumentRef
func (GameCollection) RefByID ¶
func (gc GameCollection) RefByID(id int64) (*fs.DocumentRef, bool)
func (GameCollection) Split ¶
func (gc GameCollection) Split(include []int) (in GameCollection, out GameCollection)
Split splits a GameCollection into two based on idices to include or exclude from the results.
type Team ¶
type Team struct { ID int64 `json:"id"` School string `json:"school"` Mascot *string `json:"mascot"` Abbreviation *string `json:"abbreviation"` AltName1 *string `json:"alt_name1"` AltName2 *string `json:"alt_name2"` AltName3 *string `json:"alt_name3"` Color *string `json:"color"` AltColor *string `json:"alt_color"` Logos []string `json:"logos"` Location struct { VenueID *int64 `json:"venue_id"` } }
type TeamCollection ¶
type TeamCollection struct {
// contains filtered or unexported fields
}
func (TeamCollection) Datum ¶
func (tc TeamCollection) Datum(i int) interface{}
func (TeamCollection) EliminateNonContenders ¶
func (tc TeamCollection) EliminateNonContenders(gc GameCollection) TeamCollection
func (TeamCollection) FprintDatum ¶
func (TeamCollection) ID ¶
func (tc TeamCollection) ID(i int) int64
func (TeamCollection) Len ¶
func (tc TeamCollection) Len() int
Len returns the number of weeks in the collection
func (TeamCollection) LinkRefs ¶
func (tc TeamCollection) LinkRefs(vc VenueCollection, col *fs.CollectionRef) error
func (TeamCollection) Ref ¶
func (tc TeamCollection) Ref(i int) *fs.DocumentRef
func (TeamCollection) RefByID ¶
func (tc TeamCollection) RefByID(id int64) (*fs.DocumentRef, bool)
type TransactionIterator ¶
type TransactionIterator struct {
UpdateFcn func(*fs.Transaction, *fs.DocumentRef, interface{}) error
}
func (TransactionIterator) IterateTransaction ¶
func (ti TransactionIterator) IterateTransaction(ctx context.Context, client *fs.Client, c Collection, n int) <-chan error
IterateTransaction iterates the collection by `n` elements at a time and uses the given function to write to Firestore
type Venue ¶
type Venue struct { ID int64 `json:"id"` Name string `json:"name"` Capacity int `json:"capacity"` Grass bool `json:"grass"` City string `json:"city"` State string `json:"state"` Zip string `json:"zip"` CountryCode string `json:"country_code"` Location LatLon `json:"location"` Year int `json:"year"` Dome bool `json:"dome"` Timezone string `json:"timezone"` }
func MakeUnknownVenue ¶
func MakeUnknownVenue() Venue
type VenueCollection ¶
type VenueCollection struct {
// contains filtered or unexported fields
}
func (VenueCollection) Datum ¶
func (vc VenueCollection) Datum(i int) interface{}
func (VenueCollection) FprintDatum ¶
func (VenueCollection) ID ¶
func (vc VenueCollection) ID(i int) int64
func (VenueCollection) Len ¶
func (vc VenueCollection) Len() int
func (VenueCollection) LinkRefs ¶
func (vc VenueCollection) LinkRefs(col *fs.CollectionRef) error
func (VenueCollection) Ref ¶
func (vc VenueCollection) Ref(i int) *fs.DocumentRef
func (VenueCollection) RefByID ¶
func (vc VenueCollection) RefByID(id int64) (*fs.DocumentRef, bool)
type WeekCollection ¶
type WeekCollection struct {
// contains filtered or unexported fields
}
func (WeekCollection) Datum ¶
func (wc WeekCollection) Datum(i int) interface{}
func (WeekCollection) FirstStartTime ¶
func (wc WeekCollection) FirstStartTime() time.Time
func (WeekCollection) FprintDatum ¶
func (WeekCollection) ID ¶
func (wc WeekCollection) ID(i int) int64
func (WeekCollection) Len ¶
func (wc WeekCollection) Len() int
Len returns the number of weeks in the collection
func (WeekCollection) LinkRefs ¶
func (wc WeekCollection) LinkRefs(col *fs.CollectionRef) error
func (WeekCollection) Ref ¶
func (wc WeekCollection) Ref(i int) *fs.DocumentRef
func (WeekCollection) RefByID ¶
func (wc WeekCollection) RefByID(id int64) (*fs.DocumentRef, bool)
func (WeekCollection) Select ¶
func (wc WeekCollection) Select(n int) (WeekCollection, bool)
func (WeekCollection) Split ¶
func (wc WeekCollection) Split(include []int) (in WeekCollection, out WeekCollection)
Split splits a WeekCollection into two based on indices to include or exclude from the results.
Click to show internal directories.
Click to hide internal directories.