utility

package
v0.0.0-...-1305305 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LOGGER = logging.MustGetLogger("database-client")

Functions

func AddAccountCursor

func AddAccountCursor(client *database.MongoClient, accountName, cursor string) error

func GetAccountCursor

func GetAccountCursor(client *database.MongoClient, accountName string) (*model.Cursor, error)

func UpdateAccountCursor

func UpdateAccountCursor(client *database.MongoClient, accountName, cursor string) error

Types

type CursorData

type CursorData struct {
	Account       string `json:"account_name" bson:"account_name"`
	Cursor        string `json:"account_cursor" bson:"account_cursor"`
	ParticipantId string `json:"participant_id" bson:"participant_id"`
}

type CursorKey

type CursorKey struct {
	Account string `json:"account_name"`
}

type CursorUpdateData

type CursorUpdateData struct {
	Cursor string `json:":c"`
}

type DynamoClient

type DynamoClient struct {
	Session   *dynamodb.DynamoDB
	Region    *string
	TableName *string
}

func CreateConnection

func CreateConnection() (*DynamoClient, error)

func (*DynamoClient) AddAccountCursor

func (client *DynamoClient) AddAccountCursor(accountName, cursor string) error

func (*DynamoClient) CheckTableExists

func (client *DynamoClient) CheckTableExists() error

func (*DynamoClient) CreateTable

func (client *DynamoClient) CreateTable() error

func (*DynamoClient) GetAccountCursor

func (client *DynamoClient) GetAccountCursor(accountName string) (*model.Cursor, error)

func (*DynamoClient) UpdateAccountCursor

func (client *DynamoClient) UpdateAccountCursor(accountName, cursor string) error

Jump to

Keyboard shortcuts

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