mining

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllModels = []interface{}{
	&models.System{},

	&Progress{},
	&Schedule{},
	&UserInfo{},
	&Snapshot{},
}

AllModels collects available models.

Functions

This section is empty.

Types

type Progress added in v0.0.2

type Progress struct {
	TableName  types.TableName `gorm:"column:table_name;type:varchar(129);not null;primary_key" json:"table_name"`
	Epoch      int64           `gorm:"column:epoch;type:bigint;not null" json:"epoch"`
	From       int64           `gorm:"column:from;type:bigint;not null" json:"from"`
	To         int64           `gorm:"column:to;type:bigint;not null" json:"to"`
	Checkpoint int64           `gorm:"column:checkpoint;type:bigint;" json:"checkpoint"`

	models.Base
}

type Schedule added in v0.0.2

type Schedule struct {
	Epoch     int64           `gorm:"column:epoch;type:bigint;not null" json:"epoch"`
	StartTime int64           `gorm:"column:start_time;type:bigint;not null" json:"start_time"`
	EndTime   int64           `gorm:"column:end_time;type:bigint;not null" json:"end_time"`
	WeightFee decimal.Decimal `gorm:"column:weight_fee;type:decimal(38,18);not null" json:"weight_fee"`
	WeightOI  decimal.Decimal `gorm:"column:weight_oi;type:decimal(38,18);not null" json:"weight_oi"`
	WeightMCB decimal.Decimal `gorm:"column:weight_mcb;type:decimal(38,18);not null" json:"weight_mcb"`
}

func (*Schedule) ForeignKeyConstraints added in v0.0.2

func (*Schedule) ForeignKeyConstraints() []models.ForeignKeyConstraint

ForeignKeyConstraints create foreign key constraints.

func (*Schedule) Indexes added in v0.0.2

func (*Schedule) Indexes() []models.CustomIndex

Indexes returns information to create index.

type Snapshot added in v0.0.33

type Snapshot struct {
	Trader    string `gorm:"column:trader;primary_key;type:varchar(128);not null" json:"trader"`
	Epoch     int64  `gorm:"column:epoch;primary_key;type:bigint;not null" json:"epoch"`
	Timestamp int64  `gorm:"column:timestamp;primary_key;type:bigint;not null" json:"timestamp"`

	InitFee       decimal.Decimal `gorm:"column:init_fee;type:decimal(38,18);not null" json:"init_fee"`
	AccFee        decimal.Decimal `gorm:"column:acc_fee;type:decimal(38,18);not null" json:"acc_fee"`
	AccPosValue   decimal.Decimal `gorm:"column:acc_pos_value;type:decimal(38,18);not null" json:"acc_pos_value"`
	CurPosValue   decimal.Decimal `gorm:"column:cur_pos_value;type:decimal(38,18);not null" json:"cur_pos_value"`
	AccStakeScore decimal.Decimal `gorm:"column:acc_stake_score;type:decimal(38,18);not null" json:"acc_stake_score"`
	CurStakeScore decimal.Decimal `gorm:"column:cur_stake_score;type:decimal(38,18);not null" json:"cur_stake_score"`
	Score         decimal.Decimal `gorm:"column:score;type:decimal(38,18);not null" json:"score"`

	models.Base
}

Snapshot defines struct to contain information of a user info

func (*Snapshot) ForeignKeyConstraints added in v0.0.39

func (*Snapshot) ForeignKeyConstraints() []models.ForeignKeyConstraint

ForeignKeyConstraints create foreign key constraints.

func (*Snapshot) Indexes added in v0.0.39

func (*Snapshot) Indexes() []models.CustomIndex

Indexes returns information to create index.

type UserInfo

type UserInfo struct {
	Trader        string          `gorm:"column:trader;primary_key;type:varchar(128);not null" json:"trader"`
	Epoch         int64           `gorm:"column:epoch;primary_key;type:bigint;not null" json:"epoch"`
	InitFee       decimal.Decimal `gorm:"column:init_fee;type:decimal(38,18);not null" json:"init_fee"`
	AccFee        decimal.Decimal `gorm:"column:acc_fee;type:decimal(38,18);not null" json:"acc_fee"`
	AccPosValue   decimal.Decimal `gorm:"column:acc_pos_value;type:decimal(38,18);not null" json:"acc_pos_value"`
	CurPosValue   decimal.Decimal `gorm:"column:cur_pos_value;type:decimal(38,18);not null" json:"cur_pos_value"`
	AccStakeScore decimal.Decimal `gorm:"column:acc_stake_score;type:decimal(38,18);not null" json:"acc_stake_score"`
	CurStakeScore decimal.Decimal `gorm:"column:cur_stake_score;type:decimal(38,18);not null" json:"cur_stake_score"`
	Score         decimal.Decimal `gorm:"column:score;type:decimal(38,18);not null" json:"score"`

	Timestamp int64 `gorm:"column:timestamp;type:bigint;not null" json:"timestamp"`

	models.Base
}

UserInfo defines struct to contain information of a user info

func (*UserInfo) ForeignKeyConstraints

func (*UserInfo) ForeignKeyConstraints() []models.ForeignKeyConstraint

ForeignKeyConstraints create foreign key constraints.

func (*UserInfo) Indexes

func (*UserInfo) Indexes() []models.CustomIndex

Indexes returns information to create index.

Jump to

Keyboard shortcuts

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