-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from rarimo/feaure/check-registry-and-nullifier
Request validation
- Loading branch information
Showing
13 changed files
with
1,916 additions
and
389 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
description: 'Standard JSON:API error' | ||
type: object | ||
required: | ||
- errors | ||
properties: | ||
errors: | ||
type: array | ||
description: Non empty array of errors occurred during request processing | ||
items: | ||
type: object | ||
required: | ||
- title | ||
- status | ||
properties: | ||
title: | ||
type: string | ||
description: 'Title is a short, human-readable summary of the problem' | ||
example: Bad Request | ||
detail: | ||
type: string | ||
description: >- | ||
Detail is a human-readable explanation specific to this occurrence | ||
of the problem | ||
example: "Request body was expected" | ||
status: | ||
type: integer | ||
description: Status is the HTTP status code applicable to this problem | ||
example: 400 | ||
enum: | ||
- 400 | ||
- 401 | ||
- 403 | ||
- 404 | ||
- 409 | ||
- 429 | ||
- 500 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,3 @@ | ||
-- +migrate Up | ||
create table proofs( | ||
id uuid default gen_random_uuid(), | ||
voting_session text not null, | ||
document_nullifier text not null, | ||
created_at timestamp default now(), | ||
unique (voting_session, document_nullifier) | ||
); | ||
|
||
-- +migrate Down | ||
drop table proofs; | ||
-- +migrate Down |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
443 changes: 237 additions & 206 deletions
443
internal/contracts/Verifier.go → internal/contracts/VoteVerifier.go
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.