round

package
v0.0.0-...-d9656e6 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeRoundToken

func EncodeRoundToken(roundURL string) string

func ParticipantsFromRound

func ParticipantsFromRound(round *persistence.Round) []string

func UpdatedRoundWithNextCandidate

func UpdatedRoundWithNextCandidate(currentRound *persistence.Round) *persistence.Round

Types

type Participant

type Participant struct {
	UUID       string `json:"uuid"`
	Name       string `json:"name"`
	RoundCount int    `json:"roundCount"`
}

type Round

type Round struct {
	URL              string        `json:"url"`
	Participants     []Participant `json:"participants"`
	CurrentCandidate Participant   `json:"currentCandidate"`
}

func TransformRound

func TransformRound(round *persistence.Round) *Round

type WithToken

type WithToken struct {
	Token        *string  `json:"token"`
	RoundURL     *string  `json:"roundUrl"`
	Participants []string `json:"participants"`
}

Jump to

Keyboard shortcuts

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