Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrIDWithNoMatch = errors.New("ID did not match any tickets")
ErrIDWithNoMatch is thrown when the tickitid does not match any tickets
Functions ¶
func ExportOdds ¶
func ExportOdds() []string
ExportOdds returns a human readable version of the ticket odds
Types ¶
type CheckedTicketAmount ¶
CheckedTicketAmount represents a ticket after it has been checked Note that tickets can have multiple odds with different winning prizes
func CheckAmount ¶
func CheckAmount(id string, amount int) (CheckedTicketAmount, error)
CheckAmount checks a ticket a certain amount
type CheckedTicketUntilWin ¶
type CheckedTicketUntilWin struct {
Prize int
Price int
AmountBought int
OutOfOdds int
AmountDeductedTotal int
Profit int
}
CheckedTicketUntilWin is what is returned to the user after they choose to buy until win
func CheckUntilWin ¶
func CheckUntilWin(id string) (CheckedTicketUntilWin, error)
CheckUntilWin buys tickets until a success
Click to show internal directories.
Click to hide internal directories.