model

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2025 License: MIT Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const TableNameChainM = "gateway_chain"
View Source
const TableNameMinerM = "gateway_miner"
View Source
const TableNameMinerSetM = "gateway_minerset"

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainM

type ChainM struct {
	ID                     int64     `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键 ID" json:"id"`                     // 主键 ID
	Namespace              string    `gorm:"column:namespace;not null;comment:命名空间" json:"namespace"`                             // 命名空间
	Name                   string    `gorm:"column:name;not null;comment:区块链名" json:"name"`                                       // 区块链名
	DisplayName            string    `gorm:"column:displayName;not null;comment:区块链展示名" json:"displayName"`                       // 区块链展示名
	MinerType              string    `gorm:"column:minerType;not null;comment:区块链矿机机型" json:"minerType"`                          // 区块链矿机机型
	Image                  string    `gorm:"column:image;not null;comment:区块链镜像 ID" json:"image"`                                 // 区块链镜像 ID
	MinMineIntervalSeconds int32     `gorm:"column:minMineIntervalSeconds;not null;comment:矿机挖矿间隔" json:"minMineIntervalSeconds"` // 矿机挖矿间隔
	CreatedAt              time.Time `gorm:"column:createdAt;not null;default:current_timestamp;comment:创建时间" json:"createdAt"`   // 创建时间
	UpdatedAt              time.Time `gorm:"column:updatedAt;not null;default:current_timestamp;comment:最后修改时间" json:"updatedAt"` // 最后修改时间
}

ChainM mapped from table <gateway_chain>

func (*ChainM) TableName

func (*ChainM) TableName() string

TableName ChainM's table name

type MinerM

type MinerM struct {
	ID          int64     `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键 ID" json:"id"`                     // 主键 ID
	Namespace   string    `gorm:"column:namespace;not null;comment:命名空间" json:"namespace"`                             // 命名空间
	Name        string    `gorm:"column:name;not null;comment:矿机名" json:"name"`                                        // 矿机名
	DisplayName string    `gorm:"column:displayName;not null;comment:矿机展示名" json:"displayName"`                        // 矿机展示名
	Phase       string    `gorm:"column:phase;not null;comment:矿机状态" json:"phase"`                                     // 矿机状态
	MinerType   string    `gorm:"column:minerType;not null;comment:矿机机型" json:"minerType"`                             // 矿机机型
	ChainName   string    `gorm:"column:chainName;not null;comment:矿机所属的区块链名" json:"chainName"`                        // 矿机所属的区块链名
	CPU         int32     `gorm:"column:cpu;not null;comment:矿机 CPU 规格" json:"cpu"`                                    // 矿机 CPU 规格
	Memory      int32     `gorm:"column:memory;not null;comment:矿机内存规格" json:"memory"`                                 // 矿机内存规格
	CreatedAt   time.Time `gorm:"column:createdAt;not null;default:current_timestamp;comment:创建时间" json:"createdAt"`   // 创建时间
	UpdatedAt   time.Time `gorm:"column:updatedAt;not null;default:current_timestamp;comment:最后修改时间" json:"updatedAt"` // 最后修改时间
}

MinerM mapped from table <gateway_miner>

func (*MinerM) TableName

func (*MinerM) TableName() string

TableName MinerM's table name

type MinerSetM

type MinerSetM struct {
	ID                   int64     `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键 ID" json:"id"`                     // 主键 ID
	Namespace            string    `gorm:"column:namespace;not null;comment:命名空间" json:"namespace"`                             // 命名空间
	Name                 string    `gorm:"column:name;not null;comment:矿机池名" json:"name"`                                       // 矿机池名
	Replicas             int32     `gorm:"column:replicas;not null;comment:矿机副本数" json:"replicas"`                              // 矿机副本数
	DisplayName          string    `gorm:"column:displayName;not null;comment:矿机池展示名" json:"displayName"`                       // 矿机池展示名
	DeletePolicy         string    `gorm:"column:deletePolicy;not null;comment:矿机池缩容策略" json:"deletePolicy"`                    // 矿机池缩容策略
	MinReadySeconds      int32     `gorm:"column:minReadySeconds;not null;comment:矿机 Ready 最小等待时间" json:"minReadySeconds"`      // 矿机 Ready 最小等待时间
	FullyLabeledReplicas int32     `gorm:"column:fullyLabeledReplicas;not null;comment:所有标签匹配的副本数" json:"fullyLabeledReplicas"` // 所有标签匹配的副本数
	ReadyReplicas        int32     `gorm:"column:readyReplicas;not null;comment:Ready 副本数" json:"readyReplicas"`                // Ready 副本数
	AvailableReplicas    int32     `gorm:"column:availableReplicas;not null;comment:可用副本数" json:"availableReplicas"`            // 可用副本数
	FailureReason        *string   `gorm:"column:failureReason;comment:失败原因" json:"failureReason"`                              // 失败原因
	FailureMessage       *string   `gorm:"column:failureMessage;comment:失败信息" json:"failureMessage"`                            // 失败信息
	Conditions           *string   `gorm:"column:conditions;comment:矿机池状态" json:"conditions"`                                   // 矿机池状态
	CreatedAt            time.Time `gorm:"column:createdAt;not null;default:current_timestamp;comment:创建时间" json:"createdAt"`   // 创建时间
	UpdatedAt            time.Time `gorm:"column:updatedAt;not null;default:current_timestamp;comment:最后修改时间" json:"updatedAt"` // 最后修改时间
}

MinerSetM mapped from table <gateway_minerset>

func (*MinerSetM) TableName

func (*MinerSetM) TableName() string

TableName MinerSetM's table name

Jump to

Keyboard shortcuts

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