marathon

package
v0.0.0-...-2f9a7ba Latest Latest
Warning

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

Go to latest
Published: May 9, 2019 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GameStatusNotStarted = MarathonGameStatus(iota)
	GameStatusRunning
	GameStatusFinished
)
View Source
const CurrentMarathon = 1

Variables

This section is empty.

Functions

func NewMarathonModule

func NewMarathonModule(bot *roll.Bot, db storm.Node) (roll.Module, error)

Types

type Marathon

type Marathon struct {
	ID    int             `json:"id" storm:"id,increment"`
	Name  *string         `json:"name"`
	Games []*MarathonGame `json:"games"`
}

func (*Marathon) CurrentGame

func (m *Marathon) CurrentGame() *MarathonGame

func (*Marathon) NextGame

func (m *Marathon) NextGame() error

func (*Marathon) ResetGame

func (m *Marathon) ResetGame() error

func (*Marathon) ResetMarathon

func (m *Marathon) ResetMarathon() error

type MarathonGame

type MarathonGame struct {
	Name        *string             `json:"name"`
	TwitchGame  *string             `json:"twitch_game"`
	Link        *string             `json:"link"`
	System      *string             `json:"system"`
	Status      *MarathonGameStatus `json:"status"`
	StartedTime *time.Time          `json:"started_time"`
	EndedTime   *time.Time          `json:"ended_time"`
}

type MarathonGameStatus

type MarathonGameStatus int

type MarathonModule

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

func (*MarathonModule) Start

func (m *MarathonModule) Start() error

func (*MarathonModule) Stop

func (m *MarathonModule) Stop() error

type MarathonService

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

func NewMarathonService

func NewMarathonService(module *MarathonModule) *MarathonService

func (*MarathonService) Get

func (s *MarathonService) Get(r *http.Request, id *int, marathon *Marathon) error

func (*MarathonService) New

func (s *MarathonService) New(r *http.Request, args *Marathon, reply *int) error

func (*MarathonService) Update

func (s *MarathonService) Update(r *http.Request, args *Marathon, reply *int) error

Jump to

Keyboard shortcuts

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