Generate voter data for known elections and simplify MaxVoters (0 = no maximum)
This commit is contained in:
@ -13,16 +13,21 @@ import (
|
||||
|
||||
// CreateElectionRequest defines model for CreateElectionRequest.
|
||||
type CreateElectionRequest struct {
|
||||
AreVotersKnown bool `json:"are_voters_known"`
|
||||
AreVotersKnown bool `json:"areVotersKnown"`
|
||||
Choices []string `json:"choices"`
|
||||
ExpiresAt time.Time `json:"expires_at"`
|
||||
ExpiresAt time.Time `json:"expiresAt"`
|
||||
|
||||
// MaxVoters Required when voters are known
|
||||
MaxVoters *int `json:"max_voters"`
|
||||
// MaxVoters Must be greater than 0 when voters are known; 0 = no limit
|
||||
MaxVoters int `json:"maxVoters"`
|
||||
Name string `json:"name"`
|
||||
Tokens int `json:"tokens"`
|
||||
}
|
||||
|
||||
// CreateElectionResponse defines model for CreateElectionResponse.
|
||||
type CreateElectionResponse struct {
|
||||
VoterIdentities *[]string `json:"voterIdentities,omitempty"`
|
||||
}
|
||||
|
||||
// ErrorResponse defines model for ErrorResponse.
|
||||
type ErrorResponse struct {
|
||||
// Code Machine-readable error code
|
||||
|
Reference in New Issue
Block a user