Documentation ¶
Index ¶
- type Client
- func (c *Client) Close() error
- func (c *Client) EnsureIndexes() error
- func (c *Client) FindNotificationByPartialTransactionID(transactionID string) (model.InternalNotification, error)
- func (c *Client) FindNotificationByTransactionID(transactionID string) (model.InternalNotification, error)
- func (c *Client) GetLimit() int
- func (c *Client) Ping() error
- func (c *Client) ReadNotifications(offset int, since time.Time) (*[]model.InternalNotification, error)
- func (c *Client) WriteNotification(notification *model.InternalNotification) error
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) EnsureIndexes ¶ added in v0.4.0
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
GetLimit returns the max number of records returned by a query
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
Click to show internal directories.
Click to hide internal directories.