model

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	ID                 int       `json:"id"`
	Chain              string    `json:"chain"`
	Value              string    `json:"value"`
	Balance            uint64    `json:"balance"`
	UnlockedBalance    uint64    `json:"unlocked_balance"`
	LockedStakeable    uint64    `json:"locked_stakeable"`
	LockedNotStakeable uint64    `json:"locked_not_stakeable"`
	CreatedAt          time.Time `json:"created_at"`
	UpdatedAt          time.Time `json:"updated_at"`
}

func (Address) TableName

func (Address) TableName() string

type Delegation

type Delegation struct {
	ID              int          `json:"-"`
	ReferenceID     string       `json:"id"`
	NodeID          string       `json:"node_id"`
	StakeAmount     types.Amount `json:"stake_amount"`
	PotentialReward types.Amount `json:"potential_reward"`
	RewardAddress   string       `json:"reward_address"`
	Active          bool         `json:"active"`
	ActiveStartTime time.Time    `json:"active_start_time"`
	ActiveEndTime   time.Time    `json:"active_end_time"`
	FirstHeight     int64        `json:"first_height"`
	LastHeight      int64        `json:"last_height"`
	CreatedAt       time.Time    `json:"created_at"`
	UpdatedAt       time.Time    `json:"updated_at"`
}

func (Delegation) TableName

func (Delegation) TableName() string

type DelegatorSeq

type DelegatorSeq struct {
	ID              int
	NodeID          string
	StakeAmount     int64
	PotentialReward int64
	ActiveStartTime time.Time
	ActiveEndTime   time.Time
	CreatedAt       time.Time
}

func (DelegatorSeq) TableName

func (DelegatorSeq) TableName() string

type Event

type Event struct {
	ID        int       `json:"id"`
	Type      string    `json:"type"`
	Scope     string    `json:"scope"`
	Actor     string    `json:"actor"`
	ActorType string    `json:"actor_type"`
	Item      string    `json:"item"`
	ItemType  string    `json:"item_type"`
	Meta      Metadata  `json:"meta"`
	CreatedAt time.Time `json:"created_at"`
}

func (Event) TableName

func (Event) TableName() string

type Metadata

type Metadata string

func (Metadata) MarshalJSON

func (m Metadata) MarshalJSON() ([]byte, error)

type NetworkMetric

type NetworkMetric struct {
	ID                      int          `json:"-"`
	Time                    time.Time    `json:"time"`
	Height                  int64        `json:"height"`
	PeersCount              int          `json:"peers_count"`
	BlockchainsCount        int          `json:"blockchains_count"`
	ActiveValidatorsCount   int          `json:"active_validators_count"`
	PendingValidatorsCount  int          `json:"pending_validators_count"`
	ActiveDelegationsCount  int          `json:"active_delegations_count"`
	PendingDelegationsCount int          `json:"pending_delegations_count"`
	MinValidatorStake       int64        `json:"min_validator_stake"`
	MinDelegationStake      int64        `json:"min_delegation_stake"`
	TxFee                   int          `json:"tx_fee"`
	CreationTxFee           int          `json:"creation_tx_fee"`
	Uptime                  float64      `json:"uptime"`
	DelegationFee           float64      `json:"delegation_fee"`
	TotalStaked             types.Amount `json:"total_staked"`
	TotalDelegated          types.Amount `json:"total_delegated"`
}

func (NetworkMetric) TableName

func (NetworkMetric) TableName() string

type NetworkStat

type NetworkStat struct {
	ID                 int          `json:"-"`
	Time               time.Time    `json:"time"`
	Bucket             string       `json:"bucket"`
	HeightChange       int          `json:"height_change"`
	Peers              int          `json:"peers"`
	Blockchains        int          `json:"blockchains"`
	ActiveValidators   int          `json:"active_validators"`
	PendingValidators  int          `json:"pending_validators"`
	ValidatorUptime    float64      `json:"validator_uptime"`
	ActiveDelegations  int          `json:"active_delegations"`
	PendingDelegations int          `json:"pending_delegations"`
	MinValidatorStake  int64        `json:"min_validator_stake"`
	MinDelegationStake int64        `json:"min_delegator_stake"`
	TxFee              int64        `json:"tx_fee"`
	CreateTxFee        int64        `json:"create_tx_fee"`
	TotalStaked        types.Amount `json:"total_staked"`
	TotalDelegated     types.Amount `json:"total_delegated"`
}

func (NetworkStat) TableName

func (NetworkStat) TableName() string

type Validator

type Validator struct {
	ID                     int          `json:"-"`
	NodeID                 string       `json:"node_id"`
	StakeAmount            types.Amount `json:"stake_amount"`
	StakePercent           float64      `json:"stake_percent"`
	PotentialReward        types.Amount `json:"potential_reward"`
	RewardAddress          string       `json:"reward_address"`
	Active                 bool         `json:"active"`
	ActiveStartTime        time.Time    `json:"active_start_time"`
	ActiveEndTime          time.Time    `json:"active_end_time"`
	ActiveProgressPercent  float64      `json:"active_progress_percent"`
	Uptime                 float64      `json:"uptime"`
	DelegationsCount       int          `json:"delegations_count"`
	DelegationsPercent     float64      `json:"delegations_percent"`
	DelegatedAmount        types.Amount `json:"delegated_amount"`
	DelegatedAmountPercent float64      `json:"delegated_amount_percent"`
	DelegationFee          float64      `json:"delegation_fee"`
	Capacity               types.Amount `json:"capacity"`
	CapacityPercent        float64      `json:"capacity_percent"`
	FirstHeight            int64        `json:"first_height"`
	LastHeight             int64        `json:"last_height"`
	CreatedAt              time.Time    `json:"created_at"`
	UpdatedAt              time.Time    `json:"updated_at"`
}

func (Validator) TableName

func (Validator) TableName() string

type ValidatorSeq

type ValidatorSeq struct {
	ID                     int
	Time                   time.Time
	Height                 int64
	NodeID                 string
	StakeAmount            types.Amount
	StakePercent           float64
	PotentialReward        types.Amount
	RewardAddress          string
	Active                 bool
	ActiveStartTime        time.Time
	ActiveEndTime          time.Time
	ActiveProgressPercent  float64
	DelegationsCount       int
	DelegationsPercent     float64
	DelegatedAmount        types.Amount
	DelegatedAmountPercent float64
	DelegationFee          float64
	Uptime                 float64
}

func (ValidatorSeq) TableName

func (ValidatorSeq) TableName() string

type ValidatorStat

type ValidatorStat struct {
	ID                     int       `json:"-"`
	Time                   time.Time `json:"time"`
	Bucket                 string    `json:"bucket"`
	NodeID                 string    `json:"-"`
	UptimeMin              float64   `json:"uptime_min"`
	UptimeMax              float64   `json:"uptime_max"`
	UptimeAvg              float64   `json:"uptime_avg"`
	StakeAmount            int64     `json:"stake_amount"`
	StakePercent           float64   `json:"stake_percent"`
	DelegationsCount       int       `json:"delegations_count"`
	DelegationsPercent     float64   `json:"delegations_percent"`
	DelegatedAmount        int64     `json:"delegated_amount"`
	DelegatedAmountPercent float64   `json:"delegated_amount_percent"`
}

func (ValidatorStat) TableName

func (ValidatorStat) TableName() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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