Documentation ¶
Index ¶
- type IChainInfoRepository
- type IIndexPointerRepository
- type IMetaRepository
- type IValidatorInfoRepository
- type MetaRepository
- func (repo *MetaRepository) CheckIndexpoinerAlreadyInitialized(indexTableName string, chainInfoID int64) (bool, error)
- func (repo *MetaRepository) CreatePartitionTable(IndexName, chainID string) error
- func (repo *MetaRepository) CreateValidatorInfoPartitionTableByChainID(chainID string) error
- func (repo *MetaRepository) GetLastIndexPointerByIndexTableName(indexTableName string, chainInfoID int64) (model.IndexPointer, error)
- func (repo *MetaRepository) GetValidatorInfoListByChainInfoID(chainInfoID int64) ([]model.ValidatorInfo, error)
- func (repo *MetaRepository) GetValidatorInfoListByMonikers(chainInfoID int64, monikers []string) ([]model.ValidatorInfo, error)
- func (repo *MetaRepository) InitPartitionTablesByChainInfoID(indexName, chainID string, latestHeight int64) error
- func (repo *MetaRepository) InitializeIndexPointerByChainID(indexTableName, chainID string, startHeight int64) error
- func (repo *MetaRepository) InsertChainInfo(chainName, chainID string, isMainnet bool) (int64, error)
- func (repo *MetaRepository) InsertValidatorInfoList(validatorInfoList []model.ValidatorInfo) error
- func (repo *MetaRepository) SelectChainInfoIDByChainID(chainID string) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IChainInfoRepository ¶
type IChainInfoRepository interface { InsertChainInfo(chainName, chainID string, IsMainnet bool) (int64, error) SelectChainInfoIDByChainID(chainID string) (int64, error) }
interface for about meta.chain_info table
type IIndexPointerRepository ¶
type IIndexPointerRepository interface { InitializeIndexPointerByChainID(indexTableName, chainID string, startHeight int64) error GetLastIndexPointerByIndexTableName(indexTableName string, chainInfoID int64) (model.IndexPointer, error) CheckIndexpoinerAlreadyInitialized(indexTableName string, chainInfoID int64) (bool, error) }
interface for about meta.index_pointer table
type IMetaRepository ¶
type IMetaRepository interface { IChainInfoRepository IIndexPointerRepository IValidatorInfoRepository // common sql interface for partition tables CreatePartitionTable(IndexName, chainID string) error InitPartitionTablesByChainInfoID(IndexName, chainID string, latestHeight int64) error }
common repo interface
func NewMetaRepository ¶
func NewMetaRepository(indexerDB common.IndexerDB) IMetaRepository
New general repository constructor
type IValidatorInfoRepository ¶
type IValidatorInfoRepository interface { CreateValidatorInfoPartitionTableByChainID(chainID string) error GetValidatorInfoListByChainInfoID(chainInfoID int64) (validatorInfoList []model.ValidatorInfo, err error) InsertValidatorInfoList(validatorInfoList []model.ValidatorInfo) error GetValidatorInfoListByMonikers(chainInfoID int64, monikers []string) ([]model.ValidatorInfo, error) }
interface for about meta.validator_info table
type MetaRepository ¶
func (*MetaRepository) CheckIndexpoinerAlreadyInitialized ¶
func (repo *MetaRepository) CheckIndexpoinerAlreadyInitialized(indexTableName string, chainInfoID int64) (bool, error)
func (*MetaRepository) CreatePartitionTable ¶
func (repo *MetaRepository) CreatePartitionTable(IndexName, chainID string) error
Because of using chainInfoID, some users can use wrong chain_info_id about input chainID
func (*MetaRepository) CreateValidatorInfoPartitionTableByChainID ¶
func (repo *MetaRepository) CreateValidatorInfoPartitionTableByChainID(chainID string) error
func (*MetaRepository) GetLastIndexPointerByIndexTableName ¶
func (repo *MetaRepository) GetLastIndexPointerByIndexTableName(indexTableName string, chainInfoID int64) (model.IndexPointer, error)
func (*MetaRepository) GetValidatorInfoListByChainInfoID ¶
func (repo *MetaRepository) GetValidatorInfoListByChainInfoID(chainInfoID int64) ([]model.ValidatorInfo, error)
func (*MetaRepository) GetValidatorInfoListByMonikers ¶
func (repo *MetaRepository) GetValidatorInfoListByMonikers(chainInfoID int64, monikers []string) ([]model.ValidatorInfo, error)
func (*MetaRepository) InitPartitionTablesByChainInfoID ¶
func (repo *MetaRepository) InitPartitionTablesByChainInfoID(indexName, chainID string, latestHeight int64) error
func (*MetaRepository) InitializeIndexPointerByChainID ¶
func (repo *MetaRepository) InitializeIndexPointerByChainID( indexTableName, chainID string, startHeight int64, ) error
func (*MetaRepository) InsertChainInfo ¶
func (repo *MetaRepository) InsertChainInfo(chainName, chainID string, isMainnet bool) (int64, error)
func (*MetaRepository) InsertValidatorInfoList ¶
func (repo *MetaRepository) InsertValidatorInfoList(validatorInfoList []model.ValidatorInfo) error
func (*MetaRepository) SelectChainInfoIDByChainID ¶
func (repo *MetaRepository) SelectChainInfoIDByChainID(chainID string) (int64, error)
Click to show internal directories.
Click to hide internal directories.