Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BillingRecordCollected ¶
type BillingRecordCollected struct { CreatedAt time.Time UpdatedAt time.Time TxHash common.Hash `gorm:"primaryKey;type:bytea;column:tx_hash"` Index uint `gorm:"primaryKey;column:index"` ChainID uint64 `gorm:"index;column:chain_id"` BlockTimestamp time.Time `gorm:"index;column:block_timestamp"` BlockNumber uint64 `gorm:"index;column:block_number"` User common.Address `gorm:"type:bytea;column:user"` Amount decimal.Decimal `gorm:"column:amount"` }
func (*BillingRecordCollected) Export ¶
func (r *BillingRecordCollected) Export() (*schema.BillingRecordCollected, error)
func (*BillingRecordCollected) Import ¶
func (r *BillingRecordCollected) Import(billingRecord schema.BillingRecordCollected) error
func (*BillingRecordCollected) TableName ¶
func (r *BillingRecordCollected) TableName() string
type BillingRecordDeposited ¶
type BillingRecordDeposited struct { CreatedAt time.Time UpdatedAt time.Time TxHash common.Hash `gorm:"primaryKey;type:bytea;column:tx_hash"` Index uint `gorm:"primaryKey;column:index"` ChainID uint64 `gorm:"index;column:chain_id"` BlockTimestamp time.Time `gorm:"index;column:block_timestamp"` BlockNumber uint64 `gorm:"index;column:block_number"` User common.Address `gorm:"type:bytea;column:user"` Amount decimal.Decimal `gorm:"column:amount"` }
func (*BillingRecordDeposited) Export ¶
func (r *BillingRecordDeposited) Export() (*schema.BillingRecordDeposited, error)
func (*BillingRecordDeposited) Import ¶
func (r *BillingRecordDeposited) Import(billingRecord schema.BillingRecordDeposited) error
func (*BillingRecordDeposited) TableName ¶
func (r *BillingRecordDeposited) TableName() string
type BillingRecordWithdrawal ¶
type BillingRecordWithdrawal struct { CreatedAt time.Time UpdatedAt time.Time TxHash common.Hash `gorm:"primaryKey;type:bytea;column:tx_hash"` Index uint `gorm:"primaryKey;column:index"` ChainID uint64 `gorm:"index;column:chain_id"` BlockTimestamp time.Time `gorm:"index;column:block_timestamp"` BlockNumber uint64 `gorm:"index;column:block_number"` User common.Address `gorm:"type:bytea;column:user"` Amount decimal.Decimal `gorm:"column:amount"` Fee decimal.Decimal `gorm:"column:fee"` }
func (*BillingRecordWithdrawal) Export ¶
func (r *BillingRecordWithdrawal) Export() (*schema.BillingRecordWithdrawal, error)
func (*BillingRecordWithdrawal) Import ¶
func (r *BillingRecordWithdrawal) Import(billingRecord schema.BillingRecordWithdrawal) error
func (*BillingRecordWithdrawal) TableName ¶
func (r *BillingRecordWithdrawal) TableName() string
type Checkpoint ¶
type Checkpoint struct { ChainID uint64 `gorm:"primaryKey;column:chain_id"` BlockNumber uint64 `gorm:"column:block_number"` BlockHash string `gorm:"column:block_hash"` CreatedAt time.Time `gorm:"column:created_at"` UpdatedAt time.Time `gorm:"column:updated_at"` }
func (*Checkpoint) Export ¶
func (c *Checkpoint) Export() (*schema.Checkpoint, error)
func (*Checkpoint) Import ¶
func (c *Checkpoint) Import(checkpoint schema.Checkpoint) error
func (*Checkpoint) TableName ¶
func (c *Checkpoint) TableName() string
type GatewayAccount ¶
type GatewayAccount struct { CreatedAt time.Time UpdatedAt time.Time DeletedAt gorm.DeletedAt `gorm:"index"` Address common.Address `gorm:"primaryKey;type:bytea;column:address"` RuLimit int64 `gorm:"column:ru_limit"` IsPaused bool `gorm:"column:is_paused"` BillingRate float64 `gorm:"column:billing_rate"` }
func (*GatewayAccount) TableName ¶
func (r *GatewayAccount) TableName() string
type GatewayConsumptionLog ¶
type GatewayConsumptionLog struct { ID uint `gorm:"primaryKey"` CreatedAt time.Time UpdatedAt time.Time ConsumptionDate time.Time `gorm:"index;column:consumption_date"` Epoch uint64 `gorm:"index;column:epoch"` RuUsed int64 `gorm:"column:ru_used"` APICalls int64 `gorm:"column:api_calls"` KeyID uint64 `gorm:"index;column:key_id"` // Foreign key of GatewayKey Key GatewayKey `gorm:"foreignKey:KeyID"` }
func (*GatewayConsumptionLog) TableName ¶
func (r *GatewayConsumptionLog) TableName() string
type GatewayKey ¶
type GatewayKey struct { ID uint64 `gorm:"primaryKey;column:id"` CreatedAt time.Time UpdatedAt time.Time DeletedAt gorm.DeletedAt `gorm:"index"` Key uuid.UUID `gorm:"uniqueIndex;column:key"` RuUsedTotal int64 `gorm:"column:ru_used_total"` RuUsedCurrent int64 `gorm:"index;column:ru_used_current"` APICallsTotal int64 `gorm:"column:api_calls_total"` APICallsCurrent int64 `gorm:"column:api_calls_current"` Name string `gorm:"column:name"` AccountAddress common.Address `gorm:"index;type:bytea;column:account_address"` // Foreign key of GatewayAccount Account GatewayAccount `gorm:"foreignKey:AccountAddress"` }
func (*GatewayKey) TableName ¶
func (r *GatewayKey) TableName() string
type GatewayPendingWithdrawRequest ¶
type GatewayPendingWithdrawRequest struct { CreatedAt time.Time UpdatedAt time.Time Amount float64 `gorm:"column:amount"` AccountAddress common.Address `gorm:"primarykey;type:bytea;column:account_address"` // Foreign key of GatewayAccount Account GatewayAccount `gorm:"foreignKey:AccountAddress"` // Belongs to GatewayAccount }
func (*GatewayPendingWithdrawRequest) TableName ¶
func (r *GatewayPendingWithdrawRequest) TableName() string
type NodeRequestRecord ¶
type NodeRequestRecord struct { // Composite Primary Key (epoch-node_address) Epoch uint64 `gorm:"primaryKey;autoIncrement:false;column:epoch"` NodeAddress common.Address `gorm:"primaryKey;type:bytea;column:node_address"` // Event data (ignore `operationRewards` `stakingRewards` `taxAmounts` because they are not required here) RequestCount uint64 `gorm:"column:request_counts"` // From GI on-chain requests RequestReward decimal.Decimal `gorm:"column:request_rewards"` // Update after request rewards distribute }
func (*NodeRequestRecord) Export ¶
func (r *NodeRequestRecord) Export() (*schema.NodeRequestRecord, error)
func (*NodeRequestRecord) Import ¶
func (r *NodeRequestRecord) Import(nodeRequestRewards schema.NodeRequestRecord) error
func (*NodeRequestRecord) TableName ¶
func (r *NodeRequestRecord) TableName() string
Click to show internal directories.
Click to hide internal directories.