Documentation ¶
Index ¶
- type Client
- type ClientChallenge
- type ClientLeague
- type ClientMainOdds
- type ClientMatch
- type ClientMatchResponse
- type ClientOdds
- type ClientPeriods
- type ClientPeriodsTime
- type ClientScore
- type ClientSeason
- type ClientSection
- type ClientSport
- type ClientTeam
- type ClientTimeDetails
- type ClientTranslations
- type GameType
- type Match
- type Score
- type ScoringFunc
- type Service
- type StringOrInt
- type Team
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { GetMatches(ctx context.Context, gameType GameType) (ClientMatchResponse, error) GetLiveMatches(ctx context.Context, gameType GameType) (ClientMatchResponse, error) }
type ClientChallenge ¶
type ClientLeague ¶
type ClientMainOdds ¶
type ClientMainOdds struct { Outcome1 ClientOdds `json:"outcome_1"` Outcome2 ClientOdds `json:"outcome_2"` }
type ClientMatch ¶
type ClientMatch struct { ID int `json:"id"` SportID int `json:"sport_id"` HomeTeamID int `json:"home_team_id"` AwayTeamID int `json:"away_team_id"` LeagueID int `json:"league_id"` ChallengeID int `json:"challenge_id"` SeasonID int `json:"season_id"` VenueID int `json:"venue_id"` RefereeID interface{} `json:"referee_id"` Slug string `json:"slug"` Name string `json:"name"` Status string `json:"status"` StatusMore string `json:"status_more"` TimeDetails ClientTimeDetails `json:"time_details"` HomeTeam ClientTeam `json:"home_team"` AwayTeam ClientTeam `json:"away_team"` StartAt string `json:"start_at"` Priority int `json:"priority"` HomeScore ClientScore `json:"home_score"` AwayScore ClientScore `json:"away_score"` WinnerCode int `json:"winner_code"` AggregatedWinnerCode interface{} `json:"aggregated_winner_code"` ResultOnly bool `json:"result_only"` Coverage interface{} `json:"coverage"` GroundType interface{} `json:"ground_type"` RoundNumber interface{} `json:"round_number"` SeriesCount int `json:"series_count"` MediasCount interface{} `json:"medias_count"` StatusLineup int `json:"status_lineup"` FirstSupply interface{} `json:"first_supply"` CardsCode interface{} `json:"cards_code"` EventDataChange interface{} `json:"event_data_change"` LastedPeriod string `json:"lasted_period"` DefaultPeriodCount int `json:"default_period_count"` Attendance interface{} `json:"attendance"` CupMatchOrder interface{} `json:"cup_match_order"` CupMatchInRound interface{} `json:"cup_match_in_round"` Periods ClientPeriods `json:"periods"` RoundInfo interface{} `json:"round_info"` PeriodsTime ClientPeriodsTime `json:"periods_time"` MainOdds ClientMainOdds `json:"main_odds"` League ClientLeague `json:"league"` Challenge ClientChallenge `json:"challenge"` Season ClientSeason `json:"season"` Section ClientSection `json:"section"` Sport ClientSport `json:"sport"` }
type ClientMatchResponse ¶
type ClientMatchResponse struct {
Matches []ClientMatch `json:"data"`
}
type ClientOdds ¶
type ClientPeriods ¶
type ClientPeriodsTime ¶
type ClientPeriodsTime struct { CurrentTime int `json:"current_time"` Period1Time int `json:"period_1_time"` Period2Time int `json:"period_2_time"` Period3Time int `json:"period_3_time"` Period4Time int `json:"period_4_time"` Period5Time int `json:"period_5_time"` OverTimeTime int `json:"over_time_time"` }
type ClientScore ¶
type ClientScore map[string]StringOrInt
type ClientSeason ¶
type ClientSection ¶
type ClientSport ¶
type ClientTeam ¶
type ClientTeam struct { ID int `json:"id"` SportID int `json:"sport_id"` CategoryID int `json:"category_id"` VenueID int `json:"venue_id"` ManagerID int `json:"manager_id"` Slug string `json:"slug"` Name string `json:"name"` HasLogo bool `json:"has_logo"` Logo string `json:"logo"` NameTranslations ClientTranslations `json:"name_translations"` NameShort string `json:"name_short"` NameFull string `json:"name_full"` NameCode string `json:"name_code"` HasSub bool `json:"has_sub"` Gender string `json:"gender"` IsNationality bool `json:"is_nationality"` CountryCode string `json:"country_code"` Country string `json:"country"` Flag string `json:"flag"` Foundation interface{} `json:"foundation"` }
type ClientTimeDetails ¶
type ClientTranslations ¶
type Score ¶
func FormatBasketballScore ¶
func FormatBasketballScore(match ClientMatch) (Score, error)
func FormatTennisScore ¶
func FormatTennisScore(match ClientMatch) (Score, error)
type ScoringFunc ¶
type ScoringFunc func(ClientMatch) (Score, error)
type Service ¶
type Service interface { GetMatches(ctx context.Context, gameType GameType, live bool) ([]Match, error) UpdateMatches(ctx context.Context, live bool) error }
func NewService ¶
type StringOrInt ¶
type StringOrInt string
func (*StringOrInt) String ¶
func (soi *StringOrInt) String() string
func (*StringOrInt) UnmarshalJSON ¶
func (soi *StringOrInt) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.