racingboard

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	LeagueShortName() string
	GetScheduledEvents(ctx context.Context) ([]*Event, error)
	HTTPPathPrefix() string
}

API ...

type Config

type Config struct {
	TodayFunc Todayer

	StartEnabled       *atomic.Bool `json:"enabled"`
	BoardDelay         string       `json:"boardDelay"`
	OnTimes            []string     `json:"onTimes"`
	OffTimes           []string     `json:"offTimes"`
	TightScrollPadding int          `json:"tightScrollPadding"`
	// contains filtered or unexported fields
}

Config ...

func (*Config) SetDefaults

func (c *Config) SetDefaults()

SetDefaults sets config defaults

type Event

type Event struct {
	Date time.Time
	Name string
}

Event ...

type RacingBoard

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

RacingBoard implements board.Board

func New

func New(api API, logger *zap.Logger, config *Config) (*RacingBoard, error)

New ...

func (*RacingBoard) Enabler

func (s *RacingBoard) Enabler() board.Enabler

func (*RacingBoard) GetHTTPHandlers

func (s *RacingBoard) GetHTTPHandlers() ([]*board.HTTPHandler, error)

GetHTTPHandlers ...

func (*RacingBoard) GetRPCHandler

func (s *RacingBoard) GetRPCHandler() (string, http.Handler)

GetRPCHandler ...

func (*RacingBoard) HasPriority

func (s *RacingBoard) HasPriority() bool

HasPriority ...

func (*RacingBoard) InBetween

func (s *RacingBoard) InBetween() bool

InBetween ...

func (*RacingBoard) Name

func (s *RacingBoard) Name() string

Name ...

func (*RacingBoard) Render

func (s *RacingBoard) Render(ctx context.Context, canvas board.Canvas) error

Render ...

type Server

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

Server ...

func (*Server) GetStatus

func (s *Server) GetStatus(ctx context.Context, req *emptypb.Empty) (*pb.StatusResp, error)

GetStatus ...

func (*Server) SetStatus

func (s *Server) SetStatus(ctx context.Context, req *pb.SetStatusReq) (*emptypb.Empty, error)

SetStatus ...

type Todayer

type Todayer func() []time.Time

Todayer is a func that returns a string representing a date that will be used for determining "Today's" games. This is useful in testing what past days looked like

Jump to

Keyboard shortcuts

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