Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Db *gorm.DB
Functions ¶
func MarkAsMostRecentlySeen ¶
func SoftDeleteRevealed ¶
func StoreCommitment ¶
Swagger documentation @Summary Store a commitment privately, to ensure it can be revealed at a later date @Description Save a vote and the matching hash commitment to that vote @ID store-commitment @Produce json @Param payload body database.CommitmentBody true "The (about to be) committed vote details data you would like to store" @Router /commitments/ [post] @Success 200 {object} database.Response "Success" @Failure 406 {object} database.Response "Bad payload"
func TestSetupData ¶
func TestSetupData()
Types ¶
type Commitment ¶
type CommitmentBody ¶
type CommitmentBody struct { PollID string `json:"pollID" example:"0x12345678901234567890123456789012"` VoterAddress string `json:"voterAddress" example:"0x11223344556677889900"` CommitHash string `json:"commitHash" example:"0x12345678909876543210123456789012"` VoteOption int64 `json:"voteOption" example:"1"` Salt int64 `json:"salt" example:"5866984321541876564"` }
Click to show internal directories.
Click to hide internal directories.