gsb

package
v0.0.0-...-ff4b9cc Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PkgName             string = "gsb"
	EmojiSoccer         string = "\xe2\x9a\xbd"
	EmojiTrophy         string = "\xf0\x9f\x8f\x86"
	EmojiSquaredVS      string = "\xf0\x9f\x86\x9a"
	ActionMatches       string = "matches"
	ActionStandings     string = "standings"
	ActionTeams         string = "teams"
	ActionTeam          string = "team"
	ActionMatchCalendar string = "match calendar"
	ActionMatchday      string = "matchday"
	ActionSquad         string = "squad"
	TextMatches         string = "Matches"
	TextStandings       string = "Standings"
	TextTeams           string = "Teams"
	TextMatchCalendar   string = "Match calendar"
	TextCurrentMatchday string = "Current matchday"
	TextMatchday        string = "Matchday"
	TextReferees        string = "Referees"
	TextSquad           string = "Squad"
	TextMore            string = "More"
	TextRound           string = "Round"
	TextPremierLeague   string = "Premier League"
	TextBundesliga      string = "Bundesliga"
	TextPrimeraDivision string = "Primera Division"
	CodePremierLeague   string = "PL"
	CodeBundesliga      string = "BL1"
	CodePrimeraDivision string = "PD"
	TextSpace           string = " "

	StatusScheduled string = "SCHEDULED"
	StatusInPlay    string = "IN_PLAY"
	StatusPaused    string = "PAUSED"
	StatusFinished  string = "FINISHED"
	StatusPostponed string = "POSTPONED"
	StatusCanceled  string = "CANCELED"
	StatusSuspended string = "SUSPENDED"
	StatusAwarded   string = "AWARDED"
)

pkg constants

View Source
const (
	PL  int = 2021
	BL1 int = 2002
	PD  int = 2014
)

competition codes

View Source
const (
	ColorDodgeBlue   = "#1e90ff"
	ColorIndigo      = "#4b0082"
	ColorAero        = "#7cb9e8"
	ColorGreenYellow = "#adff2f"
	ColorAcidGreen   = "#b0bf1a"
	ColorOrange      = "#fb8c00"
	ColorAmber       = "#ff7e00"
	ColorLightGray   = "#c0c0c0"
	ColorWhite       = "#ffffff"
	ColorBlack       = "#000000"
	ColorGray        = "#7f7f7f"
	ColorBlue        = "#0000ff"
)

colors https://htmlcolorcodes.com/color-names/

Variables

This section is empty.

Functions

This section is empty.

Types

type BubbleCompetition

type BubbleCompetition struct {
	Competition *fbd.Competition
}

BubbleCompetition contains competition information for creating a bubble container of particular competition.

func (*BubbleCompetition) Body

func (bc *BubbleCompetition) Body() *ui.ExtBoxComponent

Body block. Specify a box component.

func (*BubbleCompetition) Direction

Direction is text directionality and the order of components in horizontal boxes in the container. Specify one of the following values:

ltr: Left to right
rtl: Right to left

func (*BubbleCompetition) Footer

func (bc *BubbleCompetition) Footer() *ui.ExtBoxComponent

Footer block. Specify a box component.

func (*BubbleCompetition) Header

func (bc *BubbleCompetition) Header() *ui.ExtBoxComponent

Header block. Specify a box component.

func (*BubbleCompetition) Hero

Hero block. Specify an image component.

func (*BubbleCompetition) Styles

func (bc *BubbleCompetition) Styles() *linebot.BubbleStyle

Styles of each block. Specify a bubble style object.

func (*BubbleCompetition) Type

Type is FlexContainerTypeBubble.

type BubbleMatchCalendar

type BubbleMatchCalendar struct {
	Competition *fbd.Competition
	Matchdays   Matchdays
	Month       string
}

BubbleMatchCalendar contains competition and matches information of month for creating a bubble container to list matchdays per month.

func (*BubbleMatchCalendar) Body

Body block. Specify a box component.

func (*BubbleMatchCalendar) Direction

Direction is text directionality and the order of components in horizontal boxes in the container. Specify one of the following values:

ltr: Left to right
rtl: Right to left

func (*BubbleMatchCalendar) Footer

func (bm *BubbleMatchCalendar) Footer() *ui.ExtBoxComponent

Footer block. Specify a box component.

func (*BubbleMatchCalendar) Header

func (bm *BubbleMatchCalendar) Header() *ui.ExtBoxComponent

Header block. Specify a box component.

func (*BubbleMatchCalendar) Hero

Hero block. Specify an image component.

func (*BubbleMatchCalendar) Styles

func (bm *BubbleMatchCalendar) Styles() *linebot.BubbleStyle

Styles of each block. Specify a bubble style object.

func (*BubbleMatchCalendar) Type

Type is FlexContainerTypeBubble.

type BubbleMatchday

type BubbleMatchday struct {
	Competition *fbd.Competition
	Match       *fbd.Match
}

BubbleMatchday contains competition and teams information for creating a bubble container of teams of the particular competition.

func (*BubbleMatchday) Body

func (bm *BubbleMatchday) Body() *ui.ExtBoxComponent

Body block. Specify a box component.

func (*BubbleMatchday) Direction

Direction is text directionality and the order of components in horizontal boxes in the container. Specify one of the following values:

ltr: Left to right
rtl: Right to left

func (*BubbleMatchday) Footer

func (bm *BubbleMatchday) Footer() *ui.ExtBoxComponent

Footer block. Specify a box component.

func (*BubbleMatchday) Header

func (bm *BubbleMatchday) Header() *ui.ExtBoxComponent

Header block. Specify a box component.

func (*BubbleMatchday) Hero

Hero block. Specify an image component.

func (*BubbleMatchday) Styles

func (bm *BubbleMatchday) Styles() *linebot.BubbleStyle

Styles of each block. Specify a bubble style object.

func (*BubbleMatchday) Type

Type is FlexContainerTypeBubble.

type BubbleSquad

type BubbleSquad struct {
	Competition *fbd.Competition
	Team        *fbd.Team
	Squad       *fbd.Squad
}

BubbleSquad contains competition and team information for creating a bubble container of team squads information.

func (*BubbleSquad) Body

func (bs *BubbleSquad) Body() *ui.ExtBoxComponent

Body block. Specify a box component.

func (*BubbleSquad) Direction

Direction is text directionality and the order of components in horizontal boxes in the container. Specify one of the following values:

ltr: Left to right
rtl: Right to left

func (*BubbleSquad) Footer

func (bs *BubbleSquad) Footer() *ui.ExtBoxComponent

Footer block. Specify a box component.

func (*BubbleSquad) Header

func (bs *BubbleSquad) Header() *ui.ExtBoxComponent

Header block. Specify a box component.

func (*BubbleSquad) Hero

func (bs *BubbleSquad) Hero() *linebot.ImageComponent

Hero block. Specify an image component.

func (*BubbleSquad) Styles

func (bs *BubbleSquad) Styles() *linebot.BubbleStyle

Styles of each block. Specify a bubble style object.

func (*BubbleSquad) Type

Type is FlexContainerTypeBubble.

type BubbleStandings

type BubbleStandings struct {
	Competition *fbd.Competition
	Standings   *fbd.Standings
}

BubbleStandings contains competition and standings information for creating a bubble container of standings table of the particular competition.

func (*BubbleStandings) Body

func (bs *BubbleStandings) Body() *ui.ExtBoxComponent

Body block. Specify a box component.

func (*BubbleStandings) Direction

Direction is text directionality and the order of components in horizontal boxes in the container. Specify one of the following values:

ltr: Left to right
rtl: Right to left

func (*BubbleStandings) Footer

func (bs *BubbleStandings) Footer() *ui.ExtBoxComponent

Footer block. Specify a box component.

func (*BubbleStandings) Header

func (bs *BubbleStandings) Header() *ui.ExtBoxComponent

Header block. Specify a box component.

func (*BubbleStandings) Hero

Hero block. Specify an image component.

func (*BubbleStandings) Styles

func (bs *BubbleStandings) Styles() *linebot.BubbleStyle

Styles of each block. Specify a bubble style object.

func (*BubbleStandings) Type

Type is FlexContainerTypeBubble.

type BubbleTeam

type BubbleTeam struct {
	Competition *fbd.Competition
	Team        *fbd.Team
}

BubbleTeam contains competition and team information for creating a bubble container of team information.

func (*BubbleTeam) Body

func (bt *BubbleTeam) Body() *ui.ExtBoxComponent

Body block. Specify a box component.

func (*BubbleTeam) Direction

func (bt *BubbleTeam) Direction() linebot.FlexBubbleDirectionType

Direction is text directionality and the order of components in horizontal boxes in the container. Specify one of the following values:

ltr: Left to right
rtl: Right to left

func (*BubbleTeam) Footer

func (bt *BubbleTeam) Footer() *ui.ExtBoxComponent

Footer block. Specify a box component.

func (*BubbleTeam) Header

func (bt *BubbleTeam) Header() *ui.ExtBoxComponent

Header block. Specify a box component.

func (*BubbleTeam) Hero

func (bt *BubbleTeam) Hero() *linebot.ImageComponent

Hero block. Specify an image component.

func (*BubbleTeam) Styles

func (bt *BubbleTeam) Styles() *linebot.BubbleStyle

Styles of each block. Specify a bubble style object.

func (*BubbleTeam) Type

Type is FlexContainerTypeBubble.

type BubbleTeams

type BubbleTeams struct {
	Competition *fbd.Competition
	Teams       map[int]*fbd.Team
}

BubbleTeams contains competition and teams information for creating a bubble container of teams of the particular competition.

func (*BubbleTeams) Body

func (bt *BubbleTeams) Body() *ui.ExtBoxComponent

Body block. Specify a box component.

func (*BubbleTeams) Direction

Direction is text directionality and the order of components in horizontal boxes in the container. Specify one of the following values:

ltr: Left to right
rtl: Right to left

func (*BubbleTeams) Footer

func (bt *BubbleTeams) Footer() *ui.ExtBoxComponent

Footer block. Specify a box component.

func (*BubbleTeams) Header

func (bt *BubbleTeams) Header() *ui.ExtBoxComponent

Header block. Specify a box component.

func (*BubbleTeams) Hero

func (bt *BubbleTeams) Hero() *linebot.ImageComponent

Hero block. Specify an image component.

func (*BubbleTeams) Styles

func (bt *BubbleTeams) Styles() *linebot.BubbleStyle

Styles of each block. Specify a bubble style object.

func (*BubbleTeams) Type

Type is FlexContainerTypeBubble.

type Legend

type Legend struct {
	// contains filtered or unexported fields
}

Legend type maps the position of standings table to a background color to indicate the status of promotion or relegation.

type MatchCalendar

type MatchCalendar map[string]Matchdays

MatchCalendar defines map of MatchdayMatches for each month.

type Matchdays

type Matchdays map[int][]*fbd.Match

Matchdays defines map of matches for each matchday.

type SepakBola

type SepakBola struct {
	Competitions map[int]*fbd.Competition
}

SepakBola type SepakBola

func (*SepakBola) CompetitionsContents

func (sepakbola *SepakBola) CompetitionsContents() *ui.ExtCarouselContainer

CompetitionsContents function generates CarouselContainer for competitions menu.

func (*SepakBola) CompetitionsMessage

func (sepakbola *SepakBola) CompetitionsMessage() *linebot.FlexMessage

CompetitionsMessage function generates FlexMessage for competitions menu.

func (*SepakBola) GetCompetitions

func (sepakbola *SepakBola) GetCompetitions()

GetCompetitions gets intrested competitions.

func (*SepakBola) Init

func (sepakbola *SepakBola) Init()

Init initialize SepakBola instance.

func (*SepakBola) MatchCalendarContents

func (sepakbola *SepakBola) MatchCalendarContents(competition *fbd.Competition) *ui.ExtCarouselContainer

MatchCalendarContents function generates CarouselContainer for matchday selection.

func (*SepakBola) MatchCalendarMessage

func (sepakbola *SepakBola) MatchCalendarMessage(competition *fbd.Competition) *linebot.FlexMessage

MatchCalendarMessage function generates FlexMessage for matchday selection.

func (*SepakBola) MatchdayContents

func (sepakbola *SepakBola) MatchdayContents(competition *fbd.Competition, matchday int) *ui.ExtCarouselContainer

MatchdayContents function generates CarouselContainer for particular matchday.

func (*SepakBola) MatchdayMessage

func (sepakbola *SepakBola) MatchdayMessage(competition *fbd.Competition, matchday int) *linebot.FlexMessage

MatchdayMessage function generates FlexMessage for particular matchday.

func (*SepakBola) MatchdesTypeMessage

func (sepakbola *SepakBola) MatchdesTypeMessage(competition *fbd.Competition, matchday int) linebot.SendingMessage

MatchdesTypeMessage function reply quick reply button message.

func (*SepakBola) SquadContents

func (sepakbola *SepakBola) SquadContents(competition *fbd.Competition, teamID int, squadID *int) *ui.ExtCarouselContainer

SquadContents function generates CarouselContainer for team squads.

func (*SepakBola) SquadMessage

func (sepakbola *SepakBola) SquadMessage(competition *fbd.Competition, teamID, squadID int) linebot.SendingMessage

SquadMessage function generates FlexMessage for team squads.

func (*SepakBola) StandingsContents

func (sepakbola *SepakBola) StandingsContents(competition *fbd.Competition) *ui.ExtCarouselContainer

StandingsContents function generates CarouselContainer for standings.

func (*SepakBola) StandingsMessage

func (sepakbola *SepakBola) StandingsMessage(competition *fbd.Competition) *linebot.FlexMessage

StandingsMessage function generates FlexMessage for standings.

func (*SepakBola) TeamContents

func (sepakbola *SepakBola) TeamContents(competition *fbd.Competition, teamID int) *ui.ExtCarouselContainer

TeamContents function generates CarouselContainer for particular team.

func (*SepakBola) TeamMessage

func (sepakbola *SepakBola) TeamMessage(competition *fbd.Competition, teamID int) linebot.SendingMessage

TeamMessage function generates FlexMessage for particular team.

func (*SepakBola) TeamsContents

func (sepakbola *SepakBola) TeamsContents(competition *fbd.Competition) *ui.ExtCarouselContainer

TeamsContents function generates CarouselContainer for teams.

func (*SepakBola) TeamsMessage

func (sepakbola *SepakBola) TeamsMessage(competition *fbd.Competition) *linebot.FlexMessage

TeamsMessage function generates FlexMessage for teams.

Jump to

Keyboard shortcuts

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