aboutsummaryrefslogtreecommitdiff
path: root/pkg/db/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/db/client.go')
-rw-r--r--pkg/db/client.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/pkg/db/client.go b/pkg/db/client.go
new file mode 100644
index 0000000..090dfff
--- /dev/null
+++ b/pkg/db/client.go
@@ -0,0 +1,17 @@
+package db
+
+import (
+ "context"
+
+ "git.sigsum.org/sigsum-lib-go/pkg/requests"
+ "git.sigsum.org/sigsum-lib-go/pkg/types"
+)
+
+// Client is an interface that interacts with a log's database backend
+type Client interface {
+ AddLeaf(context.Context, *requests.Leaf) error
+ GetTreeHead(context.Context) (*types.TreeHead, error)
+ GetConsistencyProof(context.Context, *requests.ConsistencyProof) (*types.ConsistencyProof, error)
+ GetInclusionProof(context.Context, *requests.InclusionProof) (*types.InclusionProof, error)
+ GetLeaves(context.Context, *requests.Leaves) (*types.Leaves, error)
+}