models

package
v0.0.0-...-d6640ab Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TOGGLE_MAP = map[string]bool{}

Functions

func NewScoreboard

func NewScoreboard(date time.Time) tea.Model

Types

type GameModel

type GameModel struct {
	Table                 table.Model
	ActiveGameID          string
	ActiveGame            nba.BoxScoreSummary
	PreviousModel         base.BaseModel
	Help                  help.Model
	Width, Height, Margin int
}

func InitGameView

func InitGameView(activeGameID string, activeGame nba.BoxScoreSummary, previousModel base.BaseModel) *GameModel

func (GameModel) Init

func (m GameModel) Init() tea.Cmd

func (GameModel) Update

func (m GameModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (GameModel) View

func (m GameModel) View() string

type Model

type Model struct {
	Mode        mode
	List        list.Model
	CurrentDate time.Time
	Quitting    bool
	Gameview    bool
	// contains filtered or unexported fields
}

func (Model) Init

func (m Model) Init() tea.Cmd

func (*Model) InitPlayByPlayView

func (m *Model) InitPlayByPlayView(activeGameID string, activeGame nba.BoxScoreSummary) (*play.PlayByPlayModel, tea.Cmd)

func (Model) InitScoreboard

func (m Model) InitScoreboard() tea.Msg

func (Model) ScoreboardInitFilter

func (m Model) ScoreboardInitFilter()

func (*Model) Update

func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handle IO and commands

func (Model) View

func (m Model) View() string

View return the text UI to be output to the terminal

type SelectMsg

type SelectMsg struct {
	ActiveScorebardID uint
}

type StandingsModel

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

func InitStandingsView

func InitStandingsView() *StandingsModel

func (StandingsModel) Init

func (m StandingsModel) Init() tea.Cmd

func (StandingsModel) Update

func (m StandingsModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (StandingsModel) View

func (m StandingsModel) View() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳