Skip to content

Latest commit

 

History

History
328 lines (201 loc) · 13.9 KB

FreieWahl.Voting.md

File metadata and controls

328 lines (201 loc) · 13.9 KB

FreieWahl.Voting

Contents

IChallengeStore type

Namespace

FreieWahl.Voting.Registrations

Summary

Stores challenges required for authenticating registration requests to the tokenstore application

DeleteChallenge(registrationId) method

Summary

deletes the challenge for a given registration id (e.g. when a registration is denied)

Returns

the future of this operation

Parameters
Name Type Description
registrationId System.String the registration id

DeleteChallenges(votingId) method

Summary

deletes all open challenges for a voting (e.g. when the voting is deleted)

Returns

the future of this operation

Parameters
Name Type Description
votingId System.String the id of a voting

GetChallenge(registrationId) method

Summary

gets the challenge for a given registration

Returns

the challenge for the registration with the given id

Parameters
Name Type Description
registrationId System.String the registration id

SetChallenge(challenge) method

Summary

stores a given challenge

Returns

the future of this operation

Parameters
Name Type Description
challenge FreieWahl.Voting.Registrations.Challenge a challenge

IRegistrationStore type

Namespace

FreieWahl.Voting.Registrations

Summary

stores all open and completed registrations.

AddCompletedRegistration(completedRegistration) method

Summary

adds a completed registration

Returns

the future of this operation

Parameters
Name Type Description
completedRegistration FreieWahl.Voting.Registrations.CompletedRegistration the completed registration (granted or denied)

AddOpenRegistration(openRegistration) method

Summary

adds an open registration

Returns

the future of this registration

Parameters
Name Type Description
openRegistration FreieWahl.Voting.Registrations.OpenRegistration the open registration

GetCompletedRegistrations(votingId) method

Summary

gets all completed registrations for a given voting id

Returns

a list of completed registrations (denied or granted)

Parameters
Name Type Description
votingId System.String the voting id

GetOpenRegistration(registrationStoreId) method

Summary

gets a single open registration

Returns

the registration with the given id

Parameters
Name Type Description
registrationStoreId System.String the registration id

GetOpenRegistrationsForVoting(votingId) method

Summary

gets all open registrations for a given voting

Returns

a list of open registrations

Parameters
Name Type Description
votingId System.String the voting id

IsRegistrationUnique(dataSigneeId,votingId) method

Summary

checks if someone with the given signee id has already registered for a given voting id - required to avoid double registrations

Returns

true, if there is no registration for the given signee id and voting id

Parameters
Name Type Description
dataSigneeId System.String the signee id of the voter (e.g. mobile phone number or buergerkarten-number)
votingId System.String the voting id

RemoveOpenRegistration(id) method

Summary

removes an open registration

Returns

the future of this operation

Parameters
Name Type Description
id System.String the registration id

IVotingResultStore type

Namespace

FreieWahl.Voting.Storage

Summary

stores votes (i.e. voting results) in a block chain like data structure

GetLastVote(votingId,questionIndex) method

Summary

gets the last vote for a given voting with for the question with the given index

Returns

the last vote for the voting with the given id for the question with the given index

Parameters
Name Type Description
votingId System.String the voting id
questionIndex System.Int32 the question index

GetVotes(votingId) method

Summary

gets all votes for a given voting id

Returns

a list for all votes for all questions with the given voting id

Parameters
Name Type Description
votingId System.String the voting id

GetVotes(votingId,questionIndex) method

Summary

gets all votes for a given voting id and question index

Returns

a list for all votes for a given question in the voting with the given id

Parameters
Name Type Description
votingId System.String the voting id
questionIndex System.Int32 the index of a question

StoreVote(v,getBlockSignature,getGenesisSignature) method

Summary

stores a vote

Returns

the future of this operation

Parameters
Name Type Description
v FreieWahl.Voting.Models.Vote the vote that should be stored
getBlockSignature System.Func{FreieWahl.Voting.Models.Vote,System.String} callback for getting the signature for a block
getGenesisSignature System.Func{System.Threading.Tasks.Task{System.String}} callback for generating the genesis block signature

IVotingStore type

Namespace

FreieWahl.Voting.Storage

Summary

Stores votings and handles CRUD-operations for votings and question within these votings