Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config holds the application configuration.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns the default application configuration.
type Line ¶
type Line struct { HomePlayer1 Player HomePlayer2 Player AwayPlayer1 Player AwayPlayer2 Player WinnerScore string WinningTeam Team }
Line represents and individual line within a match.
type Match ¶
type Match struct { Date time.Time HomeTeam *Team VisitingTeam *Team Location *Organization Outcome struct { WinningTeam *Team WinnerPoints int LoserPoints int } Lines []Line }
Match represents a match consisting of multiple lines.
func (*Match) ForOrganization ¶
type Newsletter ¶
type Newsletter struct {
// contains filtered or unexported fields
}
func NewNewsletter ¶
func NewNewsletter(cfg Config) (*Newsletter, error)
func (*Newsletter) Generate ¶
func (n *Newsletter) Generate() error
func (*Newsletter) String ¶
func (n *Newsletter) String() string
type Organization ¶
type Organization struct { ID int `json:"id"` Name string `json:"name"` Teams []*Team `json:"teams"` // contains filtered or unexported fields }
Organization represents a USTA NorCal organization.
func LoadOrganization ¶
func LoadOrganization(id int) (*Organization, error)
LoadOrganization loads the organization details for the given organization ID.
func (*Organization) Equals ¶
func (o *Organization) Equals(ao *Organization) bool
func (*Organization) LoadTeams ¶
func (o *Organization) LoadTeams() (*Organization, error)
LoadTeams loads teams for an organization.
func (*Organization) ShortName ¶
func (o *Organization) ShortName() string
type Team ¶
type Team struct { ID int `json:"id"` Organization *Organization `json:"organization"` Name string `json:"name"` FriendlyName string `json:"friendly_name` Matches []Match `json:"matches` Players []Player `json:"players"` // contains filtered or unexported fields }
Team represents a USTA NorCal team.
func (*Team) LoadMatches ¶
LoadMatches loads the matches for a team.
func (*Team) LoadOrganization ¶
LoadOrganization loads the organization for a team.
Click to show internal directories.
Click to hide internal directories.