Documentation ¶
Index ¶
- type PostgresStore
- func (p *PostgresStore) BulkInsertBlockTimestamp(blockTimestamps []*types.BlockTimestamp) error
- func (p *PostgresStore) BulkInsertPairInfo(pairInfos []*types.Pair) error
- func (p *PostgresStore) BulkInsertTokenInfo(tokenInfos []*types.Token) error
- func (p *PostgresStore) CreateIndexes()
- func (p *PostgresStore) CreateTables() error
- func (p *PostgresStore) FindPairs(req *types.FindPairsRequest) ([]*types.Pair, error)
- func (p *PostgresStore) FindTokens(req *types.FindTokensRequest) ([]*types.Token, error)
- func (p *PostgresStore) GetBlockAtTimestamp(timestamp int64) (*types.BlockTimestamp, error)
- func (p *PostgresStore) GetBlockTimestamps(to int64, from int64) ([]*types.BlockTimestamp, error)
- func (p *PostgresStore) GetChainID() int64
- func (p *PostgresStore) GetHeights() (*types.Heights, error)
- func (p *PostgresStore) GetHight() (int64, error)
- func (p *PostgresStore) GetPairCount() (int64, error)
- func (p *PostgresStore) GetPairsWithoutTokenInfo() ([]string, error)
- func (p *PostgresStore) GetTokenCount() (int64, error)
- func (p *PostgresStore) GetUniqueAddressesFromPairs() ([]string, error)
- func (p *PostgresStore) GetUniqueAddressesFromTokens() ([]string, error)
- func (p *PostgresStore) Init() error
- func (p *PostgresStore) InsertBlockTimestamp(blockTimestamp *types.BlockTimestamp) error
- func (p *PostgresStore) InsertPairInfo(pairInfo *types.Pair) error
- func (p *PostgresStore) InsertTokenInfo(tokenInfo *types.Token) error
- func (p *PostgresStore) Ready() bool
- func (p *PostgresStore) WithChainID(chainID int64) *PostgresStore
- func (p *PostgresStore) WithDebug() *PostgresStore
- type Store
- type StoreMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresStore ¶
func NewPostgresDB ¶
func NewPostgresDB(conf config.PostgresConfig) *PostgresStore
func (*PostgresStore) BulkInsertBlockTimestamp ¶
func (p *PostgresStore) BulkInsertBlockTimestamp(blockTimestamps []*types.BlockTimestamp) error
func (*PostgresStore) BulkInsertPairInfo ¶
func (p *PostgresStore) BulkInsertPairInfo(pairInfos []*types.Pair) error
func (*PostgresStore) BulkInsertTokenInfo ¶
func (p *PostgresStore) BulkInsertTokenInfo(tokenInfos []*types.Token) error
func (*PostgresStore) CreateIndexes ¶
func (p *PostgresStore) CreateIndexes()
func (*PostgresStore) CreateTables ¶
func (p *PostgresStore) CreateTables() error
func (*PostgresStore) FindPairs ¶
func (p *PostgresStore) FindPairs(req *types.FindPairsRequest) ([]*types.Pair, error)
func (*PostgresStore) FindTokens ¶
func (p *PostgresStore) FindTokens(req *types.FindTokensRequest) ([]*types.Token, error)
func (*PostgresStore) GetBlockAtTimestamp ¶
func (p *PostgresStore) GetBlockAtTimestamp(timestamp int64) (*types.BlockTimestamp, error)
func (*PostgresStore) GetBlockTimestamps ¶
func (p *PostgresStore) GetBlockTimestamps(to int64, from int64) ([]*types.BlockTimestamp, error)
func (*PostgresStore) GetChainID ¶
func (p *PostgresStore) GetChainID() int64
func (*PostgresStore) GetHeights ¶
func (p *PostgresStore) GetHeights() (*types.Heights, error)
func (*PostgresStore) GetHight ¶
func (p *PostgresStore) GetHight() (int64, error)
func (*PostgresStore) GetPairCount ¶
func (p *PostgresStore) GetPairCount() (int64, error)
func (*PostgresStore) GetPairsWithoutTokenInfo ¶
func (p *PostgresStore) GetPairsWithoutTokenInfo() ([]string, error)
func (*PostgresStore) GetTokenCount ¶
func (p *PostgresStore) GetTokenCount() (int64, error)
func (*PostgresStore) GetUniqueAddressesFromPairs ¶
func (p *PostgresStore) GetUniqueAddressesFromPairs() ([]string, error)
func (*PostgresStore) GetUniqueAddressesFromTokens ¶
func (p *PostgresStore) GetUniqueAddressesFromTokens() ([]string, error)
func (*PostgresStore) Init ¶
func (p *PostgresStore) Init() error
func (*PostgresStore) InsertBlockTimestamp ¶
func (p *PostgresStore) InsertBlockTimestamp(blockTimestamp *types.BlockTimestamp) error
func (*PostgresStore) InsertPairInfo ¶
func (p *PostgresStore) InsertPairInfo(pairInfo *types.Pair) error
func (*PostgresStore) InsertTokenInfo ¶
func (p *PostgresStore) InsertTokenInfo(tokenInfo *types.Token) error
func (*PostgresStore) Ready ¶
func (p *PostgresStore) Ready() bool
func (*PostgresStore) WithChainID ¶
func (p *PostgresStore) WithChainID(chainID int64) *PostgresStore
func (*PostgresStore) WithDebug ¶
func (p *PostgresStore) WithDebug() *PostgresStore
type Store ¶
type Store interface { Init() error Ready() bool GetChainID() int64 GetHight() (int64, error) // block timestamp GetBlockAtTimestamp(int64) (*types.BlockTimestamp, error) InsertBlockTimestamp(*types.BlockTimestamp) error BulkInsertBlockTimestamp([]*types.BlockTimestamp) error GetBlockTimestamps(to int64, from int64) ([]*types.BlockTimestamp, error) // token info FindTokens(*types.FindTokensRequest) ([]*types.Token, error) GetTokenCount() (int64, error) InsertTokenInfo(*types.Token) error BulkInsertTokenInfo([]*types.Token) error // pair info FindPairs(*types.FindPairsRequest) ([]*types.Pair, error) GetPairCount() (int64, error) InsertPairInfo(*types.Pair) error BulkInsertPairInfo([]*types.Pair) error // util GetUniqueAddressesFromPairs() ([]string, error) GetUniqueAddressesFromTokens() ([]string, error) GetPairsWithoutTokenInfo() ([]string, error) GetHeights() (*types.Heights, error) }
Click to show internal directories.
Click to hide internal directories.