Documentation ¶
Overview ¶
Package justscored contains shared DynamoDB code used by goal-checker and goal-notifier Lambda functions.
Index ¶
Constants ¶
View Source
const ( Away = "away" Home = "home" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Goal ¶
type Goal struct { EventID int // e.g. 123 (Hash Key) Player string // e.g. "Bender RODRIGUEZ" PlayerTeam string // "home" or "away" GoalTime string // e.g. "90'+2'" GoalType string // "goal", "goal-penalty" or "goal-own" MatchID string AwayTeam map[string]interface{} HomeTeam map[string]interface{} CreatedAt time.Time Processed bool NotificationSentAt interface{} // time.Time if sent, nil otherwise }
Goal holds all relevant World Cup goal information, based on worldcup.Match and worldcup.TeamEvent structure
func GetMatchGoals ¶
GetMatchGoals parses passed worldcup.Match and returns a list of its goals
func (Goal) GetTeamInfo ¶ added in v0.0.7
GetTeamInfo returns scorer team info
func (Goal) SetDBValue ¶ added in v0.0.6
SetDBValue updates goal DynamoDB field with passed value
func (Goal) ToSlackMessage ¶ added in v0.0.6
ToSlackMessage formats goal data to a Slack compatible string format
Click to show internal directories.
Click to hide internal directories.