Documentation
¶
Index ¶
- type Admin
- type BoardMember
- type Election
- type Organizer
- type SecureVoting
- func (sv *SecureVoting) CheckAdmin(adminId, adminPasswd string) (Admin, error)
- func (sv *SecureVoting) CreateElections(organizerId, organizerPasswd, electionId string, initElectionConfig Election)
- func (sv *SecureVoting) CreateOrganizer(id string, passwd string) (Organizer, error)
- func (sv *SecureVoting) GetElectionInfo(electionId string) (Election, error)
- func (sv *SecureVoting) ListElections() []string
- type Voter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoardMember ¶
* the most secure way would be : 1. send an email with confirmation 2. after clicking the link in the email, he would received PrivateKey in base64 format 3. after sending private key, public key is saved in a structure
the simplest solution : define board member, in response receive private key
type Election ¶
type Election struct {
Id, Title string
Options []string
Voters []Voter
BoardMember []BoardMember
}
type SecureVoting ¶
type SecureVoting struct { Admins map[string]Admin ActiveElections map[string]Election Organizers map[string]Organizer }
func NewSecureVoting ¶
func NewSecureVoting() *SecureVoting
func (*SecureVoting) CheckAdmin ¶
func (sv *SecureVoting) CheckAdmin(adminId, adminPasswd string) (Admin, error)
func (*SecureVoting) CreateElections ¶
func (sv *SecureVoting) CreateElections(organizerId, organizerPasswd, electionId string, initElectionConfig Election)
func (*SecureVoting) CreateOrganizer ¶
func (sv *SecureVoting) CreateOrganizer(id string, passwd string) (Organizer, error)
func (*SecureVoting) GetElectionInfo ¶
func (sv *SecureVoting) GetElectionInfo(electionId string) (Election, error)
func (*SecureVoting) ListElections ¶
func (sv *SecureVoting) ListElections() []string
Click to show internal directories.
Click to hide internal directories.