raffle

package
v0.0.0-...-e9c30ff Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompleteRaffle

func CompleteRaffle(ctxCtx context.Context, raffleID, txHash string) error

CompleteRaffle modifies the given raffle, which must be in winner confirmed status, in order to change it to a complete state

func ConfirmRaffleWinner

func ConfirmRaffleWinner(ctxCtx context.Context, raffleID string) error

ConfirmRaffleWinner modifies the given raffle, which must be in pending status, to mark its winner as confirmed

func DecodeSecretKey

func DecodeSecretKey(raffleSecretKey string) (*ecdsa.PrivateKey, error)

func GenerateRaffleEntriesPlaintext

func GenerateRaffleEntriesPlaintext(raffleID string, periodStart, periodEnd time.Time, entries []*types.PlayedMediaRaffleEntry, drawings []string, output io.Writer) error

func ProcessRaffle

func ProcessRaffle(ctxCtx context.Context, raffleID string, periodStart, periodEnd time.Time, secretKey *ecdsa.PrivateKey) ([]*types.RaffleDrawing, []*types.PlayedMediaRaffleEntry, error)

ProcessRaffle returns information about a raffle, triggering raffle lifecycle operations in the process as needed

func RaffleEntriesURL

func RaffleEntriesURL(websiteURL string, year, week int) string

RaffleEntriesURL returns the URL of the entries for the given raffle

func RaffleInfoURL

func RaffleInfoURL(websiteURL string, year, week int) string

RaffleInfoURL returns the URL of the information for the given raffle

func RedrawRaffle

func RedrawRaffle(ctxCtx context.Context, raffleID, reason string, secretKey *ecdsa.PrivateKey) error

RedrawRaffle modifies the given raffle in order to redraw it, due to the provided reason

func WeeklyRaffleParameters

func WeeklyRaffleParameters(year, week int) (string, time.Time, time.Time, bool)

WeeklyRaffleParameters returns the correct data necessary to process the raffle relative to the provided year and week

Types

This section is empty.

Jump to

Keyboard shortcuts

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