data

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const EventTypeGoal = "Goal"
View Source
const EventTypeOwnGoal = "Own Goal"
View Source
const EventTypePenaltyGoal = "Penalty Goal"
View Source
const EventTypePenalyKick = "Penalty Kick"
View Source
const EventTypeRedCard = "Red Card"
View Source
const EventTypeSeconYellowCard = "Second Yellow Card"
View Source
const EventTypeSubIn = "Substitution In"
View Source
const EventTypeSubOut = "Substitution Out"
View Source
const EventTypeYellowCard = "Yellow Card"
View Source
const StatusFinished = "Finished"
View Source
const StatusLive = "Live"
View Source
const StatusScheduled = "Scheduled"

Variables

View Source
var TeamInfoByCode = map[string]TeamInfo{
	"ECU": {Name: "Ecuador", Group: "A", FirstColor: "#FFD100", SecondColor: "#EF3340"},
	"NED": {Name: "Netherlands", Group: "A", FirstColor: "#F36C21", SecondColor: "#F36C21"},
	"QAT": {Name: "Qatar", Group: "A", FirstColor: "#7F1431", SecondColor: "#7F1431"},
	"SEN": {Name: "Senegal", Group: "A", FirstColor: "#00853f", SecondColor: "#fdef42"},
	"ENG": {Name: "England", Group: "B", FirstColor: "#FFFFFF", SecondColor: "#000040"},
	"IRN": {Name: "Iran", Group: "B", FirstColor: "#239F40", SecondColor: "#DA0000"},
	"USA": {Name: "United States", Group: "B", FirstColor: "#BB2533", SecondColor: "#1F2742"},
	"WAL": {Name: "Wales", Group: "B", FirstColor: "#FFFFFF", SecondColor: "#C8102E"},
	"ARG": {Name: "Argentina", Group: "C", FirstColor: "#43A1D5", SecondColor: "#FFFFFF"},
	"MEX": {Name: "Mexico", Group: "C", FirstColor: "#ce1126", SecondColor: "#006847"},
	"POL": {Name: "Poland", Group: "C", FirstColor: "#ffffff", SecondColor: "#dc143c"},
	"KSA": {Name: "Saudi Arabia", Group: "C", FirstColor: "#006c35", SecondColor: "#ffffff"},
	"AUS": {Name: "Australia", Group: "D", FirstColor: "#00843D", SecondColor: "#FFCD00"},
	"DEN": {Name: "Denmark", Group: "D", FirstColor: "#CD181E", SecondColor: "#FFFFFF"},
	"FRA": {Name: "France", Group: "D", FirstColor: "#21304D", SecondColor: "#17548C"},
	"TUN": {Name: "Tunisia", Group: "D", FirstColor: "#E70013", SecondColor: "#E70013"},
	"CRC": {Name: "Costa Rica", Group: "E", FirstColor: "#002b7f", SecondColor: "#ed1c24"},
	"GER": {Name: "Germany", Group: "E", FirstColor: "#FFFFFF", SecondColor: "#000000"},
	"JPN": {Name: "Japan", Group: "E", FirstColor: "#000555", SecondColor: "#000555"},
	"ESP": {Name: "Spain", Group: "E", FirstColor: "#8B0D11", SecondColor: "#FCB507"},
	"BEL": {Name: "Belgium", Group: "F", FirstColor: "#E30613", SecondColor: "#FFD500"},
	"CAN": {Name: "Canada", Group: "F", FirstColor: "#C5281C", SecondColor: "#C5281C"},
	"CRO": {Name: "Croatia", Group: "F", FirstColor: "#ED1C24", SecondColor: "#0457A2"},
	"MAR": {Name: "Morocco", Group: "F", FirstColor: "#17A376", SecondColor: "#17A376"},
	"BRA": {Name: "Brazil", Group: "G", FirstColor: "#FFDC02", SecondColor: "#19AE47"},
	"CMR": {Name: "Cameroon", Group: "G", FirstColor: "#479A50", SecondColor: "#ED1C24"},
	"SRB": {Name: "Serbia", Group: "G", FirstColor: "#B72E3E", SecondColor: "#B49D5A"},
	"SUI": {Name: "Switzerland", Group: "G", FirstColor: "#FF0000", SecondColor: "#740C14"},
	"GHA": {Name: "Ghana", Group: "H", FirstColor: "#FFE500", SecondColor: "#000000"},
	"POR": {Name: "Portugal", Group: "H", FirstColor: "#E42518", SecondColor: "#0D6938"},
	"KOR": {Name: "South Korea", Group: "H", FirstColor: "#EC0F32", SecondColor: "#021858"},
	"URU": {Name: "Uruguay", Group: "H", FirstColor: "#55B5E5", SecondColor: "#55B5E5"},
}

Functions

This section is empty.

Types

type Event

type Event struct {
	// MatchEventType is a MatchEventTypeGoal when the type is known - otherwise a string
	Type string

	Minute string
	Player string
}

type EventType

type EventType string

type GroupTable

type GroupTable struct {
	Letter string
	Table  []GroupTableTeam
}

type GroupTableTeam

type GroupTableTeam struct {
	Code              string
	Points            int
	Wins              int
	Draws             int
	Losses            int
	MatchesPlayed     int
	GoalsFor          int
	GoalsAgainst      int
	GoalsDifferential int
}

type Match

type Match struct {
	ID             int
	HomeTeamCode   string
	AwayTeamCode   string
	Date           time.Time
	Venue          string
	HomeTeamScore  uint64
	AwayTeamScore  uint64
	WinnerTeamCode string
	Minute         string
	HomeTeamEvents []Event
	AwayTeamEvents []Event
	Status         Status
	HomeTeamLineup []Player
	AwayTeamLineup []Player

	// Stage is a Stage when the type is known - otherwise a string
	Stage string
}

type Player

type Player struct {
	Name        string
	ShirtNumber int
}

type Stage

type Stage string
const StageFinal Stage = "Final"
const StageGroup Stage = "Group"
const StageLast16 Stage = "1/8"
const StageQuarter Stage = "1/4"
const StageSemi Stage = "1/2"
const StageThird Stage = "3rd"

type Status

type Status string

type TeamInfo

type TeamInfo struct {
	Name        string
	Group       string
	FirstColor  string
	SecondColor string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL