Skip to content

Commit

Permalink
Implement QueryVaultEvents rpc (#28)
Browse files Browse the repository at this point in the history
* Implement QueryVaultEvents rpc

Also add ID to vault event response.

* Fix test case, regenerate mock code

* fixup! Implement QueryVaultEvents rpc
  • Loading branch information
xwjdsh committed Jul 11, 2022
1 parent 6d378cd commit b5a59b5
Show file tree
Hide file tree
Showing 9 changed files with 1,177 additions and 632 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
TMPDIR := $(shell mktemp -d)
sync-protos:
git clone --branch gen-go git@github.com:fox-one/pando-protos.git $(TMPDIR)
cd $(TMPDIR); git reset --hard 9cb6d2b418a5e33a9f2d28e69874577935512b3a
cd $(TMPDIR); git reset --hard 3776e377a8d7112ce1dc1b830fa618b06a8595a9
cp -r $(TMPDIR)/pando/v1/* handler/rpc/pando
6 changes: 6 additions & 0 deletions core/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ type (
Limit int
}

QueryVaultEventsRequest struct {
FromID int64
Limit int
}

VaultStore interface {
Create(ctx context.Context, vault *Vault) error
Update(ctx context.Context, vault *Vault, version int64) error
Expand All @@ -59,5 +64,6 @@ type (
CreateEvent(ctx context.Context, event *VaultEvent) error
FindEvent(ctx context.Context, vaultID string, version int64) (*VaultEvent, error)
ListVaultEvents(ctx context.Context, vaultID string) ([]*VaultEvent, error)
QueryVaultEvents(ctx context.Context, req QueryVaultEventsRequest) ([]*VaultEvent, error)
}
)
Loading

0 comments on commit b5a59b5

Please sign in to comment.