Documentation ¶
Overview ¶
Package base contains the base implementation for different sql driers.
Index ¶
- func GetAllModels() (allModels []interface{})
- type Store
- func (s Store) DB() *gorm.DB
- func (s Store) DatastoreForSigner(address common.Address) (datastore.Batching, error)
- func (s Store) GetQuoteResultsByStatus(ctx context.Context, matchStatuses ...db.SynapseRequestStatus) (res []db.SignRequest, err error)
- func (s Store) GlobalDatastore() (datastore.Batching, error)
- func (s Store) StoreInterchainTransactionReceived(ctx context.Context, originChainID int, ...) error
- func (s Store) SubmitterDB() submitterDB.Service
- func (s Store) UpdateSignRequestStatus(ctx context.Context, txid common.Hash, status db.SynapseRequestStatus) error
- type VerificationRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllModels ¶
func GetAllModels() (allModels []interface{})
GetAllModels gets all models to migrate see: https://medium.com/@SaifAbid/slice-interfaces-8c78f8b6345d for an explanation of why we can't do this at initialization time
Types ¶
type Store ¶
type Store struct { listenerDB.ChainListenerDB // contains filtered or unexported fields }
Store implements the service.
func (Store) DatastoreForSigner ¶
DatastoreForSigner gets the datastore for a given signer.
func (Store) GetQuoteResultsByStatus ¶
func (s Store) GetQuoteResultsByStatus(ctx context.Context, matchStatuses ...db.SynapseRequestStatus) (res []db.SignRequest, err error)
GetQuoteResultsByStatus gets quote results by status.
func (Store) GlobalDatastore ¶
GlobalDatastore gets the global datastore.
func (Store) StoreInterchainTransactionReceived ¶
func (s Store) StoreInterchainTransactionReceived(ctx context.Context, originChainID int, sr synapsemodule.SynapseModuleBatchVerificationRequested) error
StoreInterchainTransactionReceived stores an interchain transaction received.
func (Store) SubmitterDB ¶
func (s Store) SubmitterDB() submitterDB.Service
SubmitterDB gets the submitter database object for mutation outside of the lib.
func (Store) UpdateSignRequestStatus ¶
func (s Store) UpdateSignRequestStatus(ctx context.Context, txid common.Hash, status db.SynapseRequestStatus) error
UpdateSignRequestStatus updates a sign request status.
type VerificationRequest ¶
type VerificationRequest struct { // TXHash is the hash of the transaction TXHash string `gorm:"column:tx_hash;index;size:256"` // TransactionID is the id of the transaction TransactionID string `gorm:"column:transaction_id;index;size:256;primaryKey"` // Entry is the entry to be signed // TODO: consider renaming to batch Entry string `gorm:"column:entry;"` // CreatedAt is the time the transaction was created CreatedAt time.Time // Status is the status of the transaction Status db.SynapseRequestStatus `gorm:"column:status;index"` // OriginChainID is the chain id the transaction hash was sent on OriginChainID int `gorm:"column:origin_chain_id;index"` // DestinationChainID is the chain id the transaction hash will be sent on DestinationChainID int `gorm:"column:destination_chain_id;index"` }
VerificationRequest is a request to sign a message.
func (*VerificationRequest) ToServiceSignRequest ¶
func (s *VerificationRequest) ToServiceSignRequest() db.SignRequest
ToServiceSignRequest converts a VerificationRequest to a db.SignRequest.