Documentation
¶
Index ¶
- Constants
- func CreateKeyRing(client gomatrixserverlib.Client, keyDB gomatrixserverlib.KeyDatabase) gomatrixserverlib.KeyRing
- func NewDatabase(driver, createAddr, address, underlying, topic string, useAsync bool) (interface{}, error)
- type Database
- func (d *Database) FetchKeys(ctx context.Context, ...) (...)
- func (d Database) FetcherName() string
- func (d *Database) InsertRootCA(ctx context.Context, rootCA string) error
- func (d *Database) SelectAllCerts(ctx context.Context) (string, string, string, string, error)
- func (d *Database) SetGauge(qryDBGauge mon.LabeledGauge)
- func (d *Database) StoreKeys(ctx context.Context, ...) error
- func (d *Database) UpsertCRL(ctx context.Context, CRL string) error
- func (d *Database) UpsertCert(ctx context.Context, serverCert, serverKey string) error
Constants ¶
View Source
const CertSchema = `` /* 189-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func CreateKeyRing ¶
func CreateKeyRing(client gomatrixserverlib.Client, keyDB gomatrixserverlib.KeyDatabase) gomatrixserverlib.KeyRing
CreateKeyRing creates and configures a KeyRing object.
It creates the necessary key fetchers and collects them into a KeyRing backed by the given KeyDatabase.
func NewDatabase ¶
func NewDatabase(driver, createAddr, address, underlying, topic string, useAsync bool) (interface{}, 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.
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 (*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) InsertRootCA ¶
func (*Database) SelectAllCerts ¶
func (*Database) SetGauge ¶
func (d *Database) SetGauge(qryDBGauge mon.LabeledGauge)
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.