aboutsummaryrefslogtreecommitdiff
path: root/pkg/db/client.go
blob: 090dfff8bacd39525911313143fb4f6be2c58e5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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)
}