vo

package
v0.0.0-...-160c400 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

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

type Calculator interface {
	Calculate(number, winNumber string) (level, prize int)
}

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

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

Jump to

Keyboard shortcuts

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