db

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.4.0

type Client struct {
	// contains filtered or unexported fields
}

func NewClient added in v0.4.0

func NewClient(address, username, password, database, collection string, cacheDelay, maxLimit int, log *logger.UPPLogger) (*Client, error)

NewClient creates new client instance

func (*Client) Close added in v0.4.0

func (c *Client) Close() error

Close closes the entire database connection

func (*Client) EnsureIndexes added in v0.4.0

func (c *Client) EnsureIndexes() error

EnsureIndexes creates indexes

func (*Client) FindNotificationByPartialTransactionID added in v0.4.0

func (c *Client) FindNotificationByPartialTransactionID(transactionID string) (model.InternalNotification, error)

FindNotificationByPartialTransactionID locates one instance of a notification with the given Transaction ID (publishReference)

func (*Client) FindNotificationByTransactionID added in v0.4.0

func (c *Client) FindNotificationByTransactionID(transactionID string) (model.InternalNotification, error)

FindNotificationByTransactionID locates one instance of a notification with the given Transaction ID (publishReference)

func (*Client) GetLimit added in v0.4.0

func (c *Client) GetLimit() int

GetLimit returns the max number of records returned by a query

func (*Client) Ping added in v0.4.0

func (c *Client) Ping() error

Ping returns a database ping response

func (*Client) ReadNotifications added in v0.4.0

func (c *Client) ReadNotifications(offset int, since time.Time) (*[]model.InternalNotification, error)

ReadNotifications reads notifications from the collection.

func (*Client) WriteNotification added in v0.4.0

func (c *Client) WriteNotification(notification *model.InternalNotification) error

WriteNotification inserts a notification into database

Jump to

Keyboard shortcuts

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