types

package
v0.0.0-...-5a58481 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPlayTime = 60
)

Variables

This section is empty.

Functions

func ImagePlayerViewCreate

func ImagePlayerViewCreate(viewConfig c.ViewConfig) (c.View, error)

func MatchupsScrollViewCreate

func MatchupsScrollViewCreate(viewConfig c.ViewConfig) (c.View, error)

func NFLBoxViewCreate

func NFLBoxViewCreate(viewConfig c.ViewConfig) (c.View, error)

func ParticlesViewCreate

func ParticlesViewCreate(viewConfig c.ViewConfig) (c.View, error)

func PlaylistViewConfigCreate

func PlaylistViewConfigCreate() c.ViewConfig

func PlaylistViewCreate

func PlaylistViewCreate(viewConfig c.ViewConfig) (c.View, error)

func SleeperMatchupsViewCreate

func SleeperMatchupsViewCreate(viewConfig c.ViewConfig) (c.View, error)

func TemplateViewCreate

func TemplateViewCreate(viewConfig c.ViewConfig) (c.View, error)

func TextImageViewCreate

func TextImageViewCreate(viewConfig c.ViewConfig) (c.View, error)

func TextViewCreate

func TextViewCreate(viewConfig c.ViewConfig) (c.View, error)

Types

type ImagePlayerView

type ImagePlayerView struct {
	c.BaseView

	Src string
}

func (*ImagePlayerView) TemplateData

func (v *ImagePlayerView) TemplateData() map[string]interface{}

func (*ImagePlayerView) TemplateString

func (v *ImagePlayerView) TemplateString() string

type ImagePlayerViewConfig

type ImagePlayerViewConfig struct {
	Src string `json:"src" spec:"required='true',label='Src (URL/Filepath)'"`
}

type MatchupsScrollView

type MatchupsScrollView struct {
	c.BaseView

	Date     time.Time
	Matchups []model.Matchup
	Layout   string
	League   string
}

func (*MatchupsScrollView) Init

func (v *MatchupsScrollView) Init()

func (*MatchupsScrollView) Refresh

func (v *MatchupsScrollView) Refresh()

func (*MatchupsScrollView) TemplateData

func (v *MatchupsScrollView) TemplateData() map[string]interface{}

func (*MatchupsScrollView) TemplateString

func (v *MatchupsScrollView) TemplateString() string

type MatchupsScrollViewConfig

type MatchupsScrollViewConfig struct {
	Layout string    `json:"layout" spec:"label='Layout'"`
	Date   util.Date `json:"date" spec:"required='true',label='Date'"`
	League string    `json:"league" spec:"required='true',label='League'"`
}

type NFLBoxView

type NFLBoxView struct {
	c.BaseView

	Auto             bool
	Matchup          string
	Date             time.Time
	SportsFeedClient *d.SportsFeed
	Game             d.NFLBoxScoreResponseFormatted
	Games            []d.NFLBoxScoreResponseFormatted
	Duration         time.Duration

	Layout string
	// contains filtered or unexported fields
}

func (*NFLBoxView) Init

func (v *NFLBoxView) Init()

func (*NFLBoxView) RefreshGame

func (v *NFLBoxView) RefreshGame()

func (*NFLBoxView) RefreshPhase

func (v *NFLBoxView) RefreshPhase()

func (*NFLBoxView) Stop

func (v *NFLBoxView) Stop()

func (*NFLBoxView) TemplateData

func (v *NFLBoxView) TemplateData() map[string]interface{}

func (*NFLBoxView) TemplateString

func (v *NFLBoxView) TemplateString() string

type NFLBoxViewConfig

type NFLBoxViewConfig struct {
	Auto     bool      `json:"auto" spec:"required='true',label='Auto'"`
	Matchup  string    `json:"matchup" spec:"required='false',label='Matchup'"`
	Date     util.Date `json:"date" spec:"required='false',label='Date'"`
	Duration int       `json:"duration" spec:"required='false',label='Duration'"`
}

type ParticlesView

type ParticlesView struct {
	c.BaseView
}

func (*ParticlesView) TemplateString

func (v *ParticlesView) TemplateString() string

type ParticlesViewConfig

type ParticlesViewConfig struct{}

type PlaylistView

type PlaylistView struct {
	c.BaseView
	// contains filtered or unexported fields
}

func (*PlaylistView) Init

func (v *PlaylistView) Init()

func (*PlaylistView) NextView

func (v *PlaylistView) NextView()

func (*PlaylistView) Stop

func (v *PlaylistView) Stop()

func (*PlaylistView) TemplateData

func (v *PlaylistView) TemplateData() map[string]interface{}

func (*PlaylistView) TemplateString

func (v *PlaylistView) TemplateString() string

type PlaylistViewConfig

type PlaylistViewConfig struct {
	Views    []PlaylistViewConfigView   `json:"views" spec:"label='Views',min='1'"`
	Settings PlaylistViewConfigSettings `json:"settings" spec:"label='Global Settings'"`
}

type PlaylistViewConfigSettings

type PlaylistViewConfigSettings struct {
	Time time.Duration `json:"time" spec:"label='Duration(s)'"`
}

type PlaylistViewConfigView

type PlaylistViewConfigView struct {
	ViewId   string                     `json:"viewId" spec:"label='The View ID in the store'"`
	Settings PlaylistViewConfigSettings `json:"settings" spec:"label='Settings'"`
}

type SleeperMatchupsView

type SleeperMatchupsView struct {
	c.BaseView

	League        string
	Week          int
	SleeperClient *d.Sleeper

	Phase int
	// contains filtered or unexported fields
}

func (*SleeperMatchupsView) Init

func (v *SleeperMatchupsView) Init()

func (*SleeperMatchupsView) RefreshData

func (v *SleeperMatchupsView) RefreshData()

func (*SleeperMatchupsView) RefreshPhase

func (v *SleeperMatchupsView) RefreshPhase()

func (*SleeperMatchupsView) Stop

func (v *SleeperMatchupsView) Stop()

func (*SleeperMatchupsView) TemplateData

func (v *SleeperMatchupsView) TemplateData() map[string]interface{}

func (*SleeperMatchupsView) TemplateString

func (v *SleeperMatchupsView) TemplateString() string

type SleeperMatchupsViewConfig

type SleeperMatchupsViewConfig struct {
	LeagueID      string `json:"league_id" spec:"required='true',label='League ID'"`
	Week          int    `json:"week" spec:"required='true',min='1',max='18',label='Week'"`
	PhaseDuration int    `json:"phase_duration" spec:"required='false',label='Phase Duration'"`
	DataDuration  int    `json:"data_duration" spec:"required='false',label='Data Duration'"`
}

type TemplateView

type TemplateView struct {
	c.BaseView
	// contains filtered or unexported fields
}

func (*TemplateView) TemplateString

func (v *TemplateView) TemplateString() string

type TemplateViewConfig

type TemplateViewConfig struct {
	Template string `json:"template" spec:"required='true',label='Raw Template'"`
}

type TextImageView

type TextImageView struct {
	c.BaseView

	Text      string
	FontSize  int
	Alignment string
	Justify   string
	Color     string
	BgColor   string
	Src       string
}

func (*TextImageView) TemplateData

func (v *TextImageView) TemplateData() map[string]interface{}

func (*TextImageView) TemplateString

func (v *TextImageView) TemplateString() string

type TextImageViewConfig

type TextImageViewConfig struct {
	Text      string `json:"text" spec:"required='true',min='1',label='Text'"`
	FontSize  int    `json:"font-size" spec:"required='false',min='1',label='Font Size'"`
	Alignment string `json:"alignment" spec:"required='false',label='Alignment'"`
	Justify   string `json:"justify" spec:"required='false',label='Justify'"`
	Color     string `json:"color" spec:"required='false',label='Color'"`
	BgColor   string `json:"bg-color" spec:"required='false',label='Background Color'"`
	Src       string `json:"src" spec:"required='true',label='Src (URL/Filepath)'"`
}

type TextView

type TextView struct {
	c.BaseView

	Text      string
	Alignment string
	Justify   string
	Color     string
	BgColor   string
}

func (*TextView) TemplateData

func (v *TextView) TemplateData() map[string]interface{}

func (*TextView) TemplateString

func (v *TextView) TemplateString() string

type TextViewConfig

type TextViewConfig struct {
	Text      string `json:"text" spec:"required='true',min='1',label='Text'"`
	Alignment string `json:"alignment" spec:"required='false',label='Alignment'"`
	Justify   string `json:"justify" spec:"required='false',label='Justify'"`
	Color     string `json:"color" spec:"required='false',label='Color'"`
	BgColor   string `json:"bg-color" spec:"required='false',label='Background Color'"`
}

Jump to

Keyboard shortcuts

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