entity

package
v0.0.0-...-74afdde Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Device_status_deactive = 0
	Device_status_active   = 1

	MessageNotiReceive = "recipient"
	MessageNotiSend    = "sender"

	DefaultDecCoin = "1000000000000000000"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	ChainId               string
	Height                int64 `gorm:"primary_key;index:idx_block_height"`
	AppHash               string
	HeaderHash            string `gorm:"index:idx_block_header_hash"`
	ConsensusHash         string
	DataHash              string
	TxnsHash              string
	EvidenceHash          string
	LastCommitHash        string
	LastResultsHash       string
	NextValidatorsHash    string
	ProposerAddress       string
	ValidatorsHash        string
	NumTxs                int64
	Time                  int64
	TotalTxs              int64
	Size                  int
	AvgFee                string
	LastBlockId           string
	AnnualInflationRate   decimal.Decimal `gorm:"type:numeric;index:idx_block_annual_rate"`
	AnnualInflationBlocks decimal.Decimal `gorm:"type:numeric;index:idx_block_annual_blocks"`
	InflationPerBlock     decimal.Decimal `gorm:"type:numeric;index:idx_block_per_block"`
	TotalSupply           string
	CirculatingSupply     string
}

type CommRate

type CommRate struct {
	Rate          string
	MaxRate       string
	MaxChangeRate string
}

type Delegator

type Delegator struct {
	DelegatorAddress string `gorm:"primary_key;index:idx_delegator_delegator_address"`
	ValidatorAddress string `gorm:"primary_key;index:idx_delegator_validator_address"`
	WithdrawAddress  string
	Shares           string
}

type DeviceStatus

type DeviceStatus int

type Message

type Message struct {
	BlockHeight     int64  `gorm:"primary_key;index:idx_message_block_height"`
	TransactionHash string `gorm:"primary_key"`
	MessageIndex    int64  `gorm:"primary_key"`
	MessageTime     int64  `gorm:"index:idx_message_message_time"`
	Type            string
	IsValid         bool
	Payload         string
	PayloadLog      string
}

func (*Message) NewMessage

func (m *Message) NewMessage(msg *Message) *Message

type MessageBeginDelegate

type MessageBeginDelegate struct {
	*Message
	DelegatorAddress    string `gorm:"index:idx_message_begin_delegate_delegator_address"`
	ValidatorSrcAddress string `gorm:"index:idx_message_begin_delegate_validator_src_address"`
	ValidatorDstAddress string `gorm:"index:idx_message_begin_delegate_validator_dst_address"`
	Amount              string
}

type MessageCreateValidator

type MessageCreateValidator struct {
	*Message
	DelegatorAddress string `gorm:"index:idx_message_create_validator_delegator_address"`
	ValidatorAddress string `gorm:"index:idx_message_create_validator_validator_address"`
	Value            string
	Commission       string
}

type MessageDelegate

type MessageDelegate struct {
	*Message
	DelegatorAddress string `gorm:"index:idx_message_delegate_delegator_address"`
	ValidatorAddress string `gorm:"index:idx_message_delegate_validator_address"`
	Amount           string
}

type MessageMultiSend

type MessageMultiSend struct {
	*Message
	Inputs  string
	Outputs string
}

type MessageSend

type MessageSend struct {
	BlockHeight      int64  `gorm:"primary_key;index:idx_message_block_height;index:idx_message_comp_msg,priority:1"`
	TransactionHash  string `gorm:"index:idx_message_transaction_hash"`
	TransactionIndex int64  `gorm:"primary_key;index:idx_message_transaction_index;index:idx_message_comp_msg,priority:2"`
	MessageIndex     int64  `gorm:"primary_key;index:idx_message_message_index;index:idx_message_comp_msg,priority:3"`
	MessageTime      int64  `gorm:"index:idx_message_message_time"`
	Type             string
	IsValid          bool
	Payload          string
	PayloadLog       string
	FromAddress      string `gorm:"index:idx_message_send_to_address"`
	ToAddress        string `gorm:"index:idx_message_send_from_address"`
	Amount           string
}

type MessageUndelegate

type MessageUndelegate struct {
	*Message
	DelegatorAddress string `gorm:"index:idx_message_undelegate_delegator_address"`
	ValidatorAddress string `gorm:"index:idx_message_undelegate_validator_address"`
	Amount           string
}

type MessageWithdrawDelegatorReward

type MessageWithdrawDelegatorReward struct {
	*Message
	DelegatorAddress string `gorm:"index:idx_message_withdraw_delegator_reward_delegator_address"`
	ValidatorAddress string `gorm:"index:idx_message_withdraw_delegator_reward_validator_address"`
}

type MessageWithdrawValidatorCommission

type MessageWithdrawValidatorCommission struct {
	*Message
	ValidatorAddress string `gorm:"index:idx_message_withdraw_validator_commission_validator_address"`
}

type MultiSendInput

type MultiSendInput struct {
	Address string
	Amount  string
}

type MultiSendInputs

type MultiSendInputs []MultiSendInput

type MultiSendOutput

type MultiSendOutput struct {
	Address string
	Amount  string
}

type MultiSendOutputs

type MultiSendOutputs []MultiSendOutput

type NodeInfo

type NodeInfo struct {
	HardwareInfo     string  `json:"hardware_info"`
	IP               string  `json:"ip"`
	Latitude         float64 `json:"latitude"`
	Longitude        float64 `json:"longitude"`
	Location         string  `json:"location"`
	NodeId           string  `gorm:"primary_key" json:"node_id"`
	NodeType         string  `json:"node_type"`
	WorkerEndpoint   string  `json:"worker_endpoint"`
	WorkerRegistered bool    `json:"worker_registered"`
	WorkerAddress    string  `json:"worker_address"`
	WorkerPubkey     string  `json:"worker_pubkey"`
	ValConsAddress   string  `json:"val_cons_address"`
	LastUpdate       int64   `json:"last_update" gorm:"index:idx_node_info_last_update"`
}

type PnTokenDevice

type PnTokenDevice struct {
	PlatformName string
	PnToken      string `gorm:"PRIMARY_KEY;NOT NULL;index:idx_device_token"`
	Wallet       string `gorm:"PRIMARY_KEY;NOT NULL;index:idx_device_wallet"`
	CreatedAt    int64
	DeviceStatus DeviceStatus
}

type Stake

type Stake struct {
	DelegatorAddress string `gorm:"primary_key"`
	Shares           string
	SharesDec        decimal.Decimal `gorm:"type:numeric;index:idx_staked_share_dec"`
}

type Transaction

type Transaction struct {
	BlockHeight int64 `gorm:"primary_key;index:idx_transaction_block_height;index:idx_transaction_height_index,priority:1"`
	BlockTime   int64
	Hash        string `gorm:"index:idx_transaction_hash"`
	TxIndex     int64  `gorm:"primary_key;index:idx_transaction_tx_index;index:idx_transaction_height_index,priority:2"`
	Gas         int64
	Memo        string
	Fee         string
	Signatures  string
	IsValid     bool
	Payload     string
	PayloadLog  string
}

type Txs

type Txs struct {
	BlockHeight      int64          `gorm:"primary_key;index:idx_txs_block_height;index:idx_txs_comp_address,priority:2" json:"block_height"`
	BlockHash        string         `json:"block_hash"`
	BlockTime        int64          `json:"block_time" gorm:"index:idx_txs_block_time;index:idx_txs_send"`
	TransactionHash  string         `gorm:"index:idx_txs_transaction_hash" json:"transaction_hash"`
	TransactionIndex int64          `gorm:"primary_key;index:idx_txs_transaction_index;index:idx_txs_comp_address,priority:3" json:"transaction_index"`
	MessageType      string         `json:"message_type" gorm:"index:idx_txs_message_type;index:idx_txs_send"`
	MessageIndex     int64          `gorm:"primary_key;index:idx_txs_message_index;index:idx_txs_comp_address,priority:4" json:"message_index"`
	Address          string         `gorm:"primary_key;index:idx_txs_address;index:idx_txs_comp_address,priority:1" json:"address"`
	AddressFrom      pq.StringArray `gorm:"type:text[]" json:"address_from"`
	AddressTo        pq.StringArray `gorm:"type:text[]" json:"address_to"`
	Amount           string         `json:"amount"`
	IsValid          bool           `json:"is_valid"`
	PayloadMsg       string         `json:"payload_msg"`
	PayloadErr       string         `json:"payload_err"`
}

type TxsResp

type TxsResp struct {
	BlockHeight      int64          `json:"block_height"`
	BlockHash        string         `json:"block_hash"`
	BlockTime        int64          `json:"block_time"`
	TransactionHash  string         `json:"transaction_hash"`
	TransactionIndex int64          `json:"transaction_index"`
	TransactionType  string         `json:"transaction_type"`
	MessageType      string         `json:"message_type"`
	MessageIndex     int64          `json:"message_index"`
	Address          string         `json:"address"`
	AddressFrom      pq.StringArray `json:"address_from"`
	AddressTo        pq.StringArray `json:"address_to"`
	Amount           sdk.Coins      `json:"amount"`
	IsValid          bool           `json:"is_valid"`
	PayloadMsg       string         `json:"payload_msg"`
	PayloadErr       string         `json:"payload_err"`
}

type Validator

type Validator struct {
	Address  string `gorm:"primary_key"`
	Tokens   string
	Power    int64
	Jailed   bool
	Status   string
	IsActive bool

	Detail   string
	Identity string
	Moniker  string
	Website  string

	Period     uint64
	RewardPool string

	ValConsAddr   string
	ValConsPubkey string
}

type WalletAddress

type WalletAddress struct {
	Address       string `gorm:"primary_key"`
	Coins         string
	AccountNumber uint64
	Sequence      uint64
	PubKey        string
	CoinAIOZ      decimal.Decimal `gorm:"type:numeric;index:idx_wallet_address_coin_aioz"`
	CoinStake     decimal.Decimal `gorm:"type:numeric;index:idx_wallet_address_coin_stake"`

	OriginalVesting  string
	DelegatedFree    string
	DelegatedVesting string
	StartTime        int64 `gorm:"index:idx_wallet_address_start_time"`
	EndTime          int64 `gorm:"index:idx_wallet_address_end_time"`
}

Jump to

Keyboard shortcuts

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