database

package
v0.0.0-...-c0e0e34 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DB_OPERATION_TIMEOUT time.Duration = 1 * time.Second
)

Variables

This section is empty.

Functions

func ConnectDB

func ConnectDB(dbName string, mongoAddr string, network string) error

func DBCreateDefaultNetworkInfo

func DBCreateDefaultNetworkInfo(network string)

func DBCreateFeeIndex

func DBCreateFeeIndex() error

func DBCreateIndex

func DBCreateIndex() error

func DBCreateInterSwapDataIndex

func DBCreateInterSwapDataIndex() error

func DBCreateInterswapIndex

func DBCreateInterswapIndex() error

func DBCreateNetworkIndex

func DBCreateNetworkIndex() error

func DBCreateOpenSeaIndex

func DBCreateOpenSeaIndex() error

func DBCreatePappSupportTokenIndex

func DBCreatePappSupportTokenIndex() error

func DBCreatePappsIndex

func DBCreatePappsIndex() error

func DBCreateRefundFeeRecord

func DBCreateRefundFeeRecord(data common.RefundFeeData) error

func DBCreateShieldTxData

func DBCreateShieldTxData(externalTx string, networkID int) error

func DBCreateShieldTxIndex

func DBCreateShieldTxIndex() error

func DBCreateUnshieldTxIndex

func DBCreateUnshieldTxIndex() error

func DBDeleteDexSwap

func DBDeleteDexSwap(txList []string) error

func DBGetBridgeNetworkInfo

func DBGetBridgeNetworkInfo(network string) (*common.BridgeNetworkData, error)

func DBGetBridgeNetworkInfos

func DBGetBridgeNetworkInfos() ([]common.BridgeNetworkData, error)

func DBGetCollectionNFTs

func DBGetCollectionNFTs(address string, limit, offset int64) ([]common.OpenseaAssetData, error)

func DBGetCollectionsInfo

func DBGetCollectionsInfo(address string) (*common.OpenseaCollectionData, error)

func DBGetDefaultCollectionList

func DBGetDefaultCollectionList() ([]common.OpenseaDefaultCollectionData, error)

func DBGetExternalTxByIncTx

func DBGetExternalTxByIncTx(incTx string, network string) (*common.ExternalTxStatus, error)

func DBGetExternalTxStatusByIncTx

func DBGetExternalTxStatusByIncTx(incTx string, network string) (string, error)

func DBGetNFTDetail

func DBGetNFTDetail(address string, nftid string) (*common.OpenseaAssetData, error)

func DBGetPappAPIKey

func DBGetPappAPIKey(papp string) (string, error)

func DBGetPappSupportedToken

func DBGetPappSupportedToken() ([]common.PappSupportedTokenData, error)

func DBGetPappTxData

func DBGetPappTxData(incTx string) (*common.PappTxData, error)

func DBGetPappTxDataByStatus

func DBGetPappTxDataByStatus(status string, offset, limit int64) ([]common.PappTxData, error)

func DBGetPappTxDataByStatusAndShardID

func DBGetPappTxDataByStatusAndShardID(status string, shardid int, offset, limit int64) ([]common.PappTxData, error)

func DBGetPappTxNeedFeeRefund

func DBGetPappTxNeedFeeRefund(limit int64) ([]common.PappTxData, error)

func DBGetPappTxNeedPrivacyFeeRefund

func DBGetPappTxNeedPrivacyFeeRefund(limit int64) ([]common.PappTxData, error)

func DBGetPappTxPendingOutchainSubmit

func DBGetPappTxPendingOutchainSubmit(offset, limit int64) ([]common.PappTxData, error)

func DBGetPappTxStatus

func DBGetPappTxStatus(incTx string) (string, error)

func DBGetPappVaultData

func DBGetPappVaultData(network string, pappType int) (*common.PappVaultData, error)

func DBGetPappWaitingSubmitOutchain

func DBGetPappWaitingSubmitOutchain(offset, limit int64) ([]common.PappTxData, error)

func DBGetPendingFeeRefundTx

func DBGetPendingFeeRefundTx(limit int64) ([]common.RefundFeeData, error)

func DBGetShieldTxByExternalTx

func DBGetShieldTxByExternalTx(externalTx string, networkID int) (*common.ShieldTxData, error)

func DBGetShieldTxStatusByExternalTx

func DBGetShieldTxStatusByExternalTx(externalTx string, networkID int) (string, error)

func DBGetTxFeeRefundByReq

func DBGetTxFeeRefundByReq(incReqTx string) (*common.RefundFeeData, error)

func DBGetUnshieldTxByExternalTx

func DBGetUnshieldTxByExternalTx(externalTx string, networkID int) (*common.UnshieldTxData, error)

func DBGetUnshieldTxByIncTx

func DBGetUnshieldTxByIncTx(incTx string) (*common.UnshieldTxData, error)

func DBGetUnshieldTxDataByStatus

func DBGetUnshieldTxDataByStatus(status string, offset, limit int64) ([]common.UnshieldTxData, error)

func DBGetUnshieldTxDataByStatusAndShardID

func DBGetUnshieldTxDataByStatusAndShardID(status string, shardid int, offset, limit int64) ([]common.UnshieldTxData, error)

func DBGetUnshieldTxNeedFeeRefund

func DBGetUnshieldTxNeedFeeRefund(limit int64) ([]common.UnshieldTxData, error)

func DBGetUnshieldTxPendingOutchainSubmit

func DBGetUnshieldTxPendingOutchainSubmit(offset, limit int64) ([]common.UnshieldTxData, error)

func DBGetUnshieldTxStatusByExternalTx

func DBGetUnshieldTxStatusByExternalTx(externalTx string, networkID int) (string, error)

func DBGetUnshieldTxStatusByIncTx

func DBGetUnshieldTxStatusByIncTx(incTx string) (string, error)

func DBInsertInterswapTxData

func DBInsertInterswapTxData(txdata common.InterSwapTxData) error

func DBRetrieveAcceptedPappTxs

func DBRetrieveAcceptedPappTxs(pappType int, offset, limit int64) ([]common.PappTxData, error)

func DBRetrieveExternalTxByIncTxID

func DBRetrieveExternalTxByIncTxID(incTxID string) (*common.ExternalTxStatus, error)

func DBRetrieveFailedShieldTxs

func DBRetrieveFailedShieldTxs(offset, limit int64) ([]common.ShieldTxData, error)

func DBRetrieveFailedUnshieldTxs

func DBRetrieveFailedUnshieldTxs(offset, limit int64) ([]common.UnshieldTxData, error)

func DBRetrieveFeeTable

func DBRetrieveFeeTable() (*common.ExternalNetworksFeeData, error)

func DBRetrieveFeesTable

func DBRetrieveFeesTable(limit int64) ([]common.ExternalNetworksFeeData, error)

func DBRetrieveInterswapTxByTxID

func DBRetrieveInterswapTxByTxID(txID string) (*common.InterSwapTxData, error)

func DBRetrieveInterswapTxsByStatus

func DBRetrieveInterswapTxsByStatus(status []int, offset, limit int64) ([]common.InterSwapTxData, error)

func DBRetrievePAppsByNetwork

func DBRetrievePAppsByNetwork(network string) (*common.PAppsEndpointData, error)

func DBRetrievePendingDexTxs

func DBRetrievePendingDexTxs(offset, limit int64) ([]common.DexSwapTrackData, error)

func DBRetrievePendingExternalTx

func DBRetrievePendingExternalTx(network string, offset, limit int64) ([]common.ExternalTxStatus, error)

func DBRetrievePendingPappTxs

func DBRetrievePendingPappTxs(pappType int, offset, limit int64) ([]common.PappTxData, error)

func DBRetrievePendingRedepositExternalTx

func DBRetrievePendingRedepositExternalTx(offset, limit int64) ([]common.ExternalTxStatus, error)

func DBRetrievePendingShieldTxs

func DBRetrievePendingShieldTxs(offset, limit int64) ([]common.ShieldTxData, error)

func DBRetrievePendingUnshieldTxs

func DBRetrievePendingUnshieldTxs(offset, limit int64) ([]common.UnshieldTxData, error)

func DBRetrieveRejectedShieldTxs

func DBRetrieveRejectedShieldTxs(offset, limit int64) ([]common.ShieldTxData, error)

func DBRetrieveRejectedUnshieldTxs

func DBRetrieveRejectedUnshieldTxs(offset, limit int64) ([]common.UnshieldTxData, error)

func DBSaveCollectionsInfo

func DBSaveCollectionsInfo(list []popensea.CollectionDetail) error

func DBSaveDexSwapTxData

func DBSaveDexSwapTxData(txdata common.DexSwapTrackData) error

func DBSaveExternalTxStatus

func DBSaveExternalTxStatus(txdata *common.ExternalTxStatus) error

func DBSaveFeetTable

func DBSaveFeetTable(data common.ExternalNetworksFeeData) error

func DBSaveInterSwapTxData

func DBSaveInterSwapTxData(txdata common.InterSwapTxData) (*primitive.ObjectID, error)

func DBSaveNFTDetail

func DBSaveNFTDetail(list []popensea.NFTDetail) error

func DBSavePappTxData

func DBSavePappTxData(txdata common.PappTxData) (*primitive.ObjectID, error)

func DBSaveUnshieldTxData

func DBSaveUnshieldTxData(txdata common.UnshieldTxData) (*primitive.ObjectID, error)

func DBUpdateDexSwapTxStatus

func DBUpdateDexSwapTxStatus(incTx string, status string) error

func DBUpdateExternalTxOtherInfo

func DBUpdateExternalTxOtherInfo(externalTx string, otherInfo string) error

func DBUpdateExternalTxStatus

func DBUpdateExternalTxStatus(externalTx string, status string, errStr string) error

func DBUpdateExternalTxStatusByIncTx

func DBUpdateExternalTxStatusByIncTx(incTx string, status string, errStr string) error

func DBUpdateExternalTxSubmitedRedeposit

func DBUpdateExternalTxSubmitedRedeposit(externalTx string, redepositSubmitted bool) error

func DBUpdateExternalTxWillRedeposit

func DBUpdateExternalTxWillRedeposit(externalTx string, willRedeposit bool) error

func DBUpdateInterswapTxAddOnTxID

func DBUpdateInterswapTxAddOnTxID(txID string, addOnTxID string) error

func DBUpdateInterswapTxInfo

func DBUpdateInterswapTxInfo(txID string, updateInfo map[string]interface{}) error

func DBUpdateInterswapTxNumRecheck

func DBUpdateInterswapTxNumRecheck(txID string, updatedNumRecheck uint) error

func DBUpdateInterswapTxRefundTxID

func DBUpdateInterswapTxRefundTxID(txID string, refundTxID string) error

func DBUpdateInterswapTxStatus

func DBUpdateInterswapTxStatus(txID string, status int, statusStr string, errStr string) error

func DBUpdatePappRefund

func DBUpdatePappRefund(incReqTx string, refundsubmitted bool) error

func DBUpdatePappRefundPFee

func DBUpdatePappRefundPFee(incTx string, refundpfee bool) error

func DBUpdatePappTxStatus

func DBUpdatePappTxStatus(incTx string, status string, errStr string) error

func DBUpdatePappTxSubmitOutchainStatus

func DBUpdatePappTxSubmitOutchainStatus(incTx string, status string) error

func DBUpdateRefundFeeRefundTx

func DBUpdateRefundFeeRefundTx(refundtx, incReqTx, status, errStr string) error

func DBUpdateShieldOnChainTxInfo

func DBUpdateShieldOnChainTxInfo(externalTx string, networkID int, paymentAddr string, incTx string, utokenID string, linkedTokenID string) error

func DBUpdateShieldTxStatus

func DBUpdateShieldTxStatus(externalTx string, networkID int, status string, errStr string) error

func DBUpdateUnshieldExternalTxStatus

func DBUpdateUnshieldExternalTxStatus(externalTx string, networkID int, status string, errStr string) error

func DBUpdateUnshieldOnChainTxInfo

func DBUpdateUnshieldOnChainTxInfo(networkID int, paymentAddr string, incTx string, utokenID string, linkedTokenID string) error

func DBUpdateUnshieldRefund

func DBUpdateUnshieldRefund(incReqTx string, refundsubmitted bool) error

func DBUpdateUnshieldTxStatus

func DBUpdateUnshieldTxStatus(incTx string, status string, errStr string) error

func DBUpdateUnshieldTxSubmitOutchainStatus

func DBUpdateUnshieldTxSubmitOutchainStatus(incTx string, status string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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