bet

package
v0.0.0-...-12e33ea Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BetService

type BetService struct {
	Repo         repo.Repo
	Conf         *slackbet.Conf
	SlackService slackbet.SlackService
}

func (*BetService) CalculateWhoWins

func (service *BetService) CalculateWhoWins(reference int) (string, error)

func (*BetService) EndBet

func (service *BetService) EndBet(user string) (string, error)

func (*BetService) GetBetInfo

func (service *BetService) GetBetInfo(id int) (string, error)

func (*BetService) GetBetInfoForMonth

func (service *BetService) GetBetInfoForMonth(monthIndex int) (string, error)

func (*BetService) GetLastEndedBetInfo

func (service *BetService) GetLastEndedBetInfo() (string, error)

func (*BetService) IsAuthorizedUser

func (service *BetService) IsAuthorizedUser(user string) bool

func (*BetService) ListAbsentUsers

func (service *BetService) ListAbsentUsers() (string, error)

func (*BetService) ListBets

func (service *BetService) ListBets() (string, error)

func (*BetService) ParseRequestAndCheckToken

func (service *BetService) ParseRequestAndCheckToken(r *http.Request) error

func (*BetService) SaveBet

func (service *BetService) SaveBet(user string, number int, extraInfo string) (string, error)

func (*BetService) SaveWinner

func (service *BetService) SaveWinner(betID int, winner int) (string, error)

func (*BetService) StartNewBet

func (service *BetService) StartNewBet(user string) (string, error)

type ByBet

type ByBet []repo.BetDetail

func (ByBet) Len

func (a ByBet) Len() int

func (ByBet) Less

func (a ByBet) Less(i, j int) bool

func (ByBet) Swap

func (a ByBet) Swap(i, j int)

Jump to

Keyboard shortcuts

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