Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CastVoteRequest ¶
type CastVoteRequest struct {
UserID string
// Marshalled representation of Ciphervote. It contains []{K:,C:}
Ballot CiphervoteJSON
}
CastVoteRequest defines the HTTP request for casting a vote
type CiphervoteJSON ¶
type CiphervoteJSON []EGPairJSON
CiphervoteJSON is the JSON representation of a ciphervote
type CreateFormRequest ¶
type CreateFormRequest struct {
AdminID string
Configuration etypes.Configuration
}
CreateFormRequest defines the HTTP request for creating a form
type CreateFormResponse ¶
CreateFormResponse defines the HTTP response when creating a form
type EGPairJSON ¶
EGPairJSON is the JSON representation of an ElGamal pair
type GetActorInfo ¶
GetActorInfo defines the result of a get actor info
type GetFormResponse ¶
type GetFormResponse struct {
// FormID is hex-encoded
FormID string
Configuration etypes.Configuration
Status uint16
Pubkey string
Result []etypes.Ballot
Roster []string
ChunksPerBallot int
BallotSize int
Voters []string
}
GetFormResponse defines the HTTP response when getting the form info
type GetFormsResponse ¶
type GetFormsResponse struct {
Forms []LightForm
}
GetFormsResponse defines the HTTP response when getting all forms infos.
type NewDKGRequest ¶
type NewDKGRequest struct {
FormID string // hex-encoded
}
NewDKGRequest defines the request to create a new DGK
type SignedRequest ¶
type SignedRequest struct {
Payload string // url base64 encoded json message
Signature string // hex encoded signature on sha256(Payload)
}
SignedRequest represents a frontend request signed by the web backend.
func NewSignedRequest ¶
func NewSignedRequest(r io.Reader) (SignedRequest, error)
NewSignedRequest returns a new initialized signed request
func (SignedRequest) GetAndVerify ¶
func (s SignedRequest) GetAndVerify(pk kyber.Point, el interface{}) error
GetAndVerify is a shorthand function to verify the signed request and extract the payload. el MUST be a pointer.
func (SignedRequest) GetMessage ¶
func (s SignedRequest) GetMessage(el interface{}) error
GetMessage JSON unmarshals the payload to the given element. The given element MUST be a pointer.
type UpdateDKG ¶
type UpdateDKG struct {
Action string
}
UpdateDKG defines the input used to update dkg
type UpdateFormRequest ¶
type UpdateFormRequest struct {
Action string
}
UpdateFormRequest defines the HTTP request for updating a form
type UpdateShuffle ¶
type UpdateShuffle struct {
Action string
}
UpdateShuffle defines the input used to update the shuffle