shared

package
v0.13.8 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: Apache-2.0 Imports: 10 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(spec.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[spec.UserID]struct{},
	transactionID gomatrixserverlib.TransactionID,
	dbReceipt *receipt.Receipt,
) error

func (*Database) CleanTransactions

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

func (*Database) GetTransaction

func (d *Database) GetTransaction(
	ctx context.Context,
	userID spec.UserID,
) (*gomatrixserverlib.Transaction, *receipt.Receipt, error)

func (*Database) GetTransactionCount

func (d *Database) GetTransactionCount(
	ctx context.Context,
	userID spec.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