sqlstore

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SQLMigrationsDir        = "migrations"
	GooseDBVersionTableName = config.MonitoringDbSchema + ".metrics_goose_db_version"
)

Variables

View Source
var EmbedMigrations embed.FS

Functions

func MigrateToLatestSchema

func MigrateToLatestSchema(log *logging.Logger, connConfig vega_sqlstore.ConnectionConfig) error

func NewTransactionalConnectionSource

func NewTransactionalConnectionSource(log *logging.Logger, connConfig vega_sqlstore.ConnectionConfig) (*vega_sqlstore.ConnectionSource, error)

func RevertOneVersion

func RevertOneVersion(log *logging.Logger, connConfig vega_sqlstore.ConnectionConfig) error

func RevertToSchemaVersionZero

func RevertToSchemaVersionZero(
	log *logging.Logger,
	connConfig vega_sqlstore.ConnectionConfig,
) error

Types

type AssetPrices

type AssetPrices struct {
	*vega_sqlstore.ConnectionSource
	// contains filtered or unexported fields
}

func NewAssetPrices

func NewAssetPrices(connectionSource *vega_sqlstore.ConnectionSource) *AssetPrices

func (*AssetPrices) Add

func (ap *AssetPrices) Add(data *coingecko.PriceData)

func (*AssetPrices) FlushUpsert

func (ap *AssetPrices) FlushUpsert(ctx context.Context) ([]*coingecko.PriceData, error)

func (*AssetPrices) Upsert

func (ap *AssetPrices) Upsert(ctx context.Context, newAssetPrices *coingecko.PriceData) error

type BlockSigner

type BlockSigner struct {
	*vega_sqlstore.ConnectionSource
	// contains filtered or unexported fields
}

func NewBlockSigner

func NewBlockSigner(connectionSource *vega_sqlstore.ConnectionSource) *BlockSigner

func (*BlockSigner) Add

func (bs *BlockSigner) Add(data *entities.BlockSigner)

func (*BlockSigner) Flush

func (bs *BlockSigner) Flush(ctx context.Context) ([]*entities.BlockSigner, error)

func (*BlockSigner) FlushUpsert

func (bs *BlockSigner) FlushUpsert(ctx context.Context) ([]*entities.BlockSigner, error)

func (*BlockSigner) GetLastestBlockInStore

func (bs *BlockSigner) GetLastestBlockInStore(ctx context.Context) (int64, error)

func (*BlockSigner) Upsert

func (bs *BlockSigner) Upsert(ctx context.Context, newBlockSigner *entities.BlockSigner) error

type CometTxs

type CometTxs struct {
	*vega_sqlstore.ConnectionSource
	// contains filtered or unexported fields
}

func NewCometTxs

func NewCometTxs(connectionSource *vega_sqlstore.ConnectionSource) *CometTxs

func (*CometTxs) AddWithoutTime

func (nhs *CometTxs) AddWithoutTime(newTx comet.CometTx)

func (*CometTxs) FlushUpsertWithoutTime

func (c *CometTxs) FlushUpsertWithoutTime(ctx context.Context) ([]comet.CometTx, error)

func (*CometTxs) GetLastestBlockInStore

func (c *CometTxs) GetLastestBlockInStore(ctx context.Context) (int64, error)

func (*CometTxs) UpsertWithoutTime

func (nhs *CometTxs) UpsertWithoutTime(ctx context.Context, newTx comet.CometTx) error

type MetamonitoringStatus added in v0.6.0

type MetamonitoringStatus struct {
	*vega_sqlstore.ConnectionSource
}

func NewMetamonitoringStatus added in v0.6.0

func NewMetamonitoringStatus(connectionSource *vega_sqlstore.ConnectionSource) *MetamonitoringStatus

func (*MetamonitoringStatus) GetAll added in v0.6.0

type NetworkBalances

type NetworkBalances struct {
	*vega_sqlstore.ConnectionSource
	NetworkBalances []entities.NetworkBalance
}

func NewNetworkBalances

func NewNetworkBalances(connectionSource *vega_sqlstore.ConnectionSource) *NetworkBalances

func (*NetworkBalances) Add

func (nhs *NetworkBalances) Add(newBalance entities.NetworkBalance)

func (*NetworkBalances) FlushUpsert

func (c *NetworkBalances) FlushUpsert(ctx context.Context) ([]entities.NetworkBalance, error)

func (*NetworkBalances) UpsertPartiesTotalBalance

func (nhs *NetworkBalances) UpsertPartiesTotalBalance(ctx context.Context) error

func (*NetworkBalances) UpsertUnfinalizedDeposits

func (nhs *NetworkBalances) UpsertUnfinalizedDeposits(ctx context.Context) error

func (*NetworkBalances) UpsertUnrealisedWithdrawalsBalance

func (nhs *NetworkBalances) UpsertUnrealisedWithdrawalsBalance(ctx context.Context) error

func (*NetworkBalances) UpsertWithoutAssetId

func (nhs *NetworkBalances) UpsertWithoutAssetId(ctx context.Context, newBalance entities.NetworkBalance) error

type NetworkHistorySegment

type NetworkHistorySegment struct {
	*vega_sqlstore.ConnectionSource
	// contains filtered or unexported fields
}

func NewNetworkHistorySegment

func NewNetworkHistorySegment(connectionSource *vega_sqlstore.ConnectionSource) *NetworkHistorySegment

func (*NetworkHistorySegment) AddWithoutTime

func (nhs *NetworkHistorySegment) AddWithoutTime(data *datanode.NetworkHistorySegment)

func (*NetworkHistorySegment) FlushUpsertWithoutTime

func (nhs *NetworkHistorySegment) FlushUpsertWithoutTime(ctx context.Context) ([]*datanode.NetworkHistorySegment, error)

func (*NetworkHistorySegment) UpsertWithoutTime

func (nhs *NetworkHistorySegment) UpsertWithoutTime(ctx context.Context, newSegment *datanode.NetworkHistorySegment) error

Jump to

Keyboard shortcuts

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