domain

package
v0.0.0-...-cdb5461 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrataTypeDelete = "DELETE"
	ErrataTypeInsert = "INSERT"
)
View Source
const (
	EntityTypeAccount  = "ACCOUNT"
	EntityTypeFile     = "FILE"
	EntityTypeSchedule = "SCHEDULE"
	EntityTypeToken    = "TOKEN"
	EntityTypeTopic    = "TOPIC"
)
View Source
const (
	TransactionTypeCryptoCreateAccount int16 = 11
	TransactionTypeCryptoTransfer      int16 = 14
	TransactionTypeTokenCreation       int16 = 29
	TransactionTypeTokenDeletion       int16 = 35
	TransactionTypeTokenUpdate         int16 = 36
	TransactionTypeTokenMint           int16 = 37
	TransactionTypeTokenDissociate     int16 = 41
)

Variables

This section is empty.

Functions

func EncodeEntityId

func EncodeEntityId(shardNum int64, realmNum int64, entityNum int64) (int64, error)

EncodeEntityId - encodes the shard, realm and entity id into a Entity DB Id

Types

type AccountBalance

type AccountBalance struct {
	AccountId          EntityId `gorm:"primaryKey"`
	Balance            int64
	ConsensusTimestamp int64 `gorm:"primaryKey"`
}

func (AccountBalance) TableName

func (AccountBalance) TableName() string

type AddressBook

type AddressBook struct {
	StartConsensusTimestamp int64 `gorm:"primaryKey"`
	EndConsensusTimestamp   *int64
	FileId                  EntityId
	NodeCount               int
	FileData                []byte
}

func (AddressBook) TableName

func (AddressBook) TableName() string

type AddressBookEntry

type AddressBookEntry struct {
	ConsensusTimestamp int64 `gorm:"primaryKey"`
	Memo               string
	PublicKey          string
	NodeId             int64 `gorm:"primaryKey"`
	NodeAccountId      EntityId
	NodeCertHash       []byte
	Description        string
	Stake              int64
}

func (AddressBookEntry) TableName

func (AddressBookEntry) TableName() string

type AddressBookServiceEndpoint

type AddressBookServiceEndpoint struct {
	ConsensusTimestamp int64  `gorm:"primaryKey"`
	IpAddressV4        string `gorm:"primaryKey"`
	NodeId             int64  `gorm:"primaryKey"`
	Port               int32  `gorm:"primaryKey"`
}

func (AddressBookServiceEndpoint) TableName

func (AddressBookServiceEndpoint) TableName() string

type CryptoTransfer

type CryptoTransfer struct {
	Amount             int64
	ConsensusTimestamp int64
	EntityId           EntityId
	Errata             *string
	PayerAccountId     EntityId
}

func (CryptoTransfer) TableName

func (CryptoTransfer) TableName() string

type Entity

type Entity struct {
	Alias                         []byte
	AutoRenewAccountId            *EntityId
	AutoRenewPeriod               *int64
	CreatedTimestamp              *int64
	Deleted                       *bool
	ExpirationTimestamp           *int64
	Id                            EntityId
	Key                           []byte
	MaxAutomaticTokenAssociations *int32
	Memo                          string
	Num                           int64
	PublicKey                     *string
	ProxyAccountId                *EntityId
	Realm                         int64
	ReceiverSigRequired           *bool
	Shard                         int64
	SubmitKey                     []byte
	TimestampRange                pgtype.Int8range
	Type                          string
}

func (Entity) GetModifiedTimestamp

func (e Entity) GetModifiedTimestamp() int64

func (Entity) HistoryTableName

func (Entity) HistoryTableName() string

func (Entity) TableName

func (Entity) TableName() string

type EntityId

type EntityId struct {
	ShardNum  int64
	RealmNum  int64
	EntityNum int64
	EncodedId int64
}

EntityId returns the decoded data from the DB ID

func DecodeEntityId

func DecodeEntityId(encodedID int64) (EntityId, error)

DecodeEntityId - decodes the Entity DB id into EntityId struct

func EntityIdFromString

func EntityIdFromString(entityId string) (EntityId, error)

func EntityIdOf

func EntityIdOf(shard, realm, num int64) (EntityId, error)

func MustDecodeEntityId

func MustDecodeEntityId(encodedId int64) EntityId

func (*EntityId) IsZero

func (e *EntityId) IsZero() bool

func (EntityId) MarshalJSON

func (e EntityId) MarshalJSON() ([]byte, error)

func (*EntityId) Scan

func (e *EntityId) Scan(value interface{}) error

func (*EntityId) String

func (e *EntityId) String() string

func (*EntityId) UnmarshalJSON

func (e *EntityId) UnmarshalJSON(data []byte) error

func (EntityId) Value

func (e EntityId) Value() (driver.Value, error)

type ItemizedTransfer

type ItemizedTransfer struct {
	Amount     int64    `json:"amount"`
	EntityId   EntityId `json:"entity_id"`
	IsApproval bool     `json:"is_approval"`
}

type ItemizedTransferSlice

type ItemizedTransferSlice []ItemizedTransfer

func (*ItemizedTransferSlice) Scan

func (i *ItemizedTransferSlice) Scan(value interface{}) error

func (ItemizedTransferSlice) Value

func (i ItemizedTransferSlice) Value() (driver.Value, error)

type RecordFile

type RecordFile struct {
	ConsensusStart   int64
	ConsensusEnd     int64 `gorm:"primaryKey"`
	Count            int64
	DigestAlgorithm  int
	FileHash         string
	HapiVersionMajor int
	HapiVersionMinor int
	HapiVersionPatch int
	Hash             string
	Index            int64
	LoadEnd          int64
	LoadStart        int64
	Name             string
	NodeId           int64
	PrevHash         string
	Version          int
}

func (RecordFile) TableName

func (RecordFile) TableName() string

TableName returns record file table name

type StakingRewardTransfer

type StakingRewardTransfer struct {
	AccountId          EntityId `json:"account_id"`
	Amount             int64
	ConsensusTimestamp int64    `json:"consensus_timestamp"`
	PayerAccountId     EntityId `json:"payer_account_id"`
}

func (StakingRewardTransfer) TableName

func (StakingRewardTransfer) TableName() string

type Transaction

type Transaction struct {
	ConsensusTimestamp       int64 `gorm:"primaryKey"`
	ChargedTxFee             int64
	EntityId                 *EntityId
	Errata                   *string
	InitialBalance           int64
	ItemizedTransfer         ItemizedTransferSlice `gorm:"type:jsonb"`
	MaxFee                   int64
	Memo                     []byte
	NodeAccountId            *EntityId
	Nonce                    int32
	ParentConsensusTimestamp int64
	PayerAccountId           EntityId
	Result                   int16
	Scheduled                bool
	TransactionBytes         []byte
	TransactionHash          []byte
	Type                     int16
	ValidDurationSeconds     int64
	ValidStartNs             int64
}

func (Transaction) TableName

func (Transaction) TableName() string

Jump to

Keyboard shortcuts

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