-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: moved commit state to app manager * feat: add database skeleton * feat: database and proposals * feat: database and votes * feat: add votes reports * chore: moved database to interface * feat: store last block height * chore: fixed tests * chore: remove old report generator * chore: fixed failing test * chore: fixed some tests * feat: added GenericErrorEvent * chore: added tests for report.Generator * chore: remove state.Manager * chore: update README * chore: use null.String in mutes * feat: add mutes skeleton in database * feat: allow deleting mutes * chore: return error on add/delete mute * feat: allow fetching all mutes via database * feat: check if the report entry was muted * chore: fixed some tests * chore: removed mutes-path and update config * chore: more code coverage * chore: add sqlite tests * chore: add report dispatcher test if error * chore: change host * chore: check coverage in all packages in CI
- Loading branch information
1 parent
de9927b
commit 489ac14
Showing
58 changed files
with
1,998 additions
and
1,126 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
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 |
---|---|---|
|
@@ -7,4 +7,5 @@ main | |
cover.out | ||
cosmos-proposals-checker | ||
dist | ||
**/.DS_Store | ||
**/.DS_Store | ||
*.sqlite |
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 |
---|---|---|
|
@@ -40,3 +40,4 @@ linters: | |
- godox | ||
- perfsprint | ||
- mnd | ||
- interfacebloat |
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
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
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
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,13 @@ | ||
-- +goose Up | ||
CREATE TABLE proposals ( | ||
chain TEXT NOT NULL, | ||
id TEXT NOT NULL, | ||
title TEXT NOT NULL, | ||
description TEXT NOT NULL, | ||
status TEXT NOT NULL, | ||
end_time TIMESTAMP NOT NULL, | ||
PRIMARY KEY (chain, id) | ||
); | ||
|
||
-- +goose Down | ||
DROP TABLE proposals; |
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,12 @@ | ||
-- +goose Up | ||
CREATE TABLE votes ( | ||
chain TEXT NOT NULL, | ||
proposal_id TEXT NOT NULL, | ||
wallet TEXT NOT NULL, | ||
vote_option TEXT NOT NULL, | ||
vote_weight REAL NOT NULL, | ||
PRIMARY KEY (chain, proposal_id, wallet, vote_option) | ||
); | ||
|
||
-- +goose Down | ||
DROP TABLE votes; |
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,10 @@ | ||
-- +goose Up | ||
CREATE TABLE query_last_block ( | ||
chain TEXT NOT NULL, | ||
query TEXT NOT NULL, | ||
height INTEGER NOT NULL, | ||
PRIMARY KEY (chain, query) | ||
); | ||
|
||
-- +goose Down | ||
DROP TABLE query_last_block; |
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,11 @@ | ||
-- +goose Up | ||
CREATE TABLE mutes ( | ||
chain TEXT, | ||
proposal_id TEXT, | ||
expires TIMESTAMP NOT NULL, | ||
comment TEXT, | ||
PRIMARY KEY (chain, proposal_id) | ||
); | ||
|
||
-- +goose Down | ||
DROP TABLE mutes; |
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,6 @@ | ||
package migrations | ||
|
||
import "embed" | ||
|
||
//go:embed **.sql | ||
var EmbedFS embed.FS |
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.