Documentation ¶
Index ¶
- func NewMongoClient() (*mongo.Client, *mongo.Database, error)
- func NewPostgresClient(config *config.Config) (*gorm.DB, error)
- func UpdateLastEventCheckPoint(db *gorm.DB, value *models.EventCheckPoint) error
- type DatabaseAdapter
- func (db *DatabaseAdapter) CreateBatchValue(values interface{}, batchSize int) error
- func (db *DatabaseAdapter) CreateRelayDatas(datas []models.RelayData, lastCheckpoint *models.EventCheckPoint) error
- func (db *DatabaseAdapter) CreateSingleValue(value interface{}) error
- func (db *DatabaseAdapter) FindPayloadByHash(payloadHash string) ([]byte, error)
- func (db *DatabaseAdapter) FindProtocolInfo(chainName string, contractAddress string) (*models.ProtocolInfo, error)
- func (db *DatabaseAdapter) FindRelayDataById(id string, option *QueryOptions) (*models.RelayData, error)
- func (db *DatabaseAdapter) GetLastEventCheckPoint(chainName string) (*models.EventCheckPoint, error)
- func (db *DatabaseAdapter) UpdateContractCallApproved(messageID string, executeHash string) error
- func (db *DatabaseAdapter) UpdateEventStatus(id string, status RelayDataStatus) error
- func (db *DatabaseAdapter) UpdateRelayDataStatueWithExecuteHash(id string, status RelayDataStatus, executeHash *string) error
- func (db *DatabaseAdapter) UpdateRelayDataStatueWithPacketSequence(id string, status RelayDataStatus, sequence *int) error
- type QueryOptions
- type RelayDataStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UpdateLastEventCheckPoint ¶
func UpdateLastEventCheckPoint(db *gorm.DB, value *models.EventCheckPoint) error
Types ¶
type DatabaseAdapter ¶
func NewDatabaseAdapter ¶
func NewDatabaseAdapter(config *config.Config) (*DatabaseAdapter, error)
func (*DatabaseAdapter) CreateBatchValue ¶
func (db *DatabaseAdapter) CreateBatchValue(values interface{}, batchSize int) error
func (*DatabaseAdapter) CreateRelayDatas ¶
func (db *DatabaseAdapter) CreateRelayDatas(datas []models.RelayData, lastCheckpoint *models.EventCheckPoint) error
func (*DatabaseAdapter) CreateSingleValue ¶
func (db *DatabaseAdapter) CreateSingleValue(value interface{}) error
func (*DatabaseAdapter) FindPayloadByHash ¶
func (db *DatabaseAdapter) FindPayloadByHash(payloadHash string) ([]byte, error)
func (*DatabaseAdapter) FindProtocolInfo ¶
func (db *DatabaseAdapter) FindProtocolInfo(chainName string, contractAddress string) (*models.ProtocolInfo, error)
func (*DatabaseAdapter) FindRelayDataById ¶
func (db *DatabaseAdapter) FindRelayDataById(id string, option *QueryOptions) (*models.RelayData, error)
func (*DatabaseAdapter) GetLastEventCheckPoint ¶
func (db *DatabaseAdapter) GetLastEventCheckPoint(chainName string) (*models.EventCheckPoint, error)
func (*DatabaseAdapter) UpdateContractCallApproved ¶
func (db *DatabaseAdapter) UpdateContractCallApproved(messageID string, executeHash string) error
func (*DatabaseAdapter) UpdateEventStatus ¶
func (db *DatabaseAdapter) UpdateEventStatus(id string, status RelayDataStatus) error
func (*DatabaseAdapter) UpdateRelayDataStatueWithExecuteHash ¶
func (db *DatabaseAdapter) UpdateRelayDataStatueWithExecuteHash(id string, status RelayDataStatus, executeHash *string) error
func (*DatabaseAdapter) UpdateRelayDataStatueWithPacketSequence ¶
func (db *DatabaseAdapter) UpdateRelayDataStatueWithPacketSequence(id string, status RelayDataStatus, sequence *int) error
--- For Setup and Run Evm and Cosmos Relayer ---
type QueryOptions ¶
type RelayDataStatus ¶
type RelayDataStatus int
const ( PENDING RelayDataStatus = iota APPROVED SUCCESS FAILED )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.