sport

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2021 License: MIT Imports: 11 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gesamtspielplan

type Gesamtspielplan struct {
	Matches      []Match                   `json:"matches" binding:"required"`
	Season       season.Season             `json:"season" binding:"required"`
	Championship championship.Championship `json:"championship" binding:"required"`
	Group        group.Group               `json:"group" binding:"required"`
	AgeCategory  ageCategory.AgeCategory   `json:"agecategory" binding:"required"`
	Class        class.Class               `json:"class" binding:"required"`
	Relay        relay.Relay               `json:"relay"`
}

Matches represents a slice of multiple Match structs.

func (Gesamtspielplan) GetDescription

func (gsp Gesamtspielplan) GetDescription() string

func GetDescription will return a formatted description (multi line) of the GSP (without matches)

func (Gesamtspielplan) GetDistinctTeams

func (gsp Gesamtspielplan) GetDistinctTeams() []string

func GetDistinctTeams will return a list of all teams in a Gesamtspielplan the returned string slice will not contain duplicates.

type Match

type Match struct {
	// Date represents the date the match is scheduled
	Date time.Time `json:"date"`

	// Team represents the teams participating on the match
	Team matchTeam `json:"team"`

	// Goal represents the achieved goals of the match
	Goal matchGoal `json:"goal"`

	// LocationId represents the ID number of the location where the match takes place
	LocationId int `json:"location"`

	// Id represents the unique ID of the match
	Id int `json:"id" binding:"required"`

	// Annotation represents the annotations deposited for a match
	Annotation matchAnnotation `json:"annotation"`

	// MatchReport represents the URL to the PDF file containing the report of a match
	ReportId int `json:"report"`

	// Referee represents a slice of strings containing each referee related to the match
	Referee []string `json:"referee"`
}

Match represents a nuLiga match (game)

func (Match) GetDescription

func (m Match) GetDescription() string

func GetDescription will return a formatted description (multi line) of the match

func (Match) GetReportUrl

func (m Match) GetReportUrl() (url.URL, error)

func GetReportUrl will return a URL if a Report is available

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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