Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CalculatorMap = make(map[TicketType]Calculator)
View Source
var GeneratorMap = make(map[TicketType]Generator)
View Source
var SuperLottoRuleMap = []rule{ {/* contains filtered or unexported fields */}, {/* contains filtered or unexported fields */}, {/* contains filtered or unexported fields */}, {/* contains filtered or unexported fields */}, {/* contains filtered or unexported fields */}, {/* contains filtered or unexported fields */}, {/* contains filtered or unexported fields */}, {/* contains filtered or unexported fields */}, {/* contains filtered or unexported fields */}, {/* contains filtered or unexported fields */}, {/* contains filtered or unexported fields */}, {/* contains filtered or unexported fields */}, }
View Source
var TwoToneSpherePriceMap = map[int]int{
1: 5000000,
2: 200000,
3: 3000,
4: 200,
5: 10,
6: 5,
}
View Source
var TwoToneSphereRuleMap = map[int]map[int]int{
6: {1: 1, 0: 2},
5: {1: 3, 0: 4},
4: {1: 4, 0: 5},
3: {1: 5, 0: 0},
2: {1: 6, 0: 0},
1: {1: 6, 0: 0},
0: {1: 6, 0: 0},
}
Functions ¶
This section is empty.
Types ¶
type Calculator ¶
func GetCalculator ¶
func GetCalculator(ticketType TicketType) Calculator
type Generator ¶
type Generator interface {
Generate(ctx context.Context, period string) entity.LotteryRecord
}
func GetGenerator ¶
func GetGenerator(ticketType TicketType) Generator
type SuperLottoCalculator ¶
type SuperLottoCalculator struct{}
func (SuperLottoCalculator) Calculate ¶
func (c SuperLottoCalculator) Calculate(number, winNumber string) (level, prize int)
type SuperLottoGenerator ¶
type SuperLottoGenerator struct{}
func (SuperLottoGenerator) Generate ¶
func (SuperLottoGenerator) Generate(ctx context.Context, period string) entity.LotteryRecord
type TicketType ¶
type TicketType string
const SuperLotto TicketType = "SuperLotto"
const TwoToneSphere TicketType = "TwoToneSphere"
type TwoToneSphereCalculator ¶
type TwoToneSphereCalculator struct { }
func (TwoToneSphereCalculator) Calculate ¶
func (t TwoToneSphereCalculator) Calculate(number, winNumber string) (level, prize int)
type TwoToneSphereGenerator ¶
type TwoToneSphereGenerator struct { }
func (TwoToneSphereGenerator) Generate ¶
func (t TwoToneSphereGenerator) Generate(ctx context.Context, period string) entity.LotteryRecord
Click to show internal directories.
Click to hide internal directories.