internal

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventLog

type EventLog struct {
	ID        int64  `gorm:"primaryKey;autoIncrement" json:"id"`
	Type      string `json:"type"`
	Data      string `json:"data"`
	CreatedAt int64  `json:"created_at" gorm:"autoUpdateTime"`
}

type PoolPayout

type PoolPayout struct {
	ID         int64     `gorm:"primaryKey;autoIncrement" json:"id"`
	EthAddress string    `json:"ethAddress"`
	TxHash     string    `json:"txHash"`
	Fees       int64     `json:"fees"`
	CreatedAt  time.Time `json:"createdAt" gorm:"autoUpdateTime"`
}

PoolPayout represents the pool payout record.

func (PoolPayout) GetAmount

func (pp PoolPayout) GetAmount() int64

func (PoolPayout) GetID

func (pp PoolPayout) GetID() string

func (PoolPayout) GetTimestamp

func (pp PoolPayout) GetTimestamp() int64

type RemoteWorker

type RemoteWorker struct {
	EthAddress  string    `json:"ethAddress" gorm:"primaryKey;not null"`
	NodeType    string    `json:"nodeType" gorm:"primaryKey;not null"`
	Region      string    `json:"region" gorm:"primaryKey;not null"`
	IsConnected bool      `json:"is_connected"`
	PendingFees int64     `json:"pending_fees"`
	PaidFees    int64     `json:"paid_fees"`
	LastUpdated time.Time `json:"last_updated" gorm:"autoUpdateTime"`
	Connection  string    `json:"connection,omitempty"`
}

RemoteWorker represents a worker. The unique composite key is built from EthAddress, NodeType, and Region.

func (RemoteWorker) GetID

func (rw RemoteWorker) GetID() string

func (RemoteWorker) GetNodeType

func (rw RemoteWorker) GetNodeType() string

func (RemoteWorker) GetPaidFees

func (rw RemoteWorker) GetPaidFees() int64

func (RemoteWorker) GetPendingFees

func (rw RemoteWorker) GetPendingFees() int64

func (RemoteWorker) GetRegion

func (rw RemoteWorker) GetRegion() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL