Documentation ¶
Index ¶
- type DBroke
- func (b *DBroke[E, T]) AddPrize(data string) *DBroke[E, T]
- func (b *DBroke[E, T]) AddUser(data T) *DBroke[E, T]
- func (b *DBroke[E, T]) Do() ([]WinnerPrizePair[T], bool)
- func (b *DBroke[E, T]) ExportData() *LotteryData[E, T]
- func (b *DBroke[E, T]) NewLotteryID()
- func (b *DBroke[E, T]) SetBlock(data string) *DBroke[E, T]
- func (b *DBroke[E, T]) SetLotteryID(data string) *DBroke[E, T]
- func (b *DBroke[E, T]) SetPrizes(data []string) *DBroke[E, T]
- func (b *DBroke[E, T]) SetUsers(data E) *DBroke[E, T]
- type LotteryData
- type WinnerPrizePair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBroke ¶
func (*DBroke[E, T]) Do ¶
func (b *DBroke[E, T]) Do() ([]WinnerPrizePair[T], bool)
func (*DBroke[E, T]) ExportData ¶
func (b *DBroke[E, T]) ExportData() *LotteryData[E, T]
func (*DBroke[E, T]) NewLotteryID ¶
func (b *DBroke[E, T]) NewLotteryID()
func (*DBroke[E, T]) SetLotteryID ¶
type LotteryData ¶
type LotteryData[E []T, T string | int64] struct { LotteryID string UserIDs E PrizeList []string BlockHash string }
func (LotteryData[E, T]) DrawLottery ¶
func (data LotteryData[E, T]) DrawLottery() []WinnerPrizePair[T]
type WinnerPrizePair ¶
Click to show internal directories.
Click to hide internal directories.