Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Game ¶
type Game struct { ID string `db:"id" json:"id"` StartAt NullTime `db:"start_at" json:"start_at,omitempty"` HomeScore uint8 `db:"home_score" json:"home_score"` AwayScore uint8 `db:"away_score" json:"away_score"` HomeTeam Team `db:"home_team" json:"home_team"` AwayTeam Team `db:"away_team" json:"away_team"` HomeShots []*Shot `json:"home_shots,omitempty"` AwayShots []*Shot `json:"away_shots,omitempty"` }
func FindGameByID ¶
type GameResp ¶
type GameResp struct { *Game HomeShots []PublicShot `json:"home_shots,omitempty"` AwayShots []PublicShot `json:"away_shots,omitempty"` }
type LeanPlayer ¶
type LeanPlayer struct { *Player Team omit `json:"team,omitempty"` }
type Player ¶
type Player struct { ID string `db:"id" json:"id"` Name string `db:"full_name" json:"name,omitempty"` Active bool `db:"active" json:"active,omitempty"` JerseyNumber uint8 `db:"jersey_number" json:"jersey_number,omitempty,string"` Team Team `db:"team" json:"team,omitempty"` CreatedAt string `db:"created_at" json:"created_at,omitempty"` UpdatedAt string `db:"updated_at" json:"updated_at,omitempty"` }
func FindPlayerByID ¶
type PublicShot ¶
type PublicShot struct { *Shot Game omit `json:"game,omitempty"` Team omit `json:"team,omitempty"` }
type Shot ¶
type Shot struct { ID string `db:"id" json:"id"` Player Player `db:"player" json:"player,omitempty"` Game Game `db:"game" json:"game,omitempty"` Team Team `db:"team" json:"team,omitempty"` PtValue uint8 `db:"pt_value" json:"pt_value"` Made bool `db:"made" json:"made"` XAxis uint64 `db:"x_axis" json:"x_axis"` YAxis uint64 `db:"y_axis" json:"y_axis"` CreatedAt string `db:"created_at" json:"created_at"` UpdatedAt string `db:"updated_at" json:"updated_at"` }
type Team ¶
type Team struct { ID string `db:"id" json:"id"` Name string `db:"name" json:"name,omitempty"` Players []*Player `json:"players,omitempty"` Games []Game `json:"games,omitempty"` }
func FindTeamByID ¶
func (*Team) GetPlayers ¶
func (team *Team) GetPlayers()
func (Team) PlayerIsOnTeam ¶
type TeamResp ¶
type TeamResp struct { *Team Players []LeanPlayer `json:"players,omitempty"` }
for lean team json without redundant nested types
Click to show internal directories.
Click to hide internal directories.