elections

package
v0.9.9 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Election

type Election struct {
	Title      string      `yaml:"title"`
	Zone       string      `yaml:"zone"`
	StartRound uint64      `yaml:"startround"`
	Nominees   []string    `yaml:"nominees,omitempty"`
	NomineeIds []int       `yaml:"nomineeids,omitempty"`
	Votes      map[int]int `yaml:"votes,omitempty"`
}

Election represents a running election.

type ElectionsModule

type ElectionsModule struct {
	// contains filtered or unexported fields
}

ElectionsModule owns all elections state.

type ElectionsState

type ElectionsState struct {
	ActiveElection *Election         `yaml:"activeelection,omitempty"`
	Winners        map[string]Winner `yaml:"winners,omitempty"`
	Coffers        map[string]int    `yaml:"coffers,omitempty"`
	TaxRates       map[string]int    `yaml:"taxrates,omitempty"`
}

ElectionsState is the persisted state for the elections module.

type Winner

type Winner struct {
	CharacterName     string `yaml:"charactername"`
	UserId            int    `yaml:"userid"`
	Title             string `yaml:"title"`
	LastElectionRound uint64 `yaml:"lastelectionround,omitempty"`
}

Winner records the outcome of a completed election.

Jump to

Keyboard shortcuts

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