Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
A Database implements gomatrixserverlib.KeyDatabase and is used to store the public keys for other matrix servers.
func NewDatabase ¶
func NewDatabase( dbProperties *config.DatabaseOptions, serverName gomatrixserverlib.ServerName, serverKey ed25519.PublicKey, serverKeyID gomatrixserverlib.KeyID, ) (*Database, error)
NewDatabase prepares a new key database. It creates the necessary tables if they don't already exist. It prepares all the SQL statements that it will use. Returns an error if there was a problem talking to the database.
func (*Database) FetchKeys ¶
func (d *Database) FetchKeys( ctx context.Context, requests map[gomatrixserverlib.PublicKeyLookupRequest]gomatrixserverlib.Timestamp, ) (map[gomatrixserverlib.PublicKeyLookupRequest]gomatrixserverlib.PublicKeyLookupResult, error)
FetchKeys implements gomatrixserverlib.KeyDatabase
func (Database) FetcherName ¶
FetcherName implements KeyFetcher
func (*Database) StoreKeys ¶
func (d *Database) StoreKeys( ctx context.Context, keyMap map[gomatrixserverlib.PublicKeyLookupRequest]gomatrixserverlib.PublicKeyLookupResult, ) error
StoreKeys implements gomatrixserverlib.KeyDatabase
Click to show internal directories.
Click to hide internal directories.