aboutsummaryrefslogtreecommitdiff
path: root/serverkeyapi/storage/interface.go
blob: 3a67ac55a4bc10a5d35c99bcf8124c1299a1441d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
package storage

import (
	"context"

	"github.com/matrix-org/gomatrixserverlib"
)

type Database interface {
	FetcherName() string
	FetchKeys(ctx context.Context, requests map[gomatrixserverlib.PublicKeyLookupRequest]gomatrixserverlib.Timestamp) (map[gomatrixserverlib.PublicKeyLookupRequest]gomatrixserverlib.PublicKeyLookupResult, error)
	StoreKeys(ctx context.Context, keyMap map[gomatrixserverlib.PublicKeyLookupRequest]gomatrixserverlib.PublicKeyLookupResult) error
}