shared

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	DB                *sql.DB
	IsLocalServerName func(gomatrixserverlib.ServerName) bool
	Cache             caching.FederationCache
	Writer            sqlutil.Writer
	RelayQueue        tables.RelayQueue
	RelayQueueJSON    tables.RelayQueueJSON
}

func (*Database) AssociateTransactionWithDestinations

func (d *Database) AssociateTransactionWithDestinations(
	ctx context.Context,
	destinations map[gomatrixserverlib.UserID]struct{},
	transactionID gomatrixserverlib.TransactionID,
	dbReceipt *receipt.Receipt,
) error

func (*Database) CleanTransactions

func (d *Database) CleanTransactions(
	ctx context.Context,
	userID gomatrixserverlib.UserID,
	receipts []*receipt.Receipt,
) error

func (*Database) GetTransaction

func (*Database) GetTransactionCount

func (d *Database) GetTransactionCount(
	ctx context.Context,
	userID gomatrixserverlib.UserID,
) (int64, error)

func (*Database) StoreTransaction

func (d *Database) StoreTransaction(
	ctx context.Context,
	transaction gomatrixserverlib.Transaction,
) (*receipt.Receipt, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL