Documentation ¶
Index ¶
- Constants
- Variables
- func AccountDetailTableExist() bool
- func AirdropTableExist() bool
- func AssignTableExist() bool
- func BridgeTableExist() bool
- func CandidateTableExist() bool
- func CheckSql(query string) bool
- func CompareHash(data []byte, urlHash string) bool
- func CreateIndexMain() error
- func DataChartHistoryServer()
- func DataChartRealtimeSever()
- func DbconnbatchupdateSqlite(objarr *[]TransactionStatus) error
- func DbconndealReduplictionTransactionstatus(objArr *[]TransactionStatus) (*[]TransactionStatus, *[]TransactionStatus)
- func DealRedisBlockTpsList() error
- func Deal_LogTransactionBlockTxDetial(objArr *[]LogTransaction) (*[]BlockTxDetailedInfo, error)
- func Deal_Redupliction_LogTransaction(objArr *[]LogTransaction) *[]LogTransaction
- func Deal_Redupliction_Transactionstatus(objArr *[]TransactionStatus) (*[]TransactionStatus, *[]TransactionStatus)
- func FilteredSQLInject(to_match_str string) bool
- func FindNodeLocatedSave(list []NodeValue) (err error)
- func FormatIndexMethod(method int) string
- func GeoIpClose()
- func GeoIpDatabaseInit() error
- func Get15DayBlockDiffChartDataToRedis()
- func GetALL(tableName string, order string, v any) error
- func GetALLNodeTransactionList() error
- func GetActiveEcoLibs() (string, error)
- func GetActiveEcoLibsFromRedis() (string, error)
- func GetActiveEcoLibsToRedis()
- func GetAirdropLockAllTotal()
- func GetAllEcosystemInfo()
- func GetAllKeysTotalAmount(ecosystem int64) error
- func GetAmount(dayTime int64, list []DaysAmount) decimal.Decimal
- func GetAppValue(appId int64, name string, ecosystem int64) (string, error)
- func GetAssignTotalBalanceAmount()
- func GetBlockData(startId int64, endId int64, order string) (*[]Block, error)
- func GetBlockInfoToRedis(limit int) error
- func GetBlockTpsListsFromRedis() (*[]ScanOutBlockTransactionRet, error)
- func GetBlocksContractNameList(bk *Block) (map[string]string, error)
- func GetBlocksTransactionListByBlockInfo(mc *Block) (*[]TxDetailedInfoResponse, error)
- func GetCirculations(ecosystem int64) (string, error)
- func GetContractCodeByName(contractName string) string
- func GetDB(db *DbTransaction) *gorm.DB
- func GetDBDayTraninfo(day int) (*[]DBTransactionsInfo, error)
- func GetDBDealTraninfo(limit int) error
- func GetDashboardChartDataToRedis()
- func GetDataChart(date any, err error) string
- func GetDateDiffFromNow(layout string, findTime string, offset int) int64
- func GetDayNumberFormat(days int64) (string, string)
- func GetDayblockinfoFromRedis(t1, t2 int64, transBlock []Block) (int32, error)
- func GetDaysAmount(dayTime int64, list []DaysAmount) string
- func GetDaysAmountEqual(findTime int64, list []DaysAmount, layout string, areEqual bool) decimal.Decimal
- func GetDaysNumber(getTime int64, list []DaysNumber) int64
- func GetDaysNumberLike(getTime int64, list []DaysNumber, getTimeFront bool, order string) int64
- func GetEcoLibsChartDataToRedis()
- func GetEcoLibsTxChartDataToRedis()
- func GetEcosystemLogoHash(ecosystem int64) (string, string)
- func GetFileHash(id int64) (string, error)
- func GetFileNameByHash(hash string) (string, int64, error)
- func GetFirstDateOfMonth(z int, d time.Time) time.Time
- func GetFuelRate() (rlt map[int64]decimal.Decimal)
- func GetHistoryEcosystemChartInfo()
- func GetHonorListToRedis(cmd string)
- func GetHonorNodeInfo() []storage.HonorNodeModel
- func GetHonorNodeMapToRedis()
- func GetLastDateOfMonthToInt64(z int, t int64) int64
- func GetMaxBlockSizeToRedis()
- func GetMaxTxToRedis()
- func GetMineIncomeParam(hash []byte) string
- func GetMineParam(ecosystem int64, name string, param map[string]any, TxHash []byte) (string, string)
- func GetMintNodeTotalBalance()
- func GetNftMinerMap() (*[]Positioning, error)
- func GetNftMinerTotalBalance()
- func GetNftMinerTotalSupply()
- func GetNodeBlockReplyRate(bk *Block) (string, error)
- func GetNodeListInfo(list []NodeValue, consensusMode int32) (err error)
- func GetNodeTransactionList(limit, page int) (*[]TransactionList, int64, error)
- func GetNowTimeUnix() int64
- func GetQueueTransactionsCount(reqUrl string) (int64, error)
- func GetRdDb() *redis.Client
- func GetRedis(name string) (any, error)
- func GetRedisByName(name string) (any, error)
- func GetScanOutDataToRedis() error
- func GetScanOutKeyInfoToRedis()
- func GetSingleDayMaxTxToRedis()
- func GetStatisticsSignal()
- func GetTransactionBlockFromRedis() (*[]BlockTxDetailedInfoHex, int64, error)
- func GetTransactionBlockToRedis() error
- func GetTransactionsStatus(reqUrl string, t1 int64, page, limit int) (*[]TransactionStatus, error)
- func GetTxInfoFromRedis(limit int) (*[]ScanOutBlockTransactionRet, error)
- func GetUtxoTxContractNameByHash(hash []byte) string
- func GetWeekAverageValueTxToRedis()
- func GetZeroTime(d time.Time) time.Time
- func Get_Group_TransactionBlock(ids int, icount int, order string, reqType int) (*[]BlockTxDetailedInfoHex, int64, error)
- func GormClose() error
- func GzipDecode(in []byte) ([]byte, error)
- func GzipEncode(in []byte) ([]byte, error)
- func HasTable(p any) bool
- func HasTableOrView(names string) bool
- func INameTableExist() bool
- func InitBuildInfo()
- func InitCountryLocator() error
- func InitDBTrigger() (err error)
- func InitDailyActiveReport() error
- func InitDashboardTx() error
- func InitDatabase() error
- func InitEcosystemInfo()
- func InitFristBlockTime() error
- func InitGlobalSwitch()
- func InitHonorNodeByRedis(cmd string)
- func InitPledgeAmount()
- func InitRedisDb() error
- func InitRedisDbAll() error
- func InitSpentInfoHistory() error
- func InitTransactionData() error
- func InitTransactionRelation() error
- func InsertDailyActiveReport()
- func InsertDailyNodeReport()
- func InsertHonorNodeInfo()
- func InsertRedis(name string, data string)
- func IsBridgeEcosystem(ecosystem int64) bool
- func IsExist(f string) bool
- func IsUtxoTransaction(txData []byte, block int64) (bool, error)
- func LoadFile(id int64) (string, error)
- func MsToSeconds(millisecond int64) int64
- func MsgpackMarshal(v any) ([]byte, error)
- func MsgpackUnmarshal(bt []byte, v any) error
- func NanoToMs(nano int64) int64
- func NanoToSeconds(nano int64) int64
- func NftMinerTableIsExist() bool
- func ParseIndexMethod(method string) int
- func PointValid(latitude, longitude float64) bool
- func RdExist(key string) (bool, error)
- func RdExists(keys ...string) (bool, error)
- func RdRange(key string, start, end int64) (string, error)
- func RefreshChartDaemons(key string, ecosystem int64)
- func Savefile(file string, buf []byte) error
- func SendAllWebsocketData()
- func SendBlockList(data *[]BlockListResponse) error
- func SendBlockListToWebsocket(ret1 *[]BlockListResponse) error
- func SendDashboardDataToWebsocket(data any, cmd string) error
- func SendRefreshRequest(key string, ecosystem int64)
- func SendTopTransactiontps(topBlockTps *[]ScanOutBlockTransactionRet) error
- func SendTpsListToWebsocket(ret *[]ScanOutBlockTransactionRet) error
- func SendTransactionList(txList *[]BlockTxDetailedInfoHex) error
- func SendTransactionListToWebsocket(ret *[]BlockTxDetailedInfoHex) error
- func SendTxDataSyncSignal()
- func SendTxRelationSignal()
- func SendUtxoTxSyncSignal()
- func StUpdate_Sqlite(objarr *[]TransactionStatus) error
- func StrReplaceAllString(s2 string) (strReplace StrReplaceStruct, indexList []StrReplaceStruct)
- func SyncBlockListToRedis()
- func SyncEcosystemInfo()
- func SyncNationalFlagIcon()
- func ToCapacityKb(count int64) string
- func ToCapacityMb(count int64) string
- func ToCapacityString(count int64) string
- func TxDataSyncSignalReceive()
- func TxRelationCheck(lastBlockId int64)
- func UnmarshallBlockTxData(blockBuffer *bytes.Buffer, blockId int64) (map[string]TransactionData, error)
- func UnmarshallTransaction(blockBuffer *bytes.Buffer) (*transaction.Transaction, error)
- func UpdateAccountDetail()
- func UpdateHonorNodeInfo()
- func Version() string
- func VotingTableExist() bool
- func WhereBuild(where map[string]any) (whereSQL string, vals []any, err error)
- func WriteChannelByte(channel string, data []byte) error
- type AccountAmountChangeBarChart
- type AccountAmountChangePieChart
- type AccountChangeChartResponse
- type AccountDetail
- type AccountHistoryChart
- type AccountNftMinerList
- type AccountNftMinerListResult
- type AccountTotalAmountChart
- type AccountTxChart
- type AccountTxInfoResponse
- type AccountTxListResponse
- type ActiveReportInfo
- type AirdropInfo
- type AppInfo
- type AppParam
- type AppParams
- type Applications
- type AssignInfo
- type AssignRules
- type BasisEcosystemChartDataResponse
- type BasisEcosystemResponse
- type Binary
- func (b *Binary) FindAppNameByEcosystem(page, limit int, order string, ecosystem int64, where map[string]any) (GeneralResponse, error)
- func (b *Binary) GetByHash(hash string) (bool, error)
- func (b *Binary) GetByID(id int64) (bool, error)
- func (b *Binary) GetByIdHash(id int64) (bool, error)
- func (b *Binary) GetByJpeg() string
- func (b *Binary) GetByPng(d *Binary) (bool, error)
- func (b *Binary) SetTableName(tableName string)
- func (b *Binary) SetTablePrefix(prefix string)
- func (b *Binary) TableName() string
- type Block
- func (b *Block) GetBlockTotal() (int64, error)
- func (b *Block) GetBlocksByHash(hash []byte) (bool, error)
- func (b *Block) GetBlocksFrom(page, limit int, ordering string) ([]Block, error)
- func (b *Block) GetBlocksHash(hash []byte) (bool, error)
- func (b *Block) GetBlocksKey(key int64, order string) ([]Block, error)
- func (b *Block) GetByTimeBlockId(dbTx *DbTransaction, time int64) (bool, error)
- func (b *Block) GetId(blockID int64) (bool, error)
- func (bk *Block) GetLatestNodes(limit int) ([]Block, error)
- func (b *Block) GetMaxBlock() (bool, error)
- func (b *Block) GetNodeBlocksAtTime(from, to time.Time, node int64) ([]Block, error)
- func (b *Block) GetRedisByhash(hash []byte) (bool, error)
- func (b *Block) GetRedisByid(id int64) (bool, error)
- func (b *Block) GetReverseBlockchain(endBlockID int64, limit int) ([]Block, error)
- func (b *Block) GetSystemTime() (int64, error)
- func (b *Block) InsertRedis() error
- func (b *Block) Marshal() ([]byte, error)
- func (Block) TableName() string
- func (b *Block) Unmarshal(bt []byte) error
- type BlockCCPriceInfo
- type BlockCCRatesInfo
- type BlockDetailedInfo
- type BlockDetailedInfoHex
- func DealTransactionBlockTxDetial(mc *Block) (int64, *BlockDetailedInfoHex, *[]BlockTxDetailedInfoHex, error)
- func GetBlocksDetailedInfoHex(bk *Block) (*BlockDetailedInfoHex, error)
- func GetBlocksDetailedInfoHexByScanOut(mc *Block) (*BlockDetailedInfoHex, error)
- func GetBlocksTransactionInfoByBlockInfo(mc *Block) (*BlockDetailedInfoHex, error)
- func GetTransactionTxDetial(mc *Block) (int64, *BlockDetailedInfoHex, error)
- type BlockDetailedInfoHexRespone
- type BlockHeaderInfo
- type BlockHeaderInfoDetailed
- type BlockHeaderInfoHex
- type BlockID
- type BlockListChart
- type BlockListHeaderResponse
- type BlockListResponse
- type BlockRet
- type BlockSizeListResponse
- type BlockTps
- type BlockTxDetailedInfo
- type BlockTxDetailedInfoHex
- func (bt *BlockTxDetailedInfoHex) GetByBlockIdBlockTransactionsLastDB(id int64, page int, limit int, order string) (int64, *[]BlockTxDetailedInfoHex, error)
- func (bt *BlockTxDetailedInfoHex) GetByHashDb(hash string) (bool, error)
- func (bt *BlockTxDetailedInfoHex) GetByKeyIdBlockTransactionsLastDb(id string, page int, size int, order string) (int64, *[]BlockTxDetailedInfoHex, error)
- func (bt *BlockTxDetailedInfoHex) GetCommonTransactionSearch(page, limit int, search, order string, reqType int) (*HashTransactionResult, error)
- func (bt *BlockTxDetailedInfoHex) GetDbTxDetailedHash(hash string) (bool, error)
- func (bt *BlockTxDetailedInfoHex) GetDbTxDetailedId(id int64) ([]BlockTxDetailedInfoHex, error)
- func (bt *BlockTxDetailedInfoHex) GetDb_txdetailedKey(key string, order string, limit, page int) ([]BlockTxDetailedInfoHex, int64, error)
- func (bt *BlockTxDetailedInfoHex) Get_BlockTransactions_Sqlite(page int, size int, order string) (*[]BlockTxDetailedInfoHex, int, error)
- func (s *BlockTxDetailedInfoHex) Marshal() ([]byte, error)
- func (s *BlockTxDetailedInfoHex) Unmarshal(bt []byte) error
- type BlocksResult
- type BridgeSettings
- type BridgeToken
- type CandidateHonorNodeRet
- type CandidateNodeDecisions
- type CandidateNodeRequests
- func (p *CandidateNodeRequests) GetAll() ([]CandidateNodeRequests, error)
- func (p *CandidateNodeRequests) GetById(id int64) (bool, error)
- func (p *CandidateNodeRequests) GetNodeMap() (*NodeMapResponse, error)
- func (p *CandidateNodeRequests) GetPubKeyById(id int64) (bool, error)
- func (p *CandidateNodeRequests) TableName() string
- type CastNodeRet
- type Circulations
- type CirculationsChangeResponse
- type CirculationsChartResponse
- type CirculationsRet
- type Combustion
- type CombustionDetail
- type CommonResult
- type Contract
- type ContractTxDetail
- type ContractsParams
- type CountInt64
- type CountResponse
- type CountriesGeoJson
- type CountryFeature
- type CountryInfo
- type DBTransactionsInfo
- type DailyActiveChartResponse
- type DailyActiveReport
- func (p *DailyActiveReport) CreateTable() (err error)
- func (dt *DailyActiveReport) GetFirst() (bool, error)
- func (dt *DailyActiveReport) GetLast() (bool, error)
- func (dt *DailyActiveReport) GetList() ([]DailyActiveReport, error)
- func (dt *DailyActiveReport) GetTimeLine(stTime, edTime int64) ([]DailyActiveReport, error)
- func (dt *DailyActiveReport) Insert() error
- func (dt *DailyActiveReport) InsertList(list []DailyActiveReport) error
- func (dt *DailyActiveReport) TableName() string
- type DailyNodeReport
- type DaoVoteChartResponse
- type DaoVoteDetailResponse
- type DashboardChainInfo
- type DashboardChartData
- type DaysActiveReport
- type DaysAmount
- type DaysAmountResponse
- type DaysNumber
- type DaysNumberResponse
- type DbTransaction
- type DetailItem
- type EcoCirculationsChangeResponse
- type EcoCirculationsResponse
- type EcoGasFeeChangeResponse
- type EcoGasFeeResponse
- type EcoLibsRet
- type EcoListChart
- type EcoTopTenHasTokenResponse
- type EcoTopTenTxAmountResponse
- type EcoTxAmountDiffResponse
- type EcoTxGasFeeDiffResponse
- type EcoTxListResponse
- type EcosyKeyHex
- type EcosyKeyList
- type EcosyKeyTotalDetail
- type EcosyKeyTotalHex
- type Ecosystem
- func (sys *Ecosystem) Get(id int64) (bool, error)
- func (p *Ecosystem) GetBasisEcosystem() (*BasisEcosystemResponse, error)
- func (p *Ecosystem) GetBasisEcosystemChart() (*BasisEcosystemChartDataResponse, error)
- func (p *Ecosystem) GetEcoSystemList(limit, page int, order string, where map[string]any) (int64, *[]EcosystemTotalResponse, error)
- func (sys *Ecosystem) GetTokenSymbol(id int64) (bool, error)
- func (sys *Ecosystem) TableName() string
- type EcosystemAppInfo
- type EcosystemAppList
- type EcosystemAttachmentResponse
- type EcosystemDetailInfoResponse
- type EcosystemInfoMap
- func (p *EcosystemInfoMap) Get(ecosystem int64) string
- func (p *EcosystemInfoMap) GetFloat64(ecosystem int64, defaultValue float64) float64
- func (p *EcosystemInfoMap) GetId(infoId int, defaultValue string) string
- func (p *EcosystemInfoMap) GetInt64(ecosystem int64, defaultValue int64) int64
- func (p *EcosystemInfoMap) Len() int
- type EcosystemKeysRatioResponse
- type EcosystemList
- type EcosystemListResponse
- type EcosystemMemberList
- type EcosystemParameterResult
- type EcosystemSearchResponse
- type EcosystemTokenSymbolList
- type EcosystemTotalResponse
- type EcosystemTotalResult
- type EcosystemTxCount
- type EcosystemTxList
- type EcosystemTxRatioChart
- type EcosystemTxRatioResponse
- type ExportAppInfo
- type FeeDetail
- type FeeInfo
- type FeeModeFlag
- type FeeModeInfo
- type FeesInfo
- type FlagsInfo
- type FuelRateInfo
- type FuelRateResponse
- type FullNodeCityJSON
- type FullNodeCityJSONHex
- type GasFee
- type GasFeeChangeResponse
- type GeneralResponse
- func EcosystemSearch(search string, account string, page, limit int) (rets GeneralResponse, err error)
- func Get15DayBlockSizeList(page, limit int) (GeneralResponse, error)
- func Get15DayTxList(page, limit int) (GeneralResponse, error)
- func GetContractTxDetailList(hashStr string, page, limit int) (*GeneralResponse, error)
- func GetDailyActiveReport(page, limit int, startTime, endTime int64) (GeneralResponse, error)
- func GetDaoVoteList(search any, page, limit int) (GeneralResponse, error)
- func GetEcosystemApp(page, limit int, ecosystemId, appId int64, order, search string) (*GeneralResponse, error)
- func GetEcosystemDatabase(page, limit, reqType int, ecosystemId int64, search, order string) (*GeneralResponse, error)
- func GetEcosystemDetailMemberList(page, limit int, order string, ecosystem int64) (*GeneralResponse, error)
- func GetHonorListFromRedis(cmd string) (*GeneralResponse, error)
- func GetNewEcosystemChartList(page, limit int, order string) (GeneralResponse, error)
- func GetNftMinerRegionList(page, limit int) (*GeneralResponse, error)
- func GetNodeBlockList(search any, page, limit int, order string) (GeneralResponse, error)
- func GetNodeStakingHistory(search any, page, limit int, order string) (*GeneralResponse, error)
- func GetNodeVotingHistory(search any, page, limit int, order string) (*GeneralResponse, error)
- func GetUtxoInputs(hashStr string, page, limit int) (*GeneralResponse, error)
- func NodeListSearch(page, limit int, order string) (*GeneralResponse, error)
- type Geometry
- type GovernModelRatioResponse
- type HashParams
- func (rp *HashParams) HArraySet() error
- func (rp *HashParams) HDel(keys ...string) error
- func (rp *HashParams) HExists(key string) (bool, error)
- func (rp *HashParams) HGet(key string) error
- func (rp *HashParams) HGetAll() error
- func (rp *HashParams) HLen() (int64, error)
- func (rp *HashParams) HMapSet() error
- func (rp *HashParams) HSet(values ...any) error
- func (rp *HashParams) HSetMapValue(key string, value any)
- type HashTransactionResult
- type History
- func (th *History) Get(txHash []byte) (*HistoryMergeHex, error)
- func (th *History) Get24HourTxAmount() (string, error)
- func (th *History) GetAccountHistoryTotals(id int64, keyId int64) (*WalletHistoryHex, error)
- func (th *History) GetBlockRewardById(blockId int64) (*BlockListResponse, error)
- func (th *History) GetByHash(txHash []byte) (bool, error)
- func (th *History) GetByHashExist(txHash []byte) (bool, error)
- func (th *History) GetEcosystem(ecosystem int64) (bool, error)
- func (th *History) GetEcosytemWallets(id int64, page int, size int, wallet string, searchType string) (*[]HistoryHex, int64, decimal.Decimal, error)
- func (th *History) GetExplorer(txHash []byte) (*HistoryExplorer, error)
- func (th *History) GetGasFeeByTxHashList(txHash [][]byte) (*BlockListResponse, error)
- func (th *History) GetHashSum(txHash []byte, ecosystem int64, blockId int64) string
- func (th *History) GetHistory(page int, size int, order string) (*[]HistoryHex, int64, error)
- func (th *History) GetHistoryIdList(id int64) (*[]History, error)
- func (th *History) GetHistoryTimeList(time time.Time) (*[]History, error)
- func (th *History) GetHistorys_Sqlite(page int, size int, order string) (*[]HistoryHex, int64, error)
- func (th *History) GetTodayCirculationsAmount() (string, error)
- func (th *History) GetTxListExplorer(txHash []byte) (decimal.Decimal, decimal.Decimal, error)
- func (th *History) GetWalletTimeLineHistoryTotals(ecosystem int64, keyId int64, getDay int) (*AccountHistoryChart, error)
- func (th *History) GetWalletTotals_Sqlites(wallet string) (*WalletHistoryHex, error)
- func (th *History) GetWallets(page int, size int, wallet string, searchType string) (*[]HistoryHex, int64, decimal.Decimal, error)
- func (th *History) GetWallets_EcosytemSqlite(id int64, page int, size int, wallet string, searchType string) (*[]HistoryHex, int64, decimal.Decimal, error)
- func (th *History) GetWallets_Sqlite(page int, size int, wallet string, searchType string) (*[]HistoryHex, int64, decimal.Decimal, error)
- func (th *History) Get_Sqlite(txHash []byte) (*HistoryMergeHex, error)
- func (th *History) TableName() string
- type HistoryExplorer
- type HistoryHex
- type HistoryItem
- type HistoryMergeHex
- type HistoryTransaction
- type Historys
- type HonorNodeChart
- type HonorNodeInfo
- type HonorNodeListResponse
- type HonorNodeMapResponse
- type IName
- type InfoBlock
- type Key
- func (m *Key) Get(id int64, wallet string) (*EcosyKeyHex, error)
- func (m *Key) GetAccountList(page, limit int, ecosystem int64) (*KeysListResult, error)
- func (k *Key) GetEcosystemTokenSymbolList(page, limit int, ecosystem int64) (*GeneralResponse, error)
- func (m *Key) GetKeyDetail(keyId int64, wallet string) (*EcosyKeyTotalHex, error)
- func (ts *Key) GetKeys(id int64, page int, size int, order string) (*[]KeyHex, int64, error)
- func (m *Key) GetStakeAmount() (string, error)
- func (m *Key) GetWalletTotalBasisEcosystem(wallet string) (*EcosyKeyTotalHex, error)
- func (m *Key) GetWalletTotalEcosystem(page, limit int, order string, wallet string) (*GeneralResponse, error)
- func (m *Key) SetTablePrefix(prefix int64) *Key
- func (m Key) TableName() string
- type KeyChangeChart
- type KeyHex
- type KeyInfoChart
- type KeyLocks
- type KeysListChartResult
- type KeysListResult
- type KeysResult
- type KeysRet
- type Language
- type LanguagesParams
- type LeaderboardSlice
- type LogTransaction
- func (lt *LogTransaction) GetBlockFirst(block int64) (bool, error)
- func (lt *LogTransaction) GetBlockIdByHash(hash []byte) (bool, error)
- func (lt *LogTransaction) GetBlockTransactions(page int, limit int, order string, reqType int) (*[]BlockTxDetailedInfoHex, int64, error)
- func (lt *LogTransaction) GetByHash(hash []byte) (bool, error)
- func (lt *LogTransaction) GetContract(hash []byte) (bool, error)
- func (lt *LogTransaction) GetEcosystemAccountTransaction(ecosystem int64, page int, size int, wallet string, where map[string]any) (*GeneralResponse, error)
- func (lt *LogTransaction) GetEcosystemTransactionFind(ecosystem int64, page, limit int, order, search string, where map[string]any) (*[]EcoTxListResponse, int64, error)
- func (lt *LogTransaction) GetLast() (bool, error)
- func (lt *LogTransaction) GetStatus(hash []byte) (bool, error)
- func (lt *LogTransaction) GetTxTime(hash []byte) (bool, error)
- func (m LogTransaction) TableName() string
- func (lt *LogTransaction) UnmarshalTransaction(txData []byte) (*TxDetailedInfoHex, error)
- type MaxInt64
- type Member
- type MenuParams
- type MinInt64
- type MineGpsInfo
- type MineHistoryRequest
- type MineIncomehistory
- func (ts *MineIncomehistory) Get(hash []byte) (bool, error)
- func (m *MineIncomehistory) GetID(id int64) (bool, error)
- func (b *MineIncomehistory) GetRedisByhash(hash []byte) (bool, error)
- func (b *MineIncomehistory) GetRedisbyid(id int64) (bool, error)
- func (b *MineIncomehistory) Insert_redis() error
- func (b *MineIncomehistory) Marshal() ([]byte, error)
- func (m MineIncomehistory) TableName() string
- func (b *MineIncomehistory) Unmarshal(bt []byte) error
- type MineInfo
- type MinePledgeStatus
- type MultiFeeEcosystemRatioResponse
- type NewKeyHistoryChart
- type NewNftChangeChartResponse
- type NftMinerCoordinate
- type NftMinerEnergyPowerChangeResponse
- type NftMinerEvents
- type NftMinerFindRequest
- type NftMinerHistoryInfoResponse
- type NftMinerInfoChart
- type NftMinerInfoRequest
- type NftMinerInfoResponse
- type NftMinerIntervalResponse
- type NftMinerItems
- func (p *NftMinerItems) GetAccountDetailNftMinerInfo(keyid, order string, page, limit int) (*AccountNftMinerListResult, error)
- func (p *NftMinerItems) GetAllPower() (int64, error)
- func (p *NftMinerItems) GetById(id int64) (bool, error)
- func (p *NftMinerItems) GetByTokenHash(tokenHash string) (bool, error)
- func (p *NftMinerItems) GetNftMetaverse() (*NftMinerMetaverseInfoResponse, error)
- func (p *NftMinerItems) GetNftMinerBySearch(search string) (NftMinerInfoResponse, error)
- func (p *NftMinerItems) GetNftMinerTxInfo(search any, page, limit int, order string) (*GeneralResponse, error)
- func (p *NftMinerItems) NftMinerMetaverseList(page, limit int, order string) (GeneralResponse, error)
- func (p *NftMinerItems) ParseSvgParams() (string, error)
- func (p *NftMinerItems) TableName() string
- type NftMinerListResponse
- type NftMinerMetaverseInfoResponse
- type NftMinerOverviewResponse
- type NftMinerRegionListResponse
- type NftMinerRet
- type NftMinerStakeInfoResponse
- type NftMinerStaking
- func (p *NftMinerStaking) GetAllStakeAmount() (int64, decimal.Decimal, error)
- func (p *NftMinerStaking) GetAllStakeAmountByStaker(keyid string) (int64, string, error)
- func (p *NftMinerStaking) GetById(id int64) (bool, error)
- func (p *NftMinerStaking) GetByTokenId(tokenId int64) (bool, error)
- func (p *NftMinerStaking) GetNftMinerStakeInfo(search any, page, limit int, order string) (*GeneralResponse, error)
- func (p *NftMinerStaking) GetNftStakeByTokenId(tokenId int64) (bool, error)
- func (p *NftMinerStaking) TableName() string
- type NftMinerStakingChangeResponse
- type NftMinerSummaryResponse
- type NftMinerTxInfoResponse
- type NodeBlockListResponse
- type NodeChangeResponse
- type NodeContributionChartResponse
- type NodeContributionListResponse
- type NodeDetailResponse
- type NodeInfo
- type NodeListResponse
- type NodeMapResponse
- type NodePositionInfo
- type NodeStakingChangeResponse
- type NodeStakingHistoryResponse
- type NodeValue
- type NodeVoteChangeResponse
- type NodeVoteHistoryResponse
- type NodeVoteResponse
- type NullType
- type OptionalInfo
- type PageParams
- type PlatformParameter
- func (sp *PlatformParameter) FindAppParameters(page int, size int, name, order string) (num int64, rets []PlatformParameter, err error)
- func (sp *PlatformParameter) Get(name string) (bool, error)
- func (sp *PlatformParameter) GetJSONField(jsonField string, name string) (string, error)
- func (sp *PlatformParameter) GetValueParameterByName(name, value string) (*string, error)
- func (sp PlatformParameter) TableName() string
- func (sp *PlatformParameter) ToMap() map[string]string
- type Point
- func (p *Point) BearingTo(p2 *Point) float64
- func (p *Point) GreatCircleDistance(p2 *Point) float64
- func (p *Point) Latitude() float64
- func (p *Point) Longitude() float64
- func (p *Point) MarshalBinary() ([]byte, error)
- func (p *Point) MarshalJSON() ([]byte, error)
- func (p *Point) MidpointTo(p2 *Point) *Point
- func (p *Point) PointAtDistanceAndBearing(dist float64, bearing float64) *Point
- func (p *Point) UnmarshalBinary(data []byte) error
- func (p *Point) UnmarshalJSON(data []byte) error
- type Polygon
- type Positioning
- type ProgressInfo
- type RatesInfo
- type RedisParams
- func (rp *RedisParams) Del() error
- func (rp *RedisParams) Exist() (bool, error)
- func (rp *RedisParams) Get() error
- func (rp *RedisParams) Set() error
- func (rp *RedisParams) SetExpire(expire time.Duration) error
- func (rp *RedisParams) Size() (int64, error)
- func (rp *RedisParams) TTL() (time.Duration, error)
- type RefreshObject
- type RegionChangeResponse
- type ResponseDashboardTitle
- type ResponseTopDataBoby
- type ResultsInfo
- type ScanOut
- type ScanOutBlockTransactionRet
- type ScanOutRet
- type SearchHashResponse
- type SnippetsParams
- type SpentInfo
- func (si *SpentInfo) GetAmountByKeyId(keyId int64, ecosystem int64) (decimal.Decimal, error)
- func (si *SpentInfo) GetExplorer(txHash []byte) (*UtxoExplorer, error)
- func (si *SpentInfo) GetFirst(blockId int64) (bool, error)
- func (si *SpentInfo) GetInputs(txHash []byte, page, limit int) (rlts []utxoDetail, total int64, err error)
- func (si *SpentInfo) GetLast() (bool, error)
- func (p *SpentInfo) GetOutputKeysByBlockId(blockId int64) (outputKeys []SpentInfo, err error)
- func (si *SpentInfo) GetOutputs(txHash []byte) (rlts []utxoDetail, list []SpentInfo, err error)
- func (si *SpentInfo) TableName() string
- func (si *SpentInfo) UnmarshalTransaction(txData []byte) (*UtxoExplorerInfo, error)
- type SpentInfoHistory
- func (p *SpentInfoHistory) CreateTable() (err error)
- func (p *SpentInfoHistory) GetKeyBalance(keyId int64, ecosystem int64) (balance decimal.Decimal, err error)
- func (p *SpentInfoHistory) GetLast() (bool, error)
- func (p *SpentInfoHistory) RollbackOne() error
- func (p *SpentInfoHistory) RollbackTransaction() error
- func (p *SpentInfoHistory) TableName() string
- type StakingAccountResponse
- type StateParameter
- func (sp *StateParameter) FindStateParameters(page int, size int, name, order string, ecosystem int64) (num int64, rets []StateParameter, err error)
- func (sp *StateParameter) Get(name string) (bool, error)
- func (sp *StateParameter) GetMintAmount() (string, error)
- func (sp *StateParameter) SetTableFix(fix int64)
- func (sp *StateParameter) SetTablePrefix(prefix string)
- func (sp *StateParameter) TableName() string
- type StatisticsData
- type StorageCapacitysChart
- type StrReplaceStruct
- type SubjectInfo
- type SumAmount
- type SumInt64
- type SvgParams
- type SystemParameterResult
- type TableModel
- type TableParams
- type TableShowModel
- type TokenEcosystemResponse
- type TotalResult
- type Transaction
- type TransactionData
- func (p *TransactionData) CreateTable() (err error)
- func (p *TransactionData) GetByHash(hash []byte) (bool, error)
- func (p *TransactionData) GetFirstByType(blockId int64, txType int) (bool, error)
- func (p *TransactionData) GetLast() (bool, error)
- func (p *TransactionData) GetLastByType(txType int) (bool, error)
- func (p *TransactionData) GetTxDataByHash(hash []byte) (bool, error)
- func (p *TransactionData) RollbackOne() error
- func (p *TransactionData) RollbackTransaction() error
- func (p *TransactionData) TableName() string
- type TransactionHistoryHex
- type TransactionList
- type TransactionListResponse
- type TransactionRelation
- func (p *TransactionRelation) CreateIndex() error
- func (p *TransactionRelation) CreateTable() (err error)
- func (p *TransactionRelation) GetLast() (bool, error)
- func (p *TransactionRelation) RollbackOne() error
- func (p *TransactionRelation) RollbackTransaction() error
- func (p *TransactionRelation) TableName() string
- type TransactionStatus
- func (ts *TransactionStatus) BatchInsert_Sqlites(objArr *[]TransactionStatus) error
- func (ts *TransactionStatus) BatchUpdate_Sqlite(reportForms *[]TransactionStatus) error
- func (ts *TransactionStatus) BatchinsertSqlite(objArr *[]TransactionStatus) error
- func (ts *TransactionStatus) Create() error
- func (ts *TransactionStatus) Create_Sqlite() error
- func (ts *TransactionStatus) DBconnGetcount_Sqlite() (int64, error)
- func (ts *TransactionStatus) DbconnbatchinsertSqlites(objArr *[]TransactionStatus) error
- func (ts *TransactionStatus) DbconngetSqlite(transactionHash []byte) (bool, error)
- func (ts *TransactionStatus) Get(transactionHash []byte) (bool, error)
- func (ts *TransactionStatus) GetNodecount(db *gorm.DB) (int64, error)
- func (ts *TransactionStatus) GetTimelimit(time time.Time) (*[]TransactionStatus, error)
- func (ts *TransactionStatus) GetTimelimit_Sqlite(time time.Time) (*[]TransactionStatus, error)
- func (ts *TransactionStatus) GetTransactions(page int, size int, order string) (*[]TransactionStatusHex, int64, error)
- func (ts *TransactionStatus) Get_Sqlite(transactionHash []byte) (bool, error)
- func (ts *TransactionStatus) Getcount() (int64, error)
- func (ts *TransactionStatus) Getcount_Sqlite() (int64, error)
- func (ts *TransactionStatus) TableName() string
- type TransactionStatusHex
- type TransactionsResponse
- type TransactionsStatusResponse
- type TxChangeChart
- type TxDetailedInfo
- type TxDetailedInfoHeadResponse
- type TxDetailedInfoHex
- type TxDetailedInfoResponse
- type TxListChart
- type TxListRet
- type TxRet
- type UtxoExplorer
- type UtxoExplorerInfo
- type VoteInfo
- type VoteStatus
- type Voting
- type VotingInfo
- type VotingResponse
- type VotingSubject
- type WalletHistoryHex
Constants ¶
const ( ChainMax = "chain_max" MintMax = "mint_max" )
const ( EcosystemCirculations = "ecosystem-circulations-" TopTenHoldings = "top-ten-holdings-" TopTenTxAccount = "top-ten-tx-account" FifteenDaysActiveKeys = "15-days-active-keys-" FifteenDaysStorageCapacity = "15-days-storage-capacity-" FifteenDaysGasFeeChart = "15-days-gas-fee-" GasCombustionPieChart = "gas-combustion-pie-" GasCombustionLineChart = "gas-combustion-line-" FifteenDaysTxAmountChart = "15-days-tx-amount-" FifteenDaysNewKeyChart = "15-days-new-key-" FifteenTxCountChart = "15-days-tx-count-" )
redis key
const ( ChannelDashboard = "dashboard" ChannelBlockTpsList = "blockTpsList" ChannelBlockTransactionList = "blockTxList" ChannelBlockList = "blockList" ChannelStatistical = "statistical" ChannelNodeNewest = "nodeNewest" ChannelNodePkgRate = "nodePkgRate" ChannelNodeMap = "nodeMap" )
const ( // VERSION is current version VERSION = "1.0.0" // ApiPath is the beginning of the api url ApiPath = `/api/v2/` SysTokenSymbol = "IBXC" SysEcosystemName = "platform ecosystem" UtxoTx = "UTXO_Tx" UtxoTransferSelf = "UTXO_Transfer_Self" UtxoBurning = "UTXO_Burning" BlackHoleAddr = "0000-0000-0000-0000-0000" AccountUTXO = "Account-UTXO" UTXOAccount = "UTXO-Account" )
const ( //history FifteenDaysGasFee = "15_days_gas_fee_chart" FifteenDaysNewCirculations = "15_days_new_circulations_chart" FifteenDaysBlockSize = "15_days_block_size_chart" FifteenDaysBlockNumber = "15_days_block_number_chart" NewNfTMinerChange = "new_nft_miner_change_chart" NftMinerRewardChange = "nft_miner_reward_change_chart" TopTenEcosystemTx = "top_ten_ecosystem_tx_chart" NodeVoteChange = "node_vote_change_chart" NodeStakingChange = "node_staking_change_chart" NewEcosystemChange = "new_ecosystem_change_chart" //realTime NewKey = "new_key_chart" AccountChange = "account_change_chart" NftMinerInterval = "nft_miner_interval_chart" NodeRegion = "node_region_chart" )
const ( FeesType = "fees" TaxesType = "taxes" StartUpType = "startUp" CombustionType = "combustion" )
const ( IndexBTree = "btree" IndexHash = "Hash" IndexGiST = "GiST" IndexGIN = "gin" IndexSPGiST = "SP-GiST" IndexBRIN = "BRIN" )
const AccountDetailSQL = `` /* 14498-byte string literal not displayed */
const AssignTotalSupply = publicRoundSupply + devTempSupply + foundationSupply + partnersSupply + privateRound1 + privateRound2
const BinaryTableSuffix = "_binaries"
const CreateAccountDetailTable = `` /* 979-byte string literal not displayed */
const DaoVoteChart = "dao_vote_chart"
const (
// According to Wikipedia, the Earth's radius is about 6,371km
EARTH_RADIUS = 6371
)
const MintNodeTotalSupply = 630000000
const NftMinerTotalSupply = 393750000
const StartUpSupply = consts.FounderAmount
const SvgTimeFormat = "15:04:05 02-01-2006 (UTC)"
const TotalSupply = AssignTotalSupply + NftMinerTotalSupply + MintNodeTotalSupply + StartUpSupply
Variables ¶
var ( AirdropReady bool //total amount: is not now amount AirdropLockAll decimal.Decimal )
var ( AssignReady bool AssignTotalBalance decimal.Decimal AssignTotalSupplyToken decimal.Decimal )
var ( MintNodeReady bool MintNodeTotalBalance decimal.Decimal MintNodeTotalSupplyToken decimal.Decimal )
var ( NftMinerReady bool NftMinerTotalSupplyToken decimal.Decimal NftMinerTotalBalance decimal.Decimal )
var ( ScanOutStPrefix = "scan-out-" Latest = "latest" GetScanOut chan bool )
var BridgeReady bool
var BuildInfo string
var ChartWG = &sync.WaitGroup{}
var FirstBlockTime int64
var (
GLogTranHash map[string]int64
)
var (
GNodeStatusTranHash map[string]TransactionStatus
)
var (
GStatusTranHash map[string]TransactionStatus
)
var (
Gret []DBTransactionsInfo
)
var HistoryWG = &sync.WaitGroup{}
var (
HonorNodes []storage.HonorNodeModel
)
var INameReady bool
var MaxBlockId int64
var NodeReady bool
var PledgeAmount int64 = 1e18
var RealtimeWG = &sync.WaitGroup{}
var (
RefreshRequest chan RefreshObject
)
var SendWebsocketData chan bool
var SendWebsocketSignal chan bool
var TotalSupplyToken decimal.Decimal
var UploadDir = "./upload/"
var VotingReady bool
Functions ¶
func AccountDetailTableExist ¶
func AccountDetailTableExist() bool
func AirdropTableExist ¶
func AirdropTableExist() bool
func AssignTableExist ¶
func AssignTableExist() bool
func BridgeTableExist ¶
func BridgeTableExist() bool
func CandidateTableExist ¶
func CandidateTableExist() bool
func CompareHash ¶
func CreateIndexMain ¶
func CreateIndexMain() error
CreateIndexMain Indexes cannot be added to the ecological table, which will cause synchronization failure
func DataChartHistoryServer ¶
func DataChartHistoryServer()
func DataChartRealtimeSever ¶
func DataChartRealtimeSever()
func DbconnbatchupdateSqlite ¶
func DbconnbatchupdateSqlite(objarr *[]TransactionStatus) error
func DbconndealReduplictionTransactionstatus ¶
func DbconndealReduplictionTransactionstatus(objArr *[]TransactionStatus) (*[]TransactionStatus, *[]TransactionStatus)
func DealRedisBlockTpsList ¶
func DealRedisBlockTpsList() error
func Deal_LogTransactionBlockTxDetial ¶
func Deal_LogTransactionBlockTxDetial(objArr *[]LogTransaction) (*[]BlockTxDetailedInfo, error)
func Deal_Redupliction_LogTransaction ¶
func Deal_Redupliction_LogTransaction(objArr *[]LogTransaction) *[]LogTransaction
func Deal_Redupliction_Transactionstatus ¶
func Deal_Redupliction_Transactionstatus(objArr *[]TransactionStatus) (*[]TransactionStatus, *[]TransactionStatus)
func FilteredSQLInject ¶
func FindNodeLocatedSave ¶
func FormatIndexMethod ¶
func GeoIpClose ¶
func GeoIpClose()
func GeoIpDatabaseInit ¶
func GeoIpDatabaseInit() error
func Get15DayBlockDiffChartDataToRedis ¶
func Get15DayBlockDiffChartDataToRedis()
func GetALLNodeTransactionList ¶
func GetALLNodeTransactionList() error
func GetActiveEcoLibs ¶
func GetActiveEcoLibsToRedis ¶
func GetActiveEcoLibsToRedis()
func GetAirdropLockAllTotal ¶
func GetAirdropLockAllTotal()
func GetAllEcosystemInfo ¶
func GetAllEcosystemInfo()
func GetAllKeysTotalAmount ¶
func GetAssignTotalBalanceAmount ¶
func GetAssignTotalBalanceAmount()
func GetBlockData ¶
GetBlockData is retrieving chain of blocks from database
func GetBlockInfoToRedis ¶
func GetBlockTpsListsFromRedis ¶
func GetBlockTpsListsFromRedis() (*[]ScanOutBlockTransactionRet, error)
func GetBlocksTransactionListByBlockInfo ¶
func GetBlocksTransactionListByBlockInfo(mc *Block) (*[]TxDetailedInfoResponse, error)
func GetCirculations ¶
func GetContractCodeByName ¶
func GetDBDayTraninfo ¶
func GetDBDayTraninfo(day int) (*[]DBTransactionsInfo, error)
func GetDBDealTraninfo ¶
func GetDashboardChartDataToRedis ¶
func GetDashboardChartDataToRedis()
func GetDataChart ¶
func GetDayNumberFormat ¶
func GetDaysAmount ¶
func GetDaysAmount(dayTime int64, list []DaysAmount) string
func GetDaysAmountEqual ¶
func GetDaysNumber ¶
func GetDaysNumber(getTime int64, list []DaysNumber) int64
func GetDaysNumberLike ¶
func GetDaysNumberLike(getTime int64, list []DaysNumber, getTimeFront bool, order string) int64
func GetEcoLibsChartDataToRedis ¶
func GetEcoLibsChartDataToRedis()
func GetEcoLibsTxChartDataToRedis ¶
func GetEcoLibsTxChartDataToRedis()
func GetEcosystemLogoHash ¶
func GetFileHash ¶
func GetFuelRate ¶
func GetHistoryEcosystemChartInfo ¶
func GetHistoryEcosystemChartInfo()
func GetHonorListToRedis ¶
func GetHonorListToRedis(cmd string)
func GetHonorNodeInfo ¶
func GetHonorNodeInfo() []storage.HonorNodeModel
func GetHonorNodeMapToRedis ¶
func GetHonorNodeMapToRedis()
func GetMaxBlockSizeToRedis ¶
func GetMaxBlockSizeToRedis()
func GetMaxTxToRedis ¶
func GetMaxTxToRedis()
func GetMineIncomeParam ¶
func GetMineParam ¶
func GetMintNodeTotalBalance ¶
func GetMintNodeTotalBalance()
func GetNftMinerMap ¶
func GetNftMinerMap() (*[]Positioning, error)
func GetNftMinerTotalBalance ¶
func GetNftMinerTotalBalance()
func GetNftMinerTotalSupply ¶
func GetNftMinerTotalSupply()
func GetNodeBlockReplyRate ¶
func GetNodeListInfo ¶
func GetNodeTransactionList ¶
func GetNodeTransactionList(limit, page int) (*[]TransactionList, int64, error)
func GetNowTimeUnix ¶
func GetNowTimeUnix() int64
func GetQueueTransactionsCount ¶
GetQueueTransactions get queue transactions from node
func GetRedisByName ¶
func GetScanOutDataToRedis ¶
func GetScanOutDataToRedis() error
func GetScanOutKeyInfoToRedis ¶
func GetScanOutKeyInfoToRedis()
func GetSingleDayMaxTxToRedis ¶
func GetSingleDayMaxTxToRedis()
func GetStatisticsSignal ¶
func GetStatisticsSignal()
func GetTransactionBlockFromRedis ¶
func GetTransactionBlockFromRedis() (*[]BlockTxDetailedInfoHex, int64, error)
func GetTransactionBlockToRedis ¶
func GetTransactionBlockToRedis() error
func GetTransactionsStatus ¶
func GetTransactionsStatus(reqUrl string, t1 int64, page, limit int) (*[]TransactionStatus, error)
GetTransactionsStatus get transactions status from node
func GetTxInfoFromRedis ¶
func GetTxInfoFromRedis(limit int) (*[]ScanOutBlockTransactionRet, error)
func GetWeekAverageValueTxToRedis ¶
func GetWeekAverageValueTxToRedis()
func GzipDecode ¶
func GzipEncode ¶
func HasTableOrView ¶
func INameTableExist ¶
func INameTableExist() bool
func InitBuildInfo ¶
func InitBuildInfo()
go build -ldflags "-X 'github.com/IBAX-io/go-explorer/models.buildBranch=main' -X 'github.com/IBAX-io/go-explorer/models.buildDate=2022-06-17' -X 'github.com/IBAX-io/go-explorer/models.commitHash=2141saf'"
func InitCountryLocator ¶
func InitCountryLocator() error
func InitDBTrigger ¶
func InitDBTrigger() (err error)
func InitDailyActiveReport ¶
func InitDailyActiveReport() error
func InitDashboardTx ¶
func InitDashboardTx() error
func InitDatabase ¶
func InitDatabase() error
func InitEcosystemInfo ¶
func InitEcosystemInfo()
func InitFristBlockTime ¶
func InitFristBlockTime() error
func InitGlobalSwitch ¶
func InitGlobalSwitch()
func InitHonorNodeByRedis ¶
func InitHonorNodeByRedis(cmd string)
func InitPledgeAmount ¶
func InitPledgeAmount()
func InitRedisDb ¶
func InitRedisDb() error
func InitRedisDbAll ¶
func InitRedisDbAll() error
func InitSpentInfoHistory ¶
func InitSpentInfoHistory() error
func InitTransactionData ¶
func InitTransactionData() error
func InitTransactionRelation ¶
func InitTransactionRelation() error
func InsertDailyActiveReport ¶
func InsertDailyActiveReport()
func InsertDailyNodeReport ¶
func InsertDailyNodeReport()
func InsertHonorNodeInfo ¶
func InsertHonorNodeInfo()
func InsertRedis ¶
func IsBridgeEcosystem ¶
func MsgpackMarshal ¶
func MsgpackUnmarshal ¶
func NanoToSeconds ¶
func NftMinerTableIsExist ¶
func NftMinerTableIsExist() bool
func ParseIndexMethod ¶
func PointValid ¶
func RefreshChartDaemons ¶
func SendAllWebsocketData ¶
func SendAllWebsocketData()
func SendBlockList ¶
func SendBlockList(data *[]BlockListResponse) error
func SendBlockListToWebsocket ¶
func SendBlockListToWebsocket(ret1 *[]BlockListResponse) error
func SendRefreshRequest ¶
func SendTopTransactiontps ¶
func SendTopTransactiontps(topBlockTps *[]ScanOutBlockTransactionRet) error
func SendTpsListToWebsocket ¶
func SendTpsListToWebsocket(ret *[]ScanOutBlockTransactionRet) error
func SendTransactionList ¶
func SendTransactionList(txList *[]BlockTxDetailedInfoHex) error
func SendTransactionListToWebsocket ¶
func SendTransactionListToWebsocket(ret *[]BlockTxDetailedInfoHex) error
func SendTxDataSyncSignal ¶
func SendTxDataSyncSignal()
func SendTxRelationSignal ¶
func SendTxRelationSignal()
func SendUtxoTxSyncSignal ¶
func SendUtxoTxSyncSignal()
func StUpdate_Sqlite ¶
func StUpdate_Sqlite(objarr *[]TransactionStatus) error
func StrReplaceAllString ¶
func StrReplaceAllString(s2 string) (strReplace StrReplaceStruct, indexList []StrReplaceStruct)
func SyncBlockListToRedis ¶
func SyncBlockListToRedis()
func SyncEcosystemInfo ¶
func SyncEcosystemInfo()
func SyncNationalFlagIcon ¶
func SyncNationalFlagIcon()
func ToCapacityKb ¶
func ToCapacityMb ¶
func ToCapacityString ¶
func TxDataSyncSignalReceive ¶
func TxDataSyncSignalReceive()
func TxRelationCheck ¶
func TxRelationCheck(lastBlockId int64)
func UnmarshallBlockTxData ¶
func UnmarshallTransaction ¶
func UnmarshallTransaction(blockBuffer *bytes.Buffer) (*transaction.Transaction, error)
func UpdateAccountDetail ¶
func UpdateAccountDetail()
func UpdateHonorNodeInfo ¶
func UpdateHonorNodeInfo()
func VotingTableExist ¶
func VotingTableExist() bool
func WhereBuild ¶
sql build where
func WriteChannelByte ¶
Types ¶
type AccountAmountChangeBarChart ¶
type AccountAmountChangeBarChart struct { TokenSymbol string `json:"token_symbol"` Name string `json:"name"` Time []int64 `json:"time"` Outcome []string `json:"outcome"` Income []string `json:"income"` Balance []string `json:"balance"` Digits int64 `json:"digits"` }
func GetAccountTokenChangeChart ¶
func GetAccountTokenChangeChart(ecosystem, keyId int64, findTime int64) (AccountAmountChangeBarChart, error)
GetAccountTokenChangeChart findTime: 0:Get All order:Find Start TIME
func GetAmountChangeBarChart ¶
func GetAmountChangeBarChart(ecosystem int64, account string, isDefault int) (AccountAmountChangeBarChart, error)
type AccountAmountChangePieChart ¶
type AccountAmountChangePieChart struct { Outcome decimal.Decimal `json:"outcome" gorm:"column:outcome"` Income decimal.Decimal `json:"income" gorm:"column:income"` TokenSymbol string `json:"token_symbol" gorm:"column:token_symbol"` Digits int64 `json:"digits"` }
func GetAmountChangePieChart ¶
func GetAmountChangePieChart(ecosystem int64, account string, stTime, edTime int64) (AccountAmountChangePieChart, error)
type AccountChangeChartResponse ¶
type AccountChangeChartResponse struct { NowTotal int64 `json:"now_total"` MaxAccountedFor decimal.Decimal `json:"max_accounted_for"` MaxTime int64 `json:"max_time"` MinAccountedFor decimal.Decimal `json:"min_accounted_for"` MinTime int64 `json:"min_time"` Time []int64 `json:"time"` Total []int64 `json:"total"` HasToken []int64 `json:"has_token"` AccountedFor []decimal.Decimal `json:"accounted_for"` }
func GetAccountChangeChart ¶
func GetAccountChangeChart() (AccountChangeChartResponse, error)
type AccountDetail ¶
type AccountDetail struct { ID int64 `gorm:"primary_key;not null"` Account string `gorm:"not null"` Ecosystem int64 `gorm:"primary_key;not null"` JoinTime int64 `gorm:"not null"` LogoHash string `gorm:"not null"` //ecosystem logo hash Amount decimal.Decimal `gorm:"not null"` StakeAmount decimal.Decimal `gorm:"not null"` //Contains nft_miner_stake AND candidate_referendum AND candidate_substitute OutputValue decimal.Decimal `gorm:"not null"` TotalAmount decimal.Decimal `gorm:"not null"` //Contains Amount+OutputValue+StakeAmount }
func (*AccountDetail) TableName ¶
func (a *AccountDetail) TableName() string
TableName returns name of table
type AccountHistoryChart ¶
type AccountHistoryChart struct { Time []int64 `json:"time"` Inamount []string `json:"inamount"` Outamount []string `json:"outamount"` TokenSymbol string `json:"token_symbol"` Digits int64 `json:"digits"` }
func GetWalletTokenChangeBasis ¶
func GetWalletTokenChangeBasis(account string) (*AccountHistoryChart, error)
type AccountNftMinerList ¶
type AccountNftMinerListResult ¶
type AccountNftMinerListResult struct { TotalResult Page int `json:"page"` Limit int `json:"limit"` Rets []AccountNftMinerList `json:"rets"` }
type AccountTotalAmountChart ¶
type AccountTotalAmountChart struct { TotalAmount decimal.Decimal `json:"total_amount"` Amount decimal.Decimal `json:"amount" gorm:"column:amount"` AmountRatio float64 `json:"amount_ratio"` StakeAmount decimal.Decimal `json:"stake_amount" gorm:"column:stake_amount"` StakeAmountRatio float64 `json:"stake_amount_ratio"` LockAmount decimal.Decimal `json:"lock_amount"` LockRatio float64 `json:"lock_ratio"` TokenSymbol string `json:"token_symbol"` Digits int64 `json:"digits"` }
func GetAccountTotalAmount ¶
func GetAccountTotalAmount(ecosystem int64, account string) (AccountTotalAmountChart, error)
type AccountTxChart ¶
func GetAccountTxChart ¶
func GetAccountTxChart(ecosystem int64, account string) (AccountTxChart, error)
type AccountTxInfoResponse ¶
type AccountTxInfoResponse struct { Total int64 `json:"total"` InTx int64 `json:"in_tx"` OutTx int64 `json:"out_tx"` }
func GetAccountTxCount ¶
func GetAccountTxCount(ecosystem int64, account string) (*AccountTxInfoResponse, error)
type AccountTxListResponse ¶
type AccountTxListResponse struct { Hash string `json:"hash"` BlockId int64 `json:"block_id"` ContractName string `json:"contract_name"` Timestamp int64 `json:"timestamp"` Address string `json:"address"` Status int32 `json:"status"` EcosystemName string `json:"ecosystem_name"` Ecosystem int64 `json:"ecosystem"` }
type ActiveReportInfo ¶
type ActiveReportInfo struct { Time int64 `gorm:"column:time;not null"` ActiveAccount int64 `gorm:"column:active;not null"` Ratio string `gorm:"column:ratio;type:varchar(30);not null"` RelativeRatio string `gorm:"column:relative_ratio;type:varchar(30);not null"` TxNumber int64 `gorm:"column:tx_number;not null"` TxAmount string `gorm:"column:tx_amount;type:decimal(30);not null"` }
type AirdropInfo ¶
type AirdropInfo struct { Id int64 `gorm:"primary_key;not_null"` Account string BalanceAmount decimal.Decimal DateCreated int64 Detail string `gorm:"type:jsonb"` DirectAmount decimal.Decimal LatestAt int64 LockAmount decimal.Decimal PeriodCount int64 Priority int64 StakeAmount decimal.Decimal Surplus int64 TotalAmount decimal.Decimal }
func (*AirdropInfo) GetStaking ¶
func (p *AirdropInfo) GetStaking(account string) decimal.Decimal
func (AirdropInfo) TableName ¶
func (p AirdropInfo) TableName() string
type AppInfo ¶
type AppInfo struct { Contracts ContractsParams `json:"contracts"` Page PageParams `json:"page"` Snippets SnippetsParams `json:"snippets"` Table TableParams `json:"table"` Params AppParams `json:"params"` Menu MenuParams `json:"menu"` Languages LanguagesParams `json:"languages"` }
type AppParam ¶
type AppParam struct { ID int64 `gorm:"primary_key;not null"` AppID int64 `gorm:"not null"` Name string `gorm:"not null;size:100"` Value string `gorm:"not null"` Conditions string `gorm:"not null"` // contains filtered or unexported fields }
AppParam is model
func (*AppParam) GetById ¶
func (sp *AppParam) GetById(transaction *DbTransaction, id int64) (bool, error)
GetById is retrieving model from database
type Applications ¶
type Applications struct { ID int64 `gorm:"primary_key;not null"` Name string `gorm:"column:name;type:varchar(255);not null"` Conditions string `gorm:"column:conditions;not null"` Deleted int64 `gorm:"column:deleted;not null"` //1:deleted Ecosystem int64 `gorm:"column:ecosystem;not null"` }
func (*Applications) FindApp ¶
func (p *Applications) FindApp(page, limit int, order, where string) (*[]Applications, int64, error)
func (*Applications) GetByName ¶
func (p *Applications) GetByName(name string, ecosystem int64) (bool, error)
func (Applications) TableName ¶
func (p Applications) TableName() string
type AssignInfo ¶
type AssignInfo struct { ID int64 `gorm:"primary_key;not null"` Type int64 `gorm:"not null"` Account string `gorm:"not null"` TotalAmount decimal.Decimal `gorm:"not null"` BalanceAmount decimal.Decimal `gorm:"not null"` Detail string `gorm:"not null;type:jsonb"` Deleted int64 `gorm:"not null"` DateDeleted int64 `gorm:"not null"` DateUpdated int64 `gorm:"not null"` DateCreated int64 `gorm:"not null"` }
AssignInfo is model
func (*AssignInfo) GetBalance ¶
func (m *AssignInfo) GetBalance(db *DbTransaction, account string) (decimal.Decimal, error)
func (*AssignInfo) GetTotalBalance ¶
func (m *AssignInfo) GetTotalBalance(dbTx *DbTransaction, account string) (decimal.Decimal, decimal.Decimal, error)
GetTotalBalance is retrieving model from database
func (AssignInfo) TableName ¶
func (m AssignInfo) TableName() string
TableName returns name of table
type AssignRules ¶
type BasisEcosystemChartDataResponse ¶
type BasisEcosystemChartDataResponse struct { KeyInfo KeyChangeChart `json:"key_info"` TxInfo TxChangeChart `json:"tx_info"` }
type BasisEcosystemResponse ¶
type BasisEcosystemResponse struct { ID int64 `json:"id"` Name string `json:"name"` LogoHash string `json:"logo_hash"` KeyCount int64 `json:"key_count"` TotalTx int64 `json:"total_tx"` KeyInfo KeyChangeChart `json:"key_info"` TxInfo TxChangeChart `json:"tx_info"` }
func GetEcoLibsChartData ¶
func GetEcoLibsChartData() (*BasisEcosystemResponse, error)
type Binary ¶
type Binary struct { Ecosystem int64 ID int64 AppId int64 Name string Data []byte Hash string MimeType string Account string }
Binary represents record of {prefix}_binaries table
func (*Binary) FindAppNameByEcosystem ¶
func (*Binary) SetTableName ¶
SetTableName sets name of table
func (*Binary) SetTablePrefix ¶
SetTablePrefix is setting table prefix
type Block ¶
type Block struct { ID int64 `gorm:"primary_key;not_null"` Hash []byte `gorm:"not null"` RollbacksHash []byte `gorm:"not null"` Data []byte `gorm:"not null"` EcosystemID int64 `gorm:"not null"` KeyID int64 `gorm:"not null"` NodePosition int64 `gorm:"not null"` Time int64 `gorm:"not null"` Tx int32 `gorm:"not null"` ConsensusMode int32 `gorm:"not null"` CandidateNodes []byte `gorm:"not null"` }
Block is model
func (*Block) GetBlockTotal ¶
func (*Block) GetBlocksFrom ¶
GetBlocksFrom is retrieving ordered chain of blocks from database
func (*Block) GetBlocksHash ¶
GetNodeBlocksAtTime returns records of blocks for time interval and position of node
func (*Block) GetByTimeBlockId ¶
func (b *Block) GetByTimeBlockId(dbTx *DbTransaction, time int64) (bool, error)
func (*Block) GetMaxBlock ¶
GetMaxBlock returns last block existence
func (*Block) GetNodeBlocksAtTime ¶
GetNodeBlocksAtTime returns records of blocks for time interval and position of node
func (*Block) GetReverseBlockchain ¶
GetReverseBlockchain returns records of blocks in reverse ordering
func (*Block) GetSystemTime ¶
GetSystemTime is retrieving model from database
func (*Block) InsertRedis ¶
type BlockCCPriceInfo ¶
type BlockCCRatesInfo ¶
type BlockDetailedInfo ¶
type BlockDetailedInfo struct { Header BlockHeaderInfo `json:"header"` Hash []byte `json:"hash"` EcosystemID int64 `json:"ecosystem_id"` NodePosition int64 `json:"node_position"` KeyID int64 `json:"key_id"` Time int64 `json:"time"` Tx int32 `json:"tx_count"` RollbacksHash []byte `json:"rollbacks_hash"` MrklRoot []byte `json:"mrkl_root"` BinData []byte `json:"bin_data"` SysUpdate bool `json:"sys_update"` GenBlock bool `json:"gen_block"` StopCount int `json:"stop_count"` Transactions []TxDetailedInfo `json:"transactions"` }
type BlockDetailedInfoHex ¶
type BlockDetailedInfoHex struct { Header BlockHeaderInfoHex `json:"header"` Hash string `json:"hash"` EcosystemID int64 `json:"ecosystem_id"` NodePosition int64 `json:"node_position"` KeyID string `json:"key_id"` Time int64 `json:"time"` Tx int32 `json:"tx_count"` RollbacksHash string `json:"rollbacks_hash"` MerkleRoot string `json:"merkle_root"` BinData string `json:"bin_data"` SysUpdate bool `json:"sys_update"` GenBlock bool `json:"gen_block"` StopCount int `json:"stop_count"` BlockSize string `json:"block_size"` TxTotalSize string `json:"tx_total_size"` Transactions []TxDetailedInfoHex `json:"transactions"` }
func DealTransactionBlockTxDetial ¶
func DealTransactionBlockTxDetial(mc *Block) (int64, *BlockDetailedInfoHex, *[]BlockTxDetailedInfoHex, error)
func GetBlocksDetailedInfoHex ¶
func GetBlocksDetailedInfoHex(bk *Block) (*BlockDetailedInfoHex, error)
func GetBlocksDetailedInfoHexByScanOut ¶
func GetBlocksDetailedInfoHexByScanOut(mc *Block) (*BlockDetailedInfoHex, error)
func GetBlocksTransactionInfoByBlockInfo ¶
func GetBlocksTransactionInfoByBlockInfo(mc *Block) (*BlockDetailedInfoHex, error)
func GetTransactionTxDetial ¶
func GetTransactionTxDetial(mc *Block) (int64, *BlockDetailedInfoHex, error)
type BlockDetailedInfoHexRespone ¶
type BlockDetailedInfoHexRespone struct { Total int64 `json:"total"` Page int `json:"page"` Limit int `json:"limit"` Transactions []TxDetailedInfoResponse `json:"transactions"` }
func GetBlockDetialRespones ¶
func GetBlockDetialRespones(page int, limit int, txs *[]TxDetailedInfoResponse) *BlockDetailedInfoHexRespone
type BlockHeaderInfo ¶
type BlockHeaderInfoDetailed ¶
type BlockHeaderInfoDetailed struct { Header BlockHeaderInfoHex `json:"header"` //Info BlockInfo `json:"info"` Transactions []TxDetailedInfoHex `json:"transactions"` }
type BlockHeaderInfoHex ¶
type BlockHeaderInfoHex struct { BlockId int64 `json:"block_id"` Time int64 `json:"time"` EcosystemId int64 `json:"ecosystem_id"` KeyId string `json:"key_id"` NodePosition int64 `json:"node_position"` PreHash string `json:"pre_hash"` Sign string `json:"sign"` BlockHash string `json:"block_hash"` Version int32 `json:"version"` Address string `json:"address"` IconUrl string `json:"icon_url"` ConsensusMode int32 `json:"consensus_mode"` }
type BlockID ¶
func (*BlockID) InsertRedis ¶
type BlockListChart ¶
func Get15DayBlockDiffChartDataFromRedis ¶
func Get15DayBlockDiffChartDataFromRedis() (BlockListChart, error)
type BlockListHeaderResponse ¶
type BlockListHeaderResponse struct { Total int64 `json:"total"` Page int `json:"page"` Limit int `json:"limit"` BlockInfo *BlockRet `json:"block_info,omitempty"` List []BlockListResponse `json:"list"` Digits int64 `json:"digits"` }
func GetBlockList ¶
func GetBlockList(page, limit, reqType int, order string) (*BlockListHeaderResponse, error)
func GetBlockListFromRedis ¶
func GetBlockListFromRedis() (*BlockListHeaderResponse, error)
func GetBlocksListFromRedis ¶
func GetBlocksListFromRedis() (*BlockListHeaderResponse, error)
type BlockListResponse ¶
type BlockListResponse struct { ID int64 `json:"id"` Time int64 `json:"time"` Tx int32 `json:"tx"` NodePosition int64 `json:"node_position"` NodeName string `json:"node_name"` APIAddress string `json:"api_address"` IconUrl string `json:"icon_url"` Recipientid string `json:"recipient_id"` GasFee string `json:"gas_fee"` Reward string `json:"reward"` EcoLib int64 `json:"eco_lib"` ConsensusMode int32 `json:"consensus_mode"` }
type BlockSizeListResponse ¶
type BlockTxDetailedInfo ¶
type BlockTxDetailedInfo struct { BlockID int64 `gorm:"not null;index:btdblockid_idx" json:"block_id"` Hash string `gorm:"primary_key;not null" json:"hash"` ContractName string `gorm:"not null" json:"contract_name"` Params string `gorm:"not null" json:"params"` KeyID string `gorm:"not null" json:"key_id"` Time int64 `gorm:"not null" json:"time"` Type int64 `gorm:"not null" json:"type"` Size int64 `gorm:"not null" json:"size"` Ecosystemname string `gorm:"null" json:"ecosystemname"` TokenSymbol string `gorm:"null" json:"token_symbol"` Ecosystem int64 `gorm:"null" json:"ecosystem"` }
type BlockTxDetailedInfoHex ¶
type BlockTxDetailedInfoHex struct { BlockID int64 `gorm:"not null;index:blockid_idx" json:"block_id"` Hash string `gorm:"primary_key;not null" json:"hash"` ContractName string `gorm:"not null" json:"contract_name"` ContractCode string `json:"contract_code"` //Params map[string]any `json:"params"` Params string `gorm:"not null" json:"params"` KeyID string `gorm:"not null" json:"key_id"` Time int64 `gorm:"not null" json:"time"` Type int64 `gorm:"not null" json:"type"` Size int64 `gorm:"not null" json:"size"` Ecosystemname string `gorm:"null" json:"ecosystemname"` Token_symbol string `gorm:"null" json:"token_symbol"` Ecosystem int64 `gorm:"null" json:"ecosystem"` GasFee decimal.Decimal `json:"gas_fee"` Amount decimal.Decimal `json:"amount"` Status int32 `json:"status"` Digits int64 `json:"digits"` }
func (*BlockTxDetailedInfoHex) GetByBlockIdBlockTransactionsLastDB ¶
func (bt *BlockTxDetailedInfoHex) GetByBlockIdBlockTransactionsLastDB(id int64, page int, limit int, order string) (int64, *[]BlockTxDetailedInfoHex, error)
func (*BlockTxDetailedInfoHex) GetByHashDb ¶
func (bt *BlockTxDetailedInfoHex) GetByHashDb(hash string) (bool, error)
func (*BlockTxDetailedInfoHex) GetByKeyIdBlockTransactionsLastDb ¶
func (bt *BlockTxDetailedInfoHex) GetByKeyIdBlockTransactionsLastDb(id string, page int, size int, order string) (int64, *[]BlockTxDetailedInfoHex, error)
func (*BlockTxDetailedInfoHex) GetCommonTransactionSearch ¶
func (bt *BlockTxDetailedInfoHex) GetCommonTransactionSearch(page, limit int, search, order string, reqType int) (*HashTransactionResult, error)
GetCommonTransactionSearch is retrieving model from database
func (*BlockTxDetailedInfoHex) GetDbTxDetailedHash ¶
func (bt *BlockTxDetailedInfoHex) GetDbTxDetailedHash(hash string) (bool, error)
func (*BlockTxDetailedInfoHex) GetDbTxDetailedId ¶
func (bt *BlockTxDetailedInfoHex) GetDbTxDetailedId(id int64) ([]BlockTxDetailedInfoHex, error)
func (*BlockTxDetailedInfoHex) GetDb_txdetailedKey ¶
func (bt *BlockTxDetailedInfoHex) GetDb_txdetailedKey(key string, order string, limit, page int) ([]BlockTxDetailedInfoHex, int64, error)
func (*BlockTxDetailedInfoHex) Get_BlockTransactions_Sqlite ¶
func (bt *BlockTxDetailedInfoHex) Get_BlockTransactions_Sqlite(page int, size int, order string) (*[]BlockTxDetailedInfoHex, int, error)
func (*BlockTxDetailedInfoHex) Marshal ¶
func (s *BlockTxDetailedInfoHex) Marshal() ([]byte, error)
func (*BlockTxDetailedInfoHex) Unmarshal ¶
func (s *BlockTxDetailedInfoHex) Unmarshal(bt []byte) error
type BlocksResult ¶
type BridgeSettings ¶
type BridgeSettings struct { Id int64 `gorm:"primary_key;not null"` BridgeAddress string `gorm:"not null"` BridgeName string `gorm:"not null"` ChainId int64 `gorm:"not null"` ChainName string `gorm:"not null"` DepositConfirm int64 `gorm:"not null"` Owners string `gorm:"not null"` Required int64 `gorm:"not null"` Status int `gorm:"not null"` //1:enable 0:disable WithdrawConfirm int64 `gorm:"not null"` }
func (*BridgeSettings) GetByChainName ¶
func (b *BridgeSettings) GetByChainName(name string) (bool, error)
func (*BridgeSettings) TableName ¶
func (b *BridgeSettings) TableName() string
type BridgeToken ¶
type BridgeToken struct { Id int64 `gorm:"primary_key;not null"` Status int64 `gorm:"not null"` SettingId int64 `gorm:"not null"` ChainName string `gorm:"not null"` Ecosystem int64 `gorm:"not null"` TokenAddress string `gorm:"not null"` TokenDigits int64 `gorm:"not null"` TokenName string `gorm:"not null"` TokenSymbol string `gorm:"not null"` }
func (*BridgeToken) GetByTokenSymbol ¶
func (b *BridgeToken) GetByTokenSymbol(settingId int64, tokenAddress string) (bool, error)
func (*BridgeToken) TableName ¶
func (b *BridgeToken) TableName() string
type CandidateHonorNodeRet ¶
type CandidateNodeDecisions ¶
type CandidateNodeDecisions struct { Id int64 `gorm:"primary_key;not_null"` RequestId int64 `gorm:"not_null"` Account string `gorm:"not_null"` Decision int64 `gorm:"not_null"` Earnest string `gorm:"not_null"` DateCreated int64 `gorm:"not_null"` DateUpdated int64 `gorm:"not_null"` DecisionType int64 `gorm:"not_null"` DateWithdrawd int64 `gorm:"not_null"` }
func (*CandidateNodeDecisions) TableName ¶
func (p *CandidateNodeDecisions) TableName() string
type CandidateNodeRequests ¶
type CandidateNodeRequests struct { Id int64 `gorm:"primary_key;not_null"` TcpAddress string `gorm:"not_null"` ApiAddress string `gorm:"not_null"` NodePubKey string `gorm:"not_null"` DateCreated int64 `gorm:"not_null"` Deleted int `gorm:"not_null"` DateDeleted int64 `gorm:"not_null"` Website string `gorm:"not_null"` ReplyCount int64 `gorm:"not_null"` DateReply int64 `gorm:"not_null"` EarnestTotal string `gorm:"not_null"` NodeName string `gorm:"not_null"` }
func (*CandidateNodeRequests) GetAll ¶
func (p *CandidateNodeRequests) GetAll() ([]CandidateNodeRequests, error)
func (*CandidateNodeRequests) GetById ¶
func (p *CandidateNodeRequests) GetById(id int64) (bool, error)
func (*CandidateNodeRequests) GetNodeMap ¶
func (p *CandidateNodeRequests) GetNodeMap() (*NodeMapResponse, error)
func (*CandidateNodeRequests) GetPubKeyById ¶
func (p *CandidateNodeRequests) GetPubKeyById(id int64) (bool, error)
func (*CandidateNodeRequests) TableName ¶
func (p *CandidateNodeRequests) TableName() string
type CastNodeRet ¶
type Circulations ¶
type CirculationsChartResponse ¶
type CirculationsChartResponse struct { Total string `json:"total"` Unlock string `json:"unlock"` Unstake string `json:"unstake"` Miner string `json:"miner"` Change CirculationsChangeResponse `json:"change"` }
func Get15DayNewCirculationsChart ¶
func Get15DayNewCirculationsChart() (CirculationsChartResponse, error)
type CirculationsRet ¶
type Combustion ¶
type CombustionDetail ¶
type CombustionDetail struct { FuelRate string `json:"fuel_rate"` Combustion struct { Flag int `json:"flag"` After string `json:"after"` Value string `json:"value"` Before string `json:"before"` Percent int `json:"percent"` } `json:"combustion"` VmCostFee decimal.Decimal `json:"vmCost_fee"` ElementFee decimal.Decimal `json:"element_fee"` StorageFee decimal.Decimal `json:"storage_fee"` ExpediteFee decimal.Decimal `json:"expedite_fee"` }
type CommonResult ¶
type CommonResult struct { TotalResult IsCreate bool `json:"is_create"` Rets []map[string]string `json:"rets"` }
type Contract ¶
type Contract struct { ID int64 `json:"id,omitempty"` Name string `json:"name,omitempty"` Value string `json:"value,omitempty"` WalletID int64 `json:"wallet_id,omitempty"` Active bool `json:"active,omitempty"` TokenID int64 `json:"token_id,omitempty"` Conditions string `json:"conditions,omitempty"` AppID int64 `json:"app_id,omitempty"` EcosystemID int64 `gorm:"column:ecosystem" json:"ecosystem_id,omitempty"` }
Contract represents record of 1_contracts table
func (*Contract) GetContractsByEcoLibs ¶
type ContractTxDetail ¶
type ContractTxDetail struct { Comment string `json:"comment"` HistoryItem }
type ContractsParams ¶
type CountInt64 ¶
type CountInt64 struct {
Count int64 `gorm:"column:count"`
}
type CountResponse ¶
type CountResponse struct {
Count int64 `json:"count"`
}
type CountriesGeoJson ¶
type CountriesGeoJson struct { Type string `json:"type"` Features []CountryFeature `json:"features"` }
var (
CountriesGeo CountriesGeoJson
)
type CountryFeature ¶
type CountryFeature struct { Type string `json:"type"` Properties CountryInfo `json:"properties"` Geometry Geometry `json:"geometry"` }
type CountryInfo ¶
type CountryInfo struct { ADMIN string `json:"ADMIN"` ISOA2 string `json:"ISO_A2"` Continent string `json:"continent"` }
func FindCountryByCoordinate ¶
func FindCountryByCoordinate(lat, lng float64) CountryInfo
type DBTransactionsInfo ¶
type DailyActiveChartResponse ¶
type DailyActiveChartResponse struct { MaxActive int64 `json:"max_active"` MaxTime int64 `json:"max_time"` MinActive int64 `json:"min_active"` MinTime int64 `json:"min_time"` Time []int64 `json:"time"` Info []DailyActiveReport `json:"info"` }
func GetDailyActiveAccountChangeChart ¶
func GetDailyActiveAccountChangeChart(search any, startTime, endTime int64) (*DailyActiveChartResponse, error)
type DailyActiveReport ¶
type DailyActiveReport struct { ID int64 `gorm:"primary_key;not null" json:"id"` Time int64 `gorm:"column:time;not null" json:"time"` ActiveAccount int64 `gorm:"column:active;not null" json:"active_account"` Ratio string `gorm:"column:ratio;type:varchar(30);not null" json:"ratio"` TotalKey int64 `gorm:"column:total_key;not null" json:"total_key"` RelativeRatio string `gorm:"column:relative_ratio;type:varchar(30);not null" json:"relative_ratio"` TxNumber int64 `gorm:"column:tx_number;not null" json:"tx_number"` TxAmount string `gorm:"column:tx_amount;type:decimal(30);not null" json:"tx_amount"` }
func GetDailyActiveReportList ¶
func GetDailyActiveReportList() ([]DailyActiveReport, error)
func (*DailyActiveReport) CreateTable ¶
func (p *DailyActiveReport) CreateTable() (err error)
func (*DailyActiveReport) GetFirst ¶
func (dt *DailyActiveReport) GetFirst() (bool, error)
func (*DailyActiveReport) GetLast ¶
func (dt *DailyActiveReport) GetLast() (bool, error)
func (*DailyActiveReport) GetList ¶
func (dt *DailyActiveReport) GetList() ([]DailyActiveReport, error)
func (*DailyActiveReport) GetTimeLine ¶
func (dt *DailyActiveReport) GetTimeLine(stTime, edTime int64) ([]DailyActiveReport, error)
func (*DailyActiveReport) Insert ¶
func (dt *DailyActiveReport) Insert() error
func (*DailyActiveReport) InsertList ¶
func (dt *DailyActiveReport) InsertList(list []DailyActiveReport) error
func (*DailyActiveReport) TableName ¶
func (dt *DailyActiveReport) TableName() string
type DailyNodeReport ¶
type DailyNodeReport struct { ID int64 `gorm:"primary_key;not null" json:"id"` Time int64 `gorm:"column:time;not null" json:"time"` HonorNode string `gorm:"not null;type:jsonb" json:"honor_node"` CandidateNode string `gorm:"not null;type:jsonb" json:"candidate_node"` }
func (*DailyNodeReport) CreateTable ¶
func (p *DailyNodeReport) CreateTable() (err error)
func (*DailyNodeReport) GetLast ¶
func (p *DailyNodeReport) GetLast() (bool, error)
func (*DailyNodeReport) Insert ¶
func (dt *DailyNodeReport) Insert() error
func (*DailyNodeReport) TableName ¶
func (p *DailyNodeReport) TableName() string
type DaoVoteChartResponse ¶
type DaoVoteDetailResponse ¶
type DaoVoteDetailResponse struct { VoteStatus VoteInfo Progress int `json:"progress"` TypeDecision string `json:"type_decision"` Description string `json:"description"` //DescriptionText string `json:"description_text"` VotingSubject struct { ContractAccept string `json:"contract_accept"` Arguments string `json:"arguments"` ContractOfReject string `json:"contract_of_reject"` } `json:"voting_subject"` Voting struct { Type string `json:"type"` Status string `json:"status"` CountTypeVoters int `json:"count_type_voters"` VoteCountType string `json:"vote_count_type"` Filled string `json:"filled"` //full data Decision string `json:"decision"` DateStart int64 `json:"date_start"` DateEnd int64 `json:"date_end"` Quorum int `json:"quorum"` Volume int `json:"volume"` Participants int64 `json:"participants"` Creator string `json:"creator"` Member []string `json:"member"` } `json:"voting"` }
func GetDaoVoteDetail ¶
func GetDaoVoteDetail(search any, language string) (DaoVoteDetailResponse, error)
type DashboardChainInfo ¶
type DashboardChartData ¶
type DashboardChartData struct { BlockChart BlockListChart `json:"block_chart"` TxChart TxListChart `json:"tx_chart"` CirculationsChart Circulations `json:"circulations_chart"` NftMinerChart NftMinerInfoChart `json:"nft_miner_chart"` EcoLibsChart EcoListChart `json:"eco_libs_chart"` KeyChart KeyInfoChart `json:"key_chart"` HonerNodeChart HonorNodeChart `json:"honer_node_chart"` Digits int64 `json:"digits"` }
func GetDashboardChartData ¶
func GetDashboardChartData() (*DashboardChartData, error)
func GetDashboardChartDataFromRedis ¶
func GetDashboardChartDataFromRedis() (*DashboardChartData, error)
func (*DashboardChartData) Marshal ¶
func (s *DashboardChartData) Marshal() ([]byte, error)
func (*DashboardChartData) Unmarshal ¶
func (s *DashboardChartData) Unmarshal(bt []byte) error
type DaysActiveReport ¶
type DaysActiveReport struct { Days string `gorm:"column:days"` Active int64 `gorm:"column:active"` TotalKey int64 `gorm:"column:total_key"` Ratio decimal.Decimal `gorm:"column:ratio"` TxNumber int64 `gorm:"column:tx_number"` TxAmount decimal.Decimal `gorm:"column:tx_amount"` }
func GetTimeLineDaysActiveReport ¶
func GetTimeLineDaysActiveReport(st, ed int64) (DaysActiveReport, bool, error)
type DaysAmount ¶
type DaysAmount struct { Days string `gorm:"column:days"` Amount decimal.Decimal `gorm:"column:amount"` }
func FindDaysAmount ¶
func FindDaysAmount(sql string) ([]DaysAmount, error)
type DaysAmountResponse ¶
func GetDaysAmountResponse ¶
func GetDaysAmountResponse(list []DaysAmount) DaysAmountResponse
func GetNftMinerRewardChangeChart ¶
func GetNftMinerRewardChangeChart() (DaysAmountResponse, error)
type DaysNumber ¶
func FindDaysNumber ¶
func FindDaysNumber(sql string, values ...interface{}) ([]DaysNumber, error)
type DaysNumberResponse ¶
func Get15DayBlockNumberChart ¶
func Get15DayBlockNumberChart() (DaysNumberResponse, error)
Get15DayBlockNumberChart response time:200-1500ms TODO:NEED TO Redis
func GetHistoryNewEcosystemChangeChart ¶
func GetHistoryNewEcosystemChangeChart() (DaysNumberResponse, error)
type DbTransaction ¶
type DbTransaction struct {
// contains filtered or unexported fields
}
func NewDbTransaction ¶
func NewDbTransaction(conn *gorm.DB) *DbTransaction
func StartTransaction ¶
func StartTransaction() (*DbTransaction, error)
StartTransaction is beginning transaction
func (*DbTransaction) Connection ¶
func (tr *DbTransaction) Connection() *gorm.DB
Connection returns connection of database
func (*DbTransaction) DropTables ¶
func (dbTx *DbTransaction) DropTables() error
DropTables is dropping all of the tables
func (*DbTransaction) Rollback ¶
func (tr *DbTransaction) Rollback()
Rollback is transaction rollback
type DetailItem ¶
type EcoCirculationsChangeResponse ¶
type EcoCirculationsChangeResponse struct { Time []string `json:"time"` Circulations []string `json:"circulations"` StakeAmount []string `json:"stake_amount"` LockAmount []string `json:"lock_amount"` NftBalanceSupply []string `json:"nft_balance_supply"` BurningTokens []string `json:"burning_tokens"` Combustion []string `json:"combustion"` SupplyToken []string `json:"supply_token"` Emission []string `json:"emission"` }
type EcoCirculationsResponse ¶
type EcoCirculationsResponse struct { Circulations string `json:"circulations"` StakeAmount string `json:"stake_amount"` LockAmount string `json:"lock_amount"` NftBalanceSupply string `json:"nft_balance_supply"` BurningTokens string `json:"burning_tokens"` Combustion string `json:"combustion"` TokenSymbol string `json:"token_symbol"` Name string `json:"name"` SupplyToken string `json:"supply_token"` Emission string `json:"emission"` Digits int64 `json:"digits"` Change EcoCirculationsChangeResponse `json:"change"` }
func GetEcosystemCirculationsChart ¶
func GetEcosystemCirculationsChart(ecosystem int64) (EcoCirculationsResponse, error)
func GetEcosystemCirculationsFromRedis ¶
func GetEcosystemCirculationsFromRedis(ecosystem int64) (*EcoCirculationsResponse, error)
type EcoGasFeeChangeResponse ¶
type EcoGasFeeChangeResponse struct { TokenSymbol string `json:"token_symbol"` Name string `json:"name"` Time []string `json:"time"` GasFee []string `json:"gas_fee"` Combustion []string `json:"combustion"` Digits int64 `json:"digits"` }
func GetGasCombustionLineFromRedis ¶
func GetGasCombustionLineFromRedis(ecosystem int64) (*EcoGasFeeChangeResponse, error)
type EcoGasFeeResponse ¶
type EcoGasFeeResponse struct { GasFee string `json:"gas_fee"` Combustion string `json:"combustion"` TokenSymbol string `json:"token_symbol"` Name string `json:"name"` Digits int64 `json:"digits"` }
func GetGasCombustionPieFromRedis ¶
func GetGasCombustionPieFromRedis(ecosystem int64) (*EcoGasFeeResponse, error)
type EcoLibsRet ¶
type EcoListChart ¶
type EcoTopTenHasTokenResponse ¶
type EcoTopTenHasTokenResponse struct { TokenSymbol string `json:"token_symbol"` Digits int64 `json:"digits"` Name string `json:"name"` //ecosystem name List []accountRatio `json:"list"` }
EcoSystem Chart response
func GetTopTenHasTokenAccountFromRedis ¶
func GetTopTenHasTokenAccountFromRedis(ecosystem int64) (*EcoTopTenHasTokenResponse, error)
type EcoTopTenTxAmountResponse ¶
type EcoTopTenTxAmountResponse struct {
EcoTopTenHasTokenResponse
}
func GetTopTenTxAccountFromRedis ¶
func GetTopTenTxAccountFromRedis(ecosystem int64) (*EcoTopTenTxAmountResponse, error)
type EcoTxAmountDiffResponse ¶
type EcoTxAmountDiffResponse struct { TokenSymbol string `json:"token_symbol"` Name string `json:"name"` //ecosystem name Time []int64 `json:"time"` Amount []string `json:"amount"` Digits int64 `json:"digits"` }
func Get15DaysTxAmountFromRedis ¶
func Get15DaysTxAmountFromRedis(ecosystem int64) (*EcoTxAmountDiffResponse, error)
type EcoTxGasFeeDiffResponse ¶
type EcoTxGasFeeDiffResponse struct { TokenSymbol string `json:"token_symbol"` Digits int64 `json:"digits"` Name string `json:"name"` //ecosystem name Time []int64 `json:"time"` EcoGasAmount []string `json:"eco_gas_amount"` BasisGasAmount []string `json:"basis_gas_amount"` }
func Get15DaysGasFeeFromRedis ¶
func Get15DaysGasFeeFromRedis(ecosystem int64) (*EcoTxGasFeeDiffResponse, error)
func GetEco15DayGasFeeChart ¶
func GetEco15DayGasFeeChart(ecosystem int64) (EcoTxGasFeeDiffResponse, error)
type EcoTxListResponse ¶
type EcoTxListResponse struct {
LogTransaction
}
type EcosyKeyHex ¶
type EcosyKeyHex struct { Ecosystem int64 `json:"ecosystem"` IsValued int64 `json:"isvalued"` Ecosystemname string `json:"ecosystemname"` TokenSymbol string `json:"token_symbol"` Amount string `json:"amount"` Info string `json:"info"` Emission_amount string `json:"emission_amount"` Type_emission int64 Type_withdraw int64 }
type EcosyKeyList ¶
type EcosyKeyList struct { Ecosystem int64 `json:"ecosystem"` Account string `json:"account"` AccountName string `json:"account_name"` Amount string `json:"amount"` TotalAmount decimal.Decimal `json:"total_amount"` AccountedFor decimal.Decimal `json:"accounted_for"` StakeAmount decimal.Decimal `json:"stake_amount"` LockAmount decimal.Decimal `json:"lock_amount"` TokenSymbol string `json:"token_symbol"` Digits int64 `json:"digits"` }
type EcosyKeyTotalDetail ¶
type EcosyKeyTotalDetail struct { Account string `json:"account"` Ecosystem int64 `json:"ecosystem"` LogoHash string `json:"logo_hash"` Name string `json:"name"` JoinTime int64 `json:"join_time"` TokenSymbol string `json:"token_symbol"` Amount string `json:"amount"` TotalAmount decimal.Decimal `json:"total_amount"` LockAmount decimal.Decimal `json:"lock_amount"` StakeAmount decimal.Decimal `json:"stake_amount"` RolesName string `json:"roles_name"` Digits int64 `json:"digits"` }
type EcosyKeyTotalHex ¶
type EcosyKeyTotalHex struct { Wallet string `json:"wallet"` Ecosystem int64 `json:"ecosystem"` IsValued int64 `json:"isvalued"` Ecosystemname string `json:"ecosystemname"` TokenSymbol string `json:"token_symbol"` Amount string `json:"amount"` Info string `json:"info"` EmissionAmount string `json:"emission_amount"` MemberName string `json:"member_name"` MemberHash string `json:"member_hash"` LogoHash string `json:"logo_hash"` TypeEmission int64 `json:"type_emission"` TypeWithdraw int64 `json:"type_withdraw"` Transaction int64 `json:"transaction"` InTx int64 `json:"in_tx"` OutTx int64 `json:"out_tx"` StakeAmount decimal.Decimal `json:"stake_amount"` LockAmount decimal.Decimal `json:"lock_amount"` InAmount decimal.Decimal `json:"inamount"` OutAmount decimal.Decimal `json:"outamount"` TxAmount string `json:"tx_amount"` TotalAmount decimal.Decimal `json:"total_amount"` JoinTime int64 `json:"join_time"` RolesName string `json:"roles_name"` Digits int64 `json:"digits"` }
type Ecosystem ¶
type Ecosystem struct { ID int64 `gorm:"primary_key;not null"` Name string Info string `gorm:"type:jsonb(PostgreSQL)"` FeeModeInfo string IsValued int64 EmissionAmount string `gorm:"type:jsonb(PostgreSQL)"` TokenSymbol string TokenName string TypeEmission int64 TypeWithdraw int64 ControlMode int64 Digits int64 }
func (*Ecosystem) GetBasisEcosystem ¶
func (p *Ecosystem) GetBasisEcosystem() (*BasisEcosystemResponse, error)
func (*Ecosystem) GetBasisEcosystemChart ¶
func (p *Ecosystem) GetBasisEcosystemChart() (*BasisEcosystemChartDataResponse, error)
func (*Ecosystem) GetEcoSystemList ¶
type EcosystemAppInfo ¶
type EcosystemAppInfo struct { AppId int64 `json:"app_id"` Contracts []ContractsParams `json:"contracts,omitempty"` Page []PageParams `json:"page,omitempty"` Snippets []SnippetsParams `json:"snippets,omitempty"` Table []TableParams `json:"table,omitempty"` Params []AppParams `json:"params,omitempty"` }
type EcosystemAppList ¶
type EcosystemDetailInfoResponse ¶
type EcosystemDetailInfoResponse struct { EcosystemId int64 `json:"ecosystem_id"` Ecosystem string `json:"ecosystem"` LogoHash string `json:"logo_hash"` BlockId int64 `json:"block_id"` Hash string `json:"hash"` Creator string `json:"creator"` EcoType string `json:"eco_type"` EcoTag string `json:"eco_tag"` EcoCascade string `json:"eco_cascade"` MultiFee bool `json:"multi_fee"` EcoIntroduction string `json:"eco_introduction"` Time int64 `json:"time"` GovernModel int64 `json:"govern_model"` GovernCommittee string `json:"govern_committee"` TokenSymbol string `json:"token_symbol"` TotalAmount string `json:"total_amount"` IsWithdraw bool `json:"is_withdraw"` Withdraw string `json:"withdraw"` IsEmission bool `json:"is_emission"` Emission string `json:"emission"` FeeModel int `json:"fee_model"` FeeModeAccount string `json:"fee_mode_account"` FeeModelVmcost FeeModeFlag `json:"vmcost"` FeeModeStorage FeeModeFlag `json:"storage"` FeeModeElement FeeModeFlag `json:"element"` FeeModeExpedite FeeModeFlag `json:"expedite"` WithholdingMode int `json:"withholding_mode"` IsCombustion bool `json:"is_combustion"` Combustion string `json:"combustion"` CombustionPercent int64 `json:"combustion_percent"` Circulations string `json:"circulations"` FollowFuel float64 `json:"follow_fuel"` Registered string `json:"registered"` Country string `json:"country"` RegistrationNo string `json:"registration_no"` RegistrationType string `json:"registration_type"` WebPage string `json:"web_page"` Social map[string]string `json:"social"` Digits int64 `json:"digits"` BridgeInfo *bridgeInfo `json:"bridge_info"` }
func GetEcosystemDetailInfo ¶
func GetEcosystemDetailInfo(search any) (*EcosystemDetailInfoResponse, error)
type EcosystemInfoMap ¶
var ( Tokens *EcosystemInfoMap EcoNames *EcosystemInfoMap EcosystemIdList []int64 EcoTxCount *EcosystemInfoMap EcoDigits *EcosystemInfoMap EcoFuelRate *EcosystemInfoMap )
func (*EcosystemInfoMap) Get ¶
func (p *EcosystemInfoMap) Get(ecosystem int64) string
func (*EcosystemInfoMap) GetFloat64 ¶
func (p *EcosystemInfoMap) GetFloat64(ecosystem int64, defaultValue float64) float64
func (*EcosystemInfoMap) GetId ¶
func (p *EcosystemInfoMap) GetId(infoId int, defaultValue string) string
func (*EcosystemInfoMap) GetInt64 ¶
func (p *EcosystemInfoMap) GetInt64(ecosystem int64, defaultValue int64) int64
func (*EcosystemInfoMap) Len ¶
func (p *EcosystemInfoMap) Len() int
type EcosystemKeysRatioResponse ¶
type EcosystemKeysRatioResponse struct { Id int64 `json:"id"` Name string `json:"name"` Number int64 `json:"number"` Ratio decimal.Decimal `json:"ratio"` }
func GetTopTenMaxKeysEcosystem ¶
func GetTopTenMaxKeysEcosystem() ([]EcosystemKeysRatioResponse, error)
type EcosystemList ¶
type EcosystemList struct { ID int64 `json:"id"` Name string `json:"name"` Info string `json:"info"` IsValued int64 `json:"isValued"` EmissionAuount string `json:"emission_auount"` TokenSymbol string `json:"token_symbol"` TypeEmission int64 `json:"type_emission"` TypeWithdraw int64 `json:"type_withdraw"` Member int64 `json:"member"` AppParams any `json:"app_params,omitempty"` Status int `json:"status"` //0:Not joined 1:join 2:unknown }
type EcosystemListResponse ¶
type EcosystemMemberList ¶
type EcosystemParameterResult ¶
type EcosystemParameterResult struct { Total int64 `json:"total"` Page int `json:"page"` Limit int `json:"limit"` Rets []StateParameter `json:"rets"` }
type EcosystemSearchResponse ¶
type EcosystemTokenSymbolList ¶
type EcosystemTokenSymbolList struct { Id int64 `json:"id"` Account string `json:"account"` AccountName string `json:"account_name"` Amount decimal.Decimal `json:"amount"` AccountedFor decimal.Decimal `json:"accounted_for"` TokenSymbol string `json:"token_symbol"` Digits int64 `json:"digits"` FrontCommittee bool `json:"front_committee"` Committee bool `json:"committee"` Activation bool `json:"activation"` }
type EcosystemTotalResponse ¶
type EcosystemTotalResponse struct { ID int64 `json:"id"` Name string `json:"name"` LogoHash string `json:"logo_hash"` GovernModel int64 `json:"govern_model"` FeeModel int `json:"fee_model"` TokenSymbol string `json:"token_symbol"` Digits int64 `json:"digits"` Creator string `json:"creator"` TotalAmount string `json:"total_amount"` Member int64 `json:"member"` Contract int64 `json:"contract"` ChainName string `json:"chain_name"` ChainId int64 `json:"chain_id"` }
type EcosystemTotalResult ¶
type EcosystemTotalResult struct { Total int64 `json:"total"` Page int `json:"page"` Limit int `json:"limit"` Sysecosy *BasisEcosystemResponse `json:"sysecosy,omitempty"` Rets *[]EcosystemTotalResponse `json:"rets,omitempty"` }
EcosystemTotalResult example
type EcosystemTxCount ¶
type EcosystemTxList ¶
type EcosystemTxRatioChart ¶
func GetEcoLibsTransaction ¶
func GetEcoLibsTransaction() ([]EcosystemTxRatioChart, error)
func GetEcoLibsTxChartDataFromRedis ¶
func GetEcoLibsTxChartDataFromRedis() ([]EcosystemTxRatioChart, error)
type EcosystemTxRatioResponse ¶
type EcosystemTxRatioResponse struct { Name string `json:"name"` Tx int64 `json:"tx"` Ratio decimal.Decimal `json:"ratio"` }
func GetTopTenEcosystemTxChart ¶
func GetTopTenEcosystemTxChart() ([]EcosystemTxRatioResponse, error)
GetTopTenEcosystemTxChart return Fifteen days transactions TODO:200-800ms NEED TO Redis
type ExportAppInfo ¶
type ExportAppInfo struct { Conditions string `json:"conditions"` Name string `json:"name"` Data []any `json:"data"` }
func EcosystemAppExport ¶
func EcosystemAppExport(appid int64) (*ExportAppInfo, error)
type FeeModeFlag ¶
type FeeModeInfo ¶
type FeeModeInfo struct { FeeModeDetail map[string]sqldb.FeeModeFlag `json:"fee_mode_detail"` Combustion Combustion `json:"combustion"` FollowFuel float64 `json:"follow_fuel"` }
type FuelRateResponse ¶
type FullNodeCityJSON ¶
type FullNodeCityJSON struct { TCPAddress string `json:"tcp_address"` APIAddress string `json:"api_address"` City string `json:"city"` Icon string `json:"icon"` //KeyID int64 `json:"key_id"` KeyID json.Number `json:"key_id"` PublicKey string `json:"public_key"` //UnbanTime json.Number `json:"unban_time,er"` UnbanTime time.Time `json:"unbantime"` }
because of PublicKey is byte
type FullNodeCityJSONHex ¶
type FullNodeCityJSONHex struct { TCPAddress string `json:"tcp_address"` APIAddress string `json:"api_address"` City string `json:"city"` Icon string `json:"icon"` //KeyID int64 `json:"key_id"` KeyID string `json:"key_id"` PublicKey string `json:"public_key"` //UnbanTime json.Number `json:"unban_time,er"` UnbanTime time.Time `json:"unbantime"` }
because of PublicKey is byte
type GasFeeChangeResponse ¶
data chart
func Get15DayGasFeeChart ¶
func Get15DayGasFeeChart() (GasFeeChangeResponse, error)
type GeneralResponse ¶
type GeneralResponse struct { Total int64 `json:"total"` Page int `json:"page"` Limit int `json:"limit"` List any `json:"list"` }
func EcosystemSearch ¶
func EcosystemSearch(search string, account string, page, limit int) (rets GeneralResponse, err error)
func Get15DayBlockSizeList ¶
func Get15DayBlockSizeList(page, limit int) (GeneralResponse, error)
func Get15DayTxList ¶
func Get15DayTxList(page, limit int) (GeneralResponse, error)
func GetContractTxDetailList ¶
func GetContractTxDetailList(hashStr string, page, limit int) (*GeneralResponse, error)
func GetDailyActiveReport ¶
func GetDailyActiveReport(page, limit int, startTime, endTime int64) (GeneralResponse, error)
func GetDaoVoteList ¶
func GetDaoVoteList(search any, page, limit int) (GeneralResponse, error)
func GetEcosystemApp ¶
func GetEcosystemApp(page, limit int, ecosystemId, appId int64, order, search string) (*GeneralResponse, error)
func GetEcosystemDatabase ¶
func GetEcosystemDatabase(page, limit, reqType int, ecosystemId int64, search, order string) (*GeneralResponse, error)
GetEcosystemDatabase reqType params: 1:tableName 2:tableColumns 3:tableRows
func GetEcosystemDetailMemberList ¶
func GetEcosystemDetailMemberList(page, limit int, order string, ecosystem int64) (*GeneralResponse, error)
func GetHonorListFromRedis ¶
func GetHonorListFromRedis(cmd string) (*GeneralResponse, error)
func GetNewEcosystemChartList ¶
func GetNewEcosystemChartList(page, limit int, order string) (GeneralResponse, error)
func GetNftMinerRegionList ¶
func GetNftMinerRegionList(page, limit int) (*GeneralResponse, error)
func GetNodeBlockList ¶
func GetNodeBlockList(search any, page, limit int, order string) (GeneralResponse, error)
func GetNodeStakingHistory ¶
func GetNodeStakingHistory(search any, page, limit int, order string) (*GeneralResponse, error)
func GetNodeVotingHistory ¶
func GetNodeVotingHistory(search any, page, limit int, order string) (*GeneralResponse, error)
func GetUtxoInputs ¶
func GetUtxoInputs(hashStr string, page, limit int) (*GeneralResponse, error)
func NodeListSearch ¶
func NodeListSearch(page, limit int, order string) (*GeneralResponse, error)
type GovernModelRatioResponse ¶
type GovernModelRatioResponse struct { DAOGovernance int64 `json:"dao_governance"` DAORatio decimal.Decimal `json:"dao_ratio"` CreatorModel int64 `json:"creator_model"` CreatorRatio decimal.Decimal `json:"creator_ratio"` }
func GetEcosystemGovernModelChart ¶
func GetEcosystemGovernModelChart() (GovernModelRatioResponse, error)
type HashParams ¶
type HashParams struct { Hash string HArray []string //[]string{"key1", "value1", "key2", "value2",...} HMap map[string]any //map[string]interface{}{"key1": "value1", "key2": value2,...} Value string ValueMap map[string]string }
func (*HashParams) HArraySet ¶
func (rp *HashParams) HArraySet() error
func (*HashParams) HDel ¶
func (rp *HashParams) HDel(keys ...string) error
HDel delete hash table keys
func (*HashParams) HExists ¶
func (rp *HashParams) HExists(key string) (bool, error)
HExists hash table key exists
func (*HashParams) HGet ¶
func (rp *HashParams) HGet(key string) error
func (*HashParams) HGetAll ¶
func (rp *HashParams) HGetAll() error
func (*HashParams) HLen ¶
func (rp *HashParams) HLen() (int64, error)
HLen return hash table keys len
func (*HashParams) HMapSet ¶
func (rp *HashParams) HMapSet() error
func (*HashParams) HSet ¶
func (rp *HashParams) HSet(values ...any) error
HSet example: "key1", "value1", "key2", value2 ...
func (*HashParams) HSetMapValue ¶
func (rp *HashParams) HSetMapValue(key string, value any)
type HashTransactionResult ¶
type HashTransactionResult struct { Total int64 `json:"total" ` Page int `json:"page" ` Limit int `json:"limit"` TxInfo *TxListRet `json:"tx_info,omitempty"` Rets []BlockTxDetailedInfoHex `json:"rets"` }
type History ¶
type History struct { ID int64 `gorm:"primary_key;not null"` Senderid int64 `gorm:"column:sender_id;not null"` Recipientid int64 `gorm:"column:recipient_id;not null"` SenderBalance decimal.Decimal `gorm:"column:sender_balance;not null"` RecipientBalance decimal.Decimal `gorm:"column:recipient_balance;not null"` Amount decimal.Decimal `gorm:"column:amount;not null"` ValueDetail string `gorm:"column:value_detail;not null"` Comment string `gorm:"column:comment;not null"` Blockid int64 `gorm:"column:block_id;not null"` Txhash []byte `gorm:"column:txhash;not null"` Createdat int64 `gorm:"column:created_at;not null"` Ecosystem int64 `gorm:"not null"` Type int64 `gorm:"not null"` Status int32 `gorm:"not null"` }
History represent record of history table
func (*History) Get24HourTxAmount ¶
func (*History) GetAccountHistoryTotals ¶
func (th *History) GetAccountHistoryTotals(id int64, keyId int64) (*WalletHistoryHex, error)
func (*History) GetBlockRewardById ¶
func (th *History) GetBlockRewardById(blockId int64) (*BlockListResponse, error)
func (*History) GetEcosytemWallets ¶
func (th *History) GetEcosytemWallets(id int64, page int, size int, wallet string, searchType string) (*[]HistoryHex, int64, decimal.Decimal, error)
GetEcosytemWallets Get is retrieving model from database
func (*History) GetExplorer ¶
func (th *History) GetExplorer(txHash []byte) (*HistoryExplorer, error)
GetExplorer Not all transactions will exist in the history table
func (*History) GetGasFeeByTxHashList ¶
func (th *History) GetGasFeeByTxHashList(txHash [][]byte) (*BlockListResponse, error)
func (*History) GetHashSum ¶
func (*History) GetHistory ¶
GetHistory Get is retrieving model from database
func (*History) GetHistoryIdList ¶
func (*History) GetHistoryTimeList ¶
func (*History) GetHistorys_Sqlite ¶
func (th *History) GetHistorys_Sqlite(page int, size int, order string) (*[]HistoryHex, int64, error)
Get is retrieving model from database
func (*History) GetTodayCirculationsAmount ¶
func (*History) GetTxListExplorer ¶
func (*History) GetWalletTimeLineHistoryTotals ¶
func (*History) GetWalletTotals_Sqlites ¶
func (th *History) GetWalletTotals_Sqlites(wallet string) (*WalletHistoryHex, error)
func (*History) GetWallets ¶
func (th *History) GetWallets(page int, size int, wallet string, searchType string) (*[]HistoryHex, int64, decimal.Decimal, error)
GetWallets Get is retrieving model from database
func (*History) GetWallets_EcosytemSqlite ¶
func (th *History) GetWallets_EcosytemSqlite(id int64, page int, size int, wallet string, searchType string) (*[]HistoryHex, int64, decimal.Decimal, error)
Get is retrieving model from database
func (*History) GetWallets_Sqlite ¶
func (th *History) GetWallets_Sqlite(page int, size int, wallet string, searchType string) (*[]HistoryHex, int64, decimal.Decimal, error)
Get is retrieving model from database
func (*History) Get_Sqlite ¶
func (th *History) Get_Sqlite(txHash []byte) (*HistoryMergeHex, error)
type HistoryExplorer ¶
type HistoryExplorer struct { Fees HistoryItem `json:"fees"` Taxes HistoryItem `json:"taxes"` GasFee struct { Amount decimal.Decimal `json:"amount"` Digits int64 `json:"digits"` TokenSymbol string `json:"token_symbol,omitempty"` } `json:"gas_fee"` Detail transDetail `json:"detail"` EcoDetail *ecoExplorer `json:"eco_detail,omitempty"` Status int32 `json:"status"` }
type HistoryHex ¶
type HistoryHex struct { ID int64 `json:"id,omitempty"` Senderid string `json:"sender_id"` Recipientid string `json:"recipient_id"` SenderBalance decimal.Decimal `json:"sender_balance"` RecipientBalance decimal.Decimal `json:"recipient_balance"` Amount decimal.Decimal `json:"amount"` Comment string `json:"comment"` BlockId int64 `json:"block_id"` Txhash string `json:"txhash"` Createdat int64 `json:"created_at"` Ecosystem int64 `json:"ecosystem"` Type int64 `json:"type"` Ecosystemname string `json:"ecosystemname"` TokenSymbol string `json:"token_symbol"` ContractName string `json:"contract_name"` }
type HistoryItem ¶
type HistoryItem struct { Senderid string `json:"sender_id"` Recipientid string `json:"recipient_id"` Amount decimal.Decimal `json:"amount"` Events int64 `json:"events,omitempty"` Scale float64 `json:"scale,omitempty"` Flag int `json:"flag,omitempty"` TokenSymbol string `json:"token_symbol,omitempty"` Combustion string `json:"combustion,omitempty"` FuelRate int64 `json:"fuel_rate,omitempty"` Digits int64 `json:"digits"` }
type HistoryMergeHex ¶
type HistoryMergeHex struct { Ecosystem int64 `json:"ecosystem"` ID int64 `json:"id"` Senderid string `json:"sender_id"` Recipientid1 string `json:"recipientid1"` Recipientid2 string `json:"recipientid2,omitempty"` Recipientid3 string `json:"recipientid3,omitempty"` Recipientid4 string `json:"recipientid4,omitempty"` Amount1 decimal.Decimal `json:"amount1,omitempty"` Amount2 decimal.Decimal `json:"amount2,omitempty"` Amount3 decimal.Decimal `json:"amount3,omitempty"` Amount4 decimal.Decimal `json:"amount4,omitempty"` Comment string `json:"comment"` Blockid int64 `json:"blockid"` Txhash string `json:"txhash"` Createdat time.Time `json:"created_at"` Ecosystemname string `json:"ecosystemname"` TokenSymbol string `json:"token_symbol"` }
type HistoryTransaction ¶
type HistoryTransaction struct { ID int64 `json:"id"` Keyid string `json:"key_id"` Blockid int64 `json:"block_id"` Txhash string `json:"txhash"` Createdat int64 `json:"created_at"` Ecosystem int64 `json:"ecosystem"` Ecosystemname string `json:"ecosystemname"` ContractName string `json:"contract_name"` }
type HonorNodeChart ¶
type HonorNodeInfo ¶
type HonorNodeInfo struct { ID int64 `gorm:"primary_key;not null"` Value string `json:"value,omitempty" gorm:"not null;type:jsonb"` Address string `json:"address,omitempty" gorm:"not null"` Latitude float64 `json:"latitude,omitempty" gorm:"not null"` Longitude float64 `json:"longitude,omitempty" gorm:"not null"` Display bool `json:"display,omitempty" gorm:"not null"` }
func (*HonorNodeInfo) DelRedis ¶
func (p *HonorNodeInfo) DelRedis()
func (*HonorNodeInfo) GetNodeList ¶
func (p *HonorNodeInfo) GetNodeList() (node []storage.HonorNodeModel, err error)
func (*HonorNodeInfo) GetRedis ¶
func (p *HonorNodeInfo) GetRedis() (bool, string)
func (*HonorNodeInfo) InsertRedis ¶
func (p *HonorNodeInfo) InsertRedis()
func (*HonorNodeInfo) TableName ¶
func (p *HonorNodeInfo) TableName() string
type HonorNodeListResponse ¶
type HonorNodeListResponse struct { NodeName string `json:"node_name"` KeyID string `json:"key_id"` Country string `json:"country"` IconUrl string `json:"icon_url"` GasFee string `json:"gas_fee"` NodeBlocks int64 `json:"node_blocks"` PkgAccountedFor decimal.Decimal `json:"pkg_accounted_for"` NodePosition int64 `json:"node_position"` // contains filtered or unexported fields }
type HonorNodeMapResponse ¶
type HonorNodeMapResponse struct { //LatestBlock string `json:"latest_block"` //LatestNodePosition string `json:"latest_node_position"` //LatestConsensusMode int32 `json:"latest_consensus_mode"` NodePositionInfo List []NodePositionInfo `json:"list"` }
func GetHonorNodeMap ¶
func GetHonorNodeMap() (*HonorNodeMapResponse, error)
func GetHonorNodeMapFromRedis ¶
func GetHonorNodeMapFromRedis() (*HonorNodeMapResponse, error)
type IName ¶
type InfoBlock ¶
type InfoBlock struct { Hash []byte `gorm:"not null"` EcosystemID int64 `gorm:"not null default 0"` KeyID int64 `gorm:"not null default 0"` NodePosition string `gorm:"not null default 0"` BlockID int64 `gorm:"not null"` Time int64 `gorm:"not null"` CurrentVersion string `gorm:"not null"` Sent int8 `gorm:"not null"` RollbacksHash []byte `gorm:"not null"` ConsensusMode int32 `gorm:"not null"` }
InfoBlock is model
type Key ¶
type Key struct { Ecosystem int64 ID int64 `gorm:"primary_key;not null"` PublicKey []byte `gorm:"column:pub;not null"` Amount decimal.Decimal `gorm:"not null"` Maxpay decimal.Decimal `gorm:"not null"` Deposit decimal.Decimal `gorm:"not null"` Multi int64 `gorm:"not null"` Deleted int64 `gorm:"not null"` Blocked int64 `gorm:"not null"` Account string `gorm:"column:account;not null"` Lock string `gorm:"column:lock;type:jsonb"` }
Key is model
func (*Key) GetAccountList ¶
func (m *Key) GetAccountList(page, limit int, ecosystem int64) (*KeysListResult, error)
func (*Key) GetEcosystemTokenSymbolList ¶
func (k *Key) GetEcosystemTokenSymbolList(page, limit int, ecosystem int64) (*GeneralResponse, error)
func (*Key) GetKeyDetail ¶
func (m *Key) GetKeyDetail(keyId int64, wallet string) (*EcosyKeyTotalHex, error)
func (*Key) GetStakeAmount ¶
func (*Key) GetWalletTotalBasisEcosystem ¶
func (m *Key) GetWalletTotalBasisEcosystem(wallet string) (*EcosyKeyTotalHex, error)
func (*Key) GetWalletTotalEcosystem ¶
func (m *Key) GetWalletTotalEcosystem(page, limit int, order string, wallet string) (*GeneralResponse, error)
GetWalletTotalEcosystem response 10-20ms The modified 4-9ms
func (*Key) SetTablePrefix ¶
SetTablePrefix is setting table prefix
type KeyChangeChart ¶
type KeyHex ¶
type KeyHex struct { Ecosystem int64 `json:"ecosystem"` ID string `json:"id"` PublicKey string `json:"publickey"` Amount string `json:"amount"` Maxpay decimal.Decimal `json:"maxpay"` Multi int64 `json:"multi"` Deleted int64 `json:"deleted"` Blocked int64 `json:"blocked"` Ecosystemname string `json:"ecosystemname"` TokenSymbol string `json:"token_symbol"` }
type KeyInfoChart ¶
type KeyInfoChart struct { Name string `json:"name,omitempty"` Time []int64 `json:"time"` NewKey []int64 `json:"new_key,omitempty"` ActiveKey []int64 `json:"active_key,omitempty"` }
func Get15DaysNewKeyFromRedis ¶
func Get15DaysNewKeyFromRedis(ecosystem int64) (*KeyInfoChart, error)
func GetFifteenDaysActiveKeysFromRedis ¶
func GetFifteenDaysActiveKeysFromRedis(ecosystem int64) (*KeyInfoChart, error)
type KeysListChartResult ¶
type KeysListChartResult struct { KeysInfo KeysRet `json:"keys_info"` KeyChart KeyInfoChart `json:"key_chart"` }
func GetAccountListChart ¶
func GetAccountListChart(ecosystem int64) (*KeysListChartResult, error)
type KeysListResult ¶
type KeysListResult struct { Total int64 `json:"total"` Page int `json:"page"` Limit int `json:"limit"` Rets []EcosyKeyList `json:"rets"` }
type KeysResult ¶
type KeysResult struct { Total int64 `json:"total"` Page int `json:"page"` Limit int `json:"limit"` Rets []EcosyKeyTotalHex `json:"rets"` }
type Language ¶
type LanguagesParams ¶
type LeaderboardSlice ¶
type LeaderboardSlice []storage.HonorNodeModel // Sort by LeaderboardSlice.number from largest to smallest
func (LeaderboardSlice) Len ¶
func (a LeaderboardSlice) Len() int
func (LeaderboardSlice) Less ¶
func (a LeaderboardSlice) Less(i, j int) bool
func (LeaderboardSlice) Swap ¶
func (a LeaderboardSlice) Swap(i, j int)
type LogTransaction ¶
type LogTransaction struct { Hash []byte `gorm:"primary_key;not null"` Block int64 `gorm:"not null"` Timestamp int64 `gorm:"not null"` ContractName string `gorm:"not null"` Address int64 `gorm:"not null"` EcosystemID int64 `gorm:"not null"` Status int32 `gorm:"not null"` }
LogTransaction is model
func (*LogTransaction) GetBlockFirst ¶
func (lt *LogTransaction) GetBlockFirst(block int64) (bool, error)
func (*LogTransaction) GetBlockIdByHash ¶
func (lt *LogTransaction) GetBlockIdByHash(hash []byte) (bool, error)
func (*LogTransaction) GetBlockTransactions ¶
func (lt *LogTransaction) GetBlockTransactions(page int, limit int, order string, reqType int) (*[]BlockTxDetailedInfoHex, int64, error)
func (*LogTransaction) GetByHash ¶
func (lt *LogTransaction) GetByHash(hash []byte) (bool, error)
GetByHash returns LogTransactions existence by hash
func (*LogTransaction) GetContract ¶
func (lt *LogTransaction) GetContract(hash []byte) (bool, error)
func (*LogTransaction) GetEcosystemAccountTransaction ¶
func (lt *LogTransaction) GetEcosystemAccountTransaction(ecosystem int64, page int, size int, wallet string, where map[string]any) (*GeneralResponse, error)
func (*LogTransaction) GetEcosystemTransactionFind ¶
func (lt *LogTransaction) GetEcosystemTransactionFind(ecosystem int64, page, limit int, order, search string, where map[string]any) (*[]EcoTxListResponse, int64, error)
func (*LogTransaction) GetLast ¶
func (lt *LogTransaction) GetLast() (bool, error)
func (LogTransaction) TableName ¶
func (m LogTransaction) TableName() string
TableName returns name of table
func (*LogTransaction) UnmarshalTransaction ¶
func (lt *LogTransaction) UnmarshalTransaction(txData []byte) (*TxDetailedInfoHex, error)
type Member ¶
type Member struct { Ecosystem int64 ID int64 `gorm:"primary_key;not null"` MemberName string `gorm:"not null"` ImageID *int64 MemberInfo string `gorm:"type:jsonb(PostgreSQL)"` }
Member represents a ecosystem member
func (*Member) SetTablePrefix ¶
SetTablePrefix is setting table prefix
type MenuParams ¶
type MineGpsInfo ¶
type MineGpsInfo struct { ID int64 `gorm:"primary_key;not null"` Devid int64 `gorm:"not null"` Ip string `gorm:"not null"` Location string `gorm:"not null"` Longitude string `gorm:"not null"` Latitude string `gorm:"not null"` DateUpdated int64 `gorm:"not null" example:"2019-07-19 17:45:31"` DateCreated int64 `gorm:"not null" example:"2019-07-19 17:45:31"` }
type MineHistoryRequest ¶
type MineIncomehistory ¶
type MineIncomehistory struct { ID int64 `gorm:"primary_key;not null"` Devid int64 `gorm:"not null"` Keyid int64 `gorm:"not null"` Mineid int64 `gorm:"not null"` Amount decimal.Decimal `gorm:"not null"` Type int64 `gorm:"not null"` Nonce int64 `gorm:"not null"` Mine_incomehistory_hash []byte `gorm:"not null` Block_id int64 `gorm:"not null"` Date_created int64 `gorm:"not null default 0"` }
func (*MineIncomehistory) GetRedisByhash ¶
func (b *MineIncomehistory) GetRedisByhash(hash []byte) (bool, error)
func (*MineIncomehistory) GetRedisbyid ¶
func (b *MineIncomehistory) GetRedisbyid(id int64) (bool, error)
func (*MineIncomehistory) Insert_redis ¶
func (b *MineIncomehistory) Insert_redis() error
func (*MineIncomehistory) Marshal ¶
func (b *MineIncomehistory) Marshal() ([]byte, error)
func (MineIncomehistory) TableName ¶
func (m MineIncomehistory) TableName() string
func (*MineIncomehistory) Unmarshal ¶
func (b *MineIncomehistory) Unmarshal(bt []byte) error
type MineInfo ¶
type MineInfo struct { ID int64 `gorm:"primary_key not null" example:"1"` // Devid int64 `gorm:"not null unique" example:"1"` // Number string `gorm:"not null" example:"1"` // Name string `gorm:"not null" example:"1"` // Mine_info_pub_key []byte `gorm:"not null" example:"1"` // //Mine_info_pri_key []byte `gorm:"not null" example:"1"` // Mine_info_active_pub_key []byte `gorm:"not null" example:"1"` // //Mine_info_active_pri_key []byte `gorm:"not null" example:"1"` // Active_key_id int64 `gorm:"not null" example:"1"` // Type int64 `gorm:"not null" example:"1"` // Maxcapacity int64 `gorm:"not null" example:"1"` // Capacity int64 `gorm:"not null" example:"1"` // Mincapacity int64 `gorm:"not null" example:"1"` // Status int64 `gorm:"not null" example:"1"` // Ip string `gorm:"not null" example:"1"` // Location string `gorm:"not null" example:"1"` // Gps string `gorm:"not null" example:"1"` // Version string `gorm:"not null" example:"1"` // Ver int64 `gorm:"not null" example:"1"` // Atime int64 `gorm:"not null default 0"` // ValidTime int64 `gorm:"not null default 0"` // Stime int64 `gorm:"not null default 0"` // Etime int64 `gorm:"not null default 0"` // Date_created int64 `gorm:"not null default 0"` // }
MineInfo example
func (*MineInfo) GetGuardianNodeCapacity ¶
type MinePledgeStatus ¶
type MinePledgeStatus struct { Id int64 Number int64 `gorm:"null" example:"1"` // Devid int64 `gorm:"primary_key;not null" example:"1823-6253-5248-2211-6348"` //ID Keyid int64 `gorm:"not null" example:"7994306939897545753"` //ID Poolid int64 `gorm:"not null" example:"7994306939897545753"` MineType int64 `gorm:"not null" example:"1"` // MineNumber string `gorm:"not null" example:"P9Mv0FeQ73"` // MineCapacity int64 `gorm:"not null" example:"1"` Cycle int64 `gorm:"not null" example:"30"` // Amount decimal.Decimal `gorm:"not null default 0" example:"100"` // Expired int64 `gorm:"null" ` Status int64 `gorm:"null" example:"1"` // Online int64 `gorm:"null" example:"1"` // Review int64 `gorm:"null default 0" example:"1"` // Count int64 `gorm:"null default 0" example:"1"` // Pledges int64 `gorm:"null" example:"0"` // Transfers int64 `gorm:"null" example:"0"` // Stime int64 `gorm:"not null" example:"2019-07-19 17:45:31"` // Etime int64 `gorm:"not null" example:"2019-07-19 17:45:31"` // DateUpdated int64 `gorm:"not null" example:"2019-07-19 17:45:31"` // DateCreated int64 `gorm:"not null default 0"` // }
MinePledgeStatus example
func (*MinePledgeStatus) GetCastNodeandGuardianNode ¶
func (m *MinePledgeStatus) GetCastNodeandGuardianNode() (int64, int64, int64, error)
func (MinePledgeStatus) TableName ¶
func (MinePledgeStatus) TableName() string
TableName returns name of table
type MultiFeeEcosystemRatioResponse ¶
type MultiFeeEcosystemRatioResponse struct { MultiFee int64 `json:"multi_fee"` MultiFeeRatio decimal.Decimal `json:"multi_fee_ratio"` UnMultiFee int64 `json:"un_multi_fee"` UnMultiFeeRatio decimal.Decimal `json:"un_multi_fee_ratio"` }
func GetMultiFeeEcosystemChart ¶
func GetMultiFeeEcosystemChart() (MultiFeeEcosystemRatioResponse, error)
type NewKeyHistoryChart ¶
func GetNewKeysChart ¶
func GetNewKeysChart() (NewKeyHistoryChart, error)
type NewNftChangeChartResponse ¶
type NewNftChangeChartResponse struct { Time []int64 `json:"time"` New []int64 `json:"new"` Stake []int64 `json:"stake"` Ratio []decimal.Decimal `json:"ratio"` }
func GetNewNftMinerChangeChart ¶
func GetNewNftMinerChangeChart() (NewNftChangeChartResponse, error)
type NftMinerCoordinate ¶
type NftMinerEnergyPowerChangeResponse ¶
type NftMinerEnergyPowerChangeResponse struct { Time []string `json:"time"` EnergyPower []string `json:"energy_power"` }
func GetNftEnergyPowerChangeChart ¶
func GetNftEnergyPowerChangeChart() (NftMinerEnergyPowerChangeResponse, error)
type NftMinerEvents ¶
type NftMinerEvents struct { ID int64 `gorm:"primary_key;not null"` TokenId int64 `gorm:"column:token_id;not null"` TokenHash []byte `gorm:"column:token_hash;not null"` Event string `gorm:"column:event;not null"` ContractName string `gorm:"column:contract_name;not null"` DateCreated int64 `gorm:"column:date_created;not null"` TxHash []byte `gorm:"column:tx_hash;not null"` Source string `gorm:"column:source"` }
func (*NftMinerEvents) GetByTokenHash ¶
func (p *NftMinerEvents) GetByTokenHash(tokenHash string) (bool, error)
func (*NftMinerEvents) GetByTokenId ¶
func (p *NftMinerEvents) GetByTokenId(tokenId int64) (bool, error)
func (*NftMinerEvents) GetNftHistoryInfo ¶
func (p *NftMinerEvents) GetNftHistoryInfo(search any, page, limit int, order string) (*GeneralResponse, error)
func (*NftMinerEvents) TableName ¶
func (p *NftMinerEvents) TableName() string
type NftMinerFindRequest ¶
type NftMinerFindRequest struct {
Keyid string `json:"keyid"`
}
type NftMinerInfoChart ¶
type NftMinerInfoRequest ¶
type NftMinerInfoResponse ¶
type NftMinerInfoResponse struct { ID int64 `json:"id"` //NFT Miner ID Hash string `json:"hash"` //NFT Miner hash EnergyPoint int `json:"energy_point"` StakeCount int64 `json:"stake_count"` StakeAmount decimal.Decimal `json:"stake_amount"` //starking Owner string `json:"owner"` //owner account Creator string `json:"creator"` //owner account RewardCount int64 `json:"reward_count"` Cycle int64 `json:"cycle"` DateCreated int64 `json:"date_created"` //create time Ins string `json:"ins"` EnergyPower int64 `json:"energy_power"` }
type NftMinerIntervalResponse ¶
type NftMinerIntervalResponse struct { Time string `json:"time,omitempty"` OneToTen int64 `json:"one_to_ten"` TenToTwenty int64 `json:"ten_to_twenty"` TwentyToThirty int64 `json:"twenty_to_thirty"` ThirtyToForty int64 `json:"thirty_to_forty"` FortyToFifty int64 `json:"forty_to_fifty"` FiftyToSixty int64 `json:"fifty_to_sixty"` SixtyToSeventy int64 `json:"sixty_to_seventy"` SeventyToEighty int64 `json:"seventy_to_eighty"` EightyToNinety int64 `json:"eighty_to_ninety"` NinetyToHundred int64 `json:"ninety_to_hundred"` }
func GetNftMinerIntervalChart ¶
func GetNftMinerIntervalChart() (NftMinerIntervalResponse, error)
func GetNftMinerIntervalListChart ¶
func GetNftMinerIntervalListChart() ([]NftMinerIntervalResponse, error)
type NftMinerItems ¶
type NftMinerItems struct { ID int64 `gorm:"primary_key;not null"` //NFT ID EnergyPoint int `gorm:"column:energy_point;not null"` //power Owner string `gorm:"column:owner;not null"` //owner account Creator string `gorm:"column:creator;not null"` //create account MergeCount int64 `gorm:"column:merge_count;not null"` //merage count MergeStatus int64 `gorm:"column:merge_status;not null"` //1:un merge(valid) 0:merge(invalid) Attributes string `gorm:"column:attributes;not null"` //SVG Params TempId int64 `gorm:"column:temp_id;not null"` DateCreated int64 `gorm:"column:date_created;not null"` //create time Coordinates string `gorm:"column:coordinates;type:jsonb"` TokenHash []byte `gorm:"column:token_hash"` TxHash []byte `gorm:"column:tx_hash"` }
func (*NftMinerItems) GetAccountDetailNftMinerInfo ¶
func (p *NftMinerItems) GetAccountDetailNftMinerInfo(keyid, order string, page, limit int) (*AccountNftMinerListResult, error)
func (*NftMinerItems) GetAllPower ¶
func (p *NftMinerItems) GetAllPower() (int64, error)
func (*NftMinerItems) GetByTokenHash ¶
func (p *NftMinerItems) GetByTokenHash(tokenHash string) (bool, error)
func (*NftMinerItems) GetNftMetaverse ¶
func (p *NftMinerItems) GetNftMetaverse() (*NftMinerMetaverseInfoResponse, error)
func (*NftMinerItems) GetNftMinerBySearch ¶
func (p *NftMinerItems) GetNftMinerBySearch(search string) (NftMinerInfoResponse, error)
func (*NftMinerItems) GetNftMinerTxInfo ¶
func (p *NftMinerItems) GetNftMinerTxInfo(search any, page, limit int, order string) (*GeneralResponse, error)
func (*NftMinerItems) NftMinerMetaverseList ¶
func (p *NftMinerItems) NftMinerMetaverseList(page, limit int, order string) (GeneralResponse, error)
func (*NftMinerItems) ParseSvgParams ¶
func (p *NftMinerItems) ParseSvgParams() (string, error)
func (*NftMinerItems) TableName ¶
func (p *NftMinerItems) TableName() string
type NftMinerListResponse ¶
type NftMinerListResponse struct { ID int64 `json:"id"` //NFT Miner ID Hash string `json:"hash"` EnergyPoint int `json:"energy_point"` Owner string `json:"owner"` StakeAmount decimal.Decimal `json:"stake_amount"` EnergyPower int64 `json:"energy_power"` Time int64 `json:"time"` Ins string `json:"ins"` }
type NftMinerMetaverseInfoResponse ¶
type NftMinerMetaverseInfoResponse struct { Count int64 `json:"count"` ValidCount int64 `json:"valid_count"` BlockReward float64 `json:"block_reward"` HalveNumber int64 `json:"halve_number"` StakeAmounts string `json:"stake_amounts"` EnergyPower decimal.Decimal `json:"energy_power"` RewardAmount string `json:"reward_amount"` StakedCount int64 `json:"staked_count"` StakingCount int64 `json:"staking_count"` Region int64 `json:"region"` ValidRegion int64 `json:"valid_region"` }
type NftMinerRet ¶
type NftMinerRet struct { Count int64 `json:"count"` BlockReward float64 `json:"block_reward"` HalveNumber int64 `json:"halve_number"` StakeAmounts string `json:"stake_amounts"` }
Nft Miner
type NftMinerStakeInfoResponse ¶
type NftMinerStakeInfoResponse struct { ID int64 `json:"id"` NftId int64 `json:"nft_id"` TxHash string `json:"tx_hash"` BlockId int64 `json:"block_id"` Time int64 `json:"time"` StakeAmount int64 `json:"stake_amount"` //starking Cycle int64 `json:"cycle"` EnergyPower string `json:"energy_power"` StakeStatus bool `json:"stake_status"` }
type NftMinerStaking ¶
type NftMinerStaking struct { ID int64 `gorm:"primary_key;not null"` //ID TokenId int64 `gorm:"column:token_id;not null"` //NFT Miner ID StakeAmount decimal.Decimal `gorm:"column:stake_amount;not null"` //starking EnergyPower int64 `gorm:"column:energy_power;not null"` EnergyPoint int64 `gorm:"column:energy_point;not null"` Source int64 `gorm:"column:source;not null"` //source StartDated int64 `gorm:"column:start_dated;not null"` //start time EndDated int64 `gorm:"column:end_dated;not null"` //end time Staker string `gorm:"column:staker;not null"` //owner account StakingStatus int64 `gorm:"column:staking_status;not null"` WithdrawDate int64 `gorm:"column:withdraw_date;not null"` //withdraw time }
func (*NftMinerStaking) GetAllStakeAmount ¶
func (p *NftMinerStaking) GetAllStakeAmount() (int64, decimal.Decimal, error)
func (*NftMinerStaking) GetAllStakeAmountByStaker ¶
func (p *NftMinerStaking) GetAllStakeAmountByStaker(keyid string) (int64, string, error)
func (*NftMinerStaking) GetByTokenId ¶
func (p *NftMinerStaking) GetByTokenId(tokenId int64) (bool, error)
func (*NftMinerStaking) GetNftMinerStakeInfo ¶
func (p *NftMinerStaking) GetNftMinerStakeInfo(search any, page, limit int, order string) (*GeneralResponse, error)
func (*NftMinerStaking) GetNftStakeByTokenId ¶
func (p *NftMinerStaking) GetNftStakeByTokenId(tokenId int64) (bool, error)
func (*NftMinerStaking) TableName ¶
func (p *NftMinerStaking) TableName() string
type NftMinerStakingChangeResponse ¶
type NftMinerStakingChangeResponse struct { Time []string `json:"time"` StakeAmount []int64 `json:"stake_amount"` Number []int64 `json:"number"` }
func GetNftMinerStakedChangeChart ¶
func GetNftMinerStakedChangeChart() (NftMinerStakingChangeResponse, error)
type NftMinerSummaryResponse ¶
type NftMinerTxInfoResponse ¶
type NodeBlockListResponse ¶
type NodeBlockListResponse struct { BlockId int64 `json:"block_id"` Time int64 `json:"time"` Tx int32 `json:"tx"` EcoNumber int `json:"eco_number"` GasFee1 GasFee `json:"gas_fee_1"` //IBXC GasFee2 GasFee `json:"gas_fee_2"` GasFee3 GasFee `json:"gas_fee_3"` GasFee4 GasFee `json:"gas_fee_4"` GasFee5 GasFee `json:"gas_fee_5"` }
type NodeChangeResponse ¶
type NodeChangeResponse struct { HonorNodeChart NewHonor []string `json:"new_honor"` //need add }
func GetNodeChangeChart ¶
func GetNodeChangeChart() (NodeChangeResponse, error)
type NodeContributionChartResponse ¶
type NodeContributionChartResponse struct { Country []string `json:"country"` NodeBlock []int64 `json:"node_block"` }
func GetNodeContributionChart ¶
func GetNodeContributionChart() (NodeContributionChartResponse, error)
type NodeContributionListResponse ¶
type NodeContributionListResponse struct { Total int64 `json:"total"` Page int `json:"page"` Limit int `json:"limit"` List []HonorNodeListResponse `json:"list"` }
func GetNodeContributionList ¶
func GetNodeContributionList(page, limit int) (NodeContributionListResponse, error)
type NodeDetailResponse ¶
type NodeDetailResponse struct { NodeListResponse StakeRate string `json:"stake_rate"` Account string `json:"account"` }
func NodeDetail ¶
func NodeDetail(id int64) (NodeDetailResponse, error)
type NodeListResponse ¶
type NodeListResponse struct { Ranking int64 `json:"ranking"` Id int64 `json:"id"` IconUrl string `json:"icon_url"` Name string `json:"name"` Website string `json:"website"` ApiAddress string `json:"api_address"` Address string `json:"address"` Packed int64 `json:"packed"` PackedRate string `json:"packed_rate"` Vote string `json:"vote"` VoteRate string `json:"vote_rate"` VoteTrend int `json:"vote_trend"` //0:unknown 1:Up 2:Down 3:Equal Staking string `json:"staking"` FrontCommittee bool `json:"front_committee"` Committee bool `json:"committee"` }
type NodeMapResponse ¶
type NodeMapResponse struct { CandidateTotal int64 `json:"candidate_total"` HonorTotal int64 `json:"honor_total"` NodeList []Positioning `json:"node_list"` }
Node Related
type NodePositionInfo ¶
type NodePositionInfo struct { Id int64 `json:"id"` NodeName string `json:"node_name"` Latitude string `json:"latitude"` Longitude string `json:"longitude"` NodePosition string `json:"node_position"` Block string `json:"block"` NodeBlock string `json:"node_block"` ConsensusMode int32 `json:"consensus_mode"` ApiAddress string `json:"api_address"` }
type NodeVoteChangeResponse ¶
type NodeVoteHistoryResponse ¶
type NodeVoteHistoryResponse struct { Vote int64 `json:"vote"` NodeStakingHistoryResponse }
type NodeVoteResponse ¶
type NullType ¶
type NullType byte
const ( // IsNull the same as `is null` IsNull NullType // IsNotNull the same as `is not null` IsNotNull )
type OptionalInfo ¶
type PageParams ¶
type PlatformParameter ¶
type PlatformParameter struct { ID int64 `gorm:"primary_key;not null;" json:"id"` Name string `gorm:"not null;size:255" json:"name"` Value string `gorm:"not null" json:"value"` Conditions string `gorm:"not null" json:"conditions"` }
PlatformParameter is model
func (*PlatformParameter) FindAppParameters ¶
func (sp *PlatformParameter) FindAppParameters(page int, size int, name, order string) (num int64, rets []PlatformParameter, err error)
func (*PlatformParameter) Get ¶
func (sp *PlatformParameter) Get(name string) (bool, error)
Get is retrieving model from database
func (*PlatformParameter) GetJSONField ¶
func (sp *PlatformParameter) GetJSONField(jsonField string, name string) (string, error)
GetJSONField returns fields as json
func (*PlatformParameter) GetValueParameterByName ¶
func (sp *PlatformParameter) GetValueParameterByName(name, value string) (*string, error)
GetValueParameterByName returns value parameter by name
func (PlatformParameter) TableName ¶
func (sp PlatformParameter) TableName() string
TableName returns name of table
func (*PlatformParameter) ToMap ¶
func (sp *PlatformParameter) ToMap() map[string]string
ToMap is converting PlatformParameter to map
type Point ¶
Represents a Physical Point in geographic notation [lat, lng].
func NewPoint ¶
NewPoint returns a new Point populated by the passed in latitude (lat) and longitude (lng) values.
func (*Point) BearingTo ¶
BearingTo: Calculates the initial bearing (sometimes referred to as forward azimuth) Original Implementation from: http://www.movable-type.co.uk/scripts/latlong.html
func (*Point) GreatCircleDistance ¶
GreatCircleDistance: Calculates the Haversine distance between two points in kilometers. Original Implementation from: http://www.movable-type.co.uk/scripts/latlong.html
func (*Point) MarshalBinary ¶
MarshalBinary renders the current point to a byte slice. Implements the encoding.BinaryMarshaler Interface.
func (*Point) MarshalJSON ¶
MarshalJSON renders the current Point to valid JSON. Implements the json.Marshaller Interface.
func (*Point) MidpointTo ¶
MidpointTo: Calculates the midpoint between 'this' point and the supplied point. Original implementation from http://www.movable-type.co.uk/scripts/latlong.html
func (*Point) PointAtDistanceAndBearing ¶
PointAtDistanceAndBearing returns a Point populated with the lat and lng coordinates by transposing the origin point the passed in distance (in kilometers) by the passed in compass bearing (in degrees). Original Implementation from: http://www.movable-type.co.uk/scripts/latlong.html
func (*Point) UnmarshalBinary ¶
func (*Point) UnmarshalJSON ¶
UnmarshalJSON decodes the current Point from a JSON body. Throws an error if the body of the point cannot be interpreted by the JSON body
type Polygon ¶
type Polygon struct {
Points []*Point `json:"points"`
}
A Polygon is carved out of a 2D plane by a set of (possibly disjoint) contours. It can thus contain holes, and can be self-intersecting.
func NewPolygon ¶
NewPolygon: Creates and returns a new pointer to a Polygon composed of the passed in points. Points are considered to be in order such that the last point forms an edge with the first point.
func (*Polygon) Contains ¶
Contains returns whether or not the current Polygon contains the passed in Point.
type Positioning ¶
type ProgressInfo ¶
type RedisParams ¶
func (*RedisParams) Del ¶
func (rp *RedisParams) Del() error
func (*RedisParams) Exist ¶
func (rp *RedisParams) Exist() (bool, error)
func (*RedisParams) Get ¶
func (rp *RedisParams) Get() error
func (*RedisParams) Set ¶
func (rp *RedisParams) Set() error
func (*RedisParams) Size ¶
func (rp *RedisParams) Size() (int64, error)
type RefreshObject ¶
type RegionChangeResponse ¶
func GetTopTwentyNftRegionChart ¶
func GetTopTwentyNftRegionChart(limit int) (*RegionChangeResponse, error)
type ResponseDashboardTitle ¶
type ResponseTopDataBoby ¶
type ResultsInfo ¶
type ScanOut ¶
type ScanOut struct { BlockSizes int64 BlockTransactions int64 Hash string RollbacksHash string KeyID string NodePosition int64 ConsensusMode int32 Time int64 CurrentVersion string TotalCounts int64 //total count power BlockTransactionSize int64 HonorNode int64 //honorNode number CastNodes int64 SubNodes int64 CLBNodes int64 MintAmounts string BlockId int64 MaxTps int32 MaxBlockSize string StorageCapacity string TotalTx int64 TwentyFourTx int64 WeekAverageTx int64 MaxActiveEcoLib string SingleDayMaxTx int64 Circulations string TodayCirculationsAmount string TwentyFourAmount string NftMinerCount int64 NftBlockReward float64 HalveNumber int64 NftStakeAmounts string EcoLibsInfo EcoLibsRet KeysInfo KeysRet CandidateNodeInfo CandidateHonorNodeRet }
func (*ScanOut) GetDashboardFromRedis ¶
func (m *ScanOut) GetDashboardFromRedis() (*ScanOutRet, error)
func (*ScanOut) GetRedisLatest ¶
func (*ScanOut) InsertRedis ¶
type ScanOutBlockTransactionRet ¶
type ScanOutBlockTransactionRet struct { BlockId int64 `json:"block_id"` // BlockSizes int64 `json:"block_size" ` // BlockTransactions int64 `json:"block_transactions" ` // }
func (*ScanOutBlockTransactionRet) Marshal ¶
func (s *ScanOutBlockTransactionRet) Marshal(q []ScanOutBlockTransactionRet) (string, error)
func (*ScanOutBlockTransactionRet) Unmarshal ¶
func (s *ScanOutBlockTransactionRet) Unmarshal(bt string) (q []ScanOutBlockTransactionRet, err error)
type ScanOutRet ¶
type ScanOutRet struct { BlockId int64 `json:"block_id"` //Block Id BlockSizes int64 `json:"block_sizes"` //Block Size BlockTransactions int64 `json:"block_transactions"` Hash string `json:"hash"` RollbacksHash string `json:"rollbacks_hash"` EcosystemID int64 `json:"ecosystem_id"` KeyID string `json:"key_id"` NodePosition int64 `json:"node_position"` ConsensusMode int32 `json:"consensus_mode"` Time int64 `json:"time"` CurrentVersion string `json:"current_version"` TotalCounts int64 `json:"total_counts"` //total count BlockTransactionSize int64 `json:"block_transaction_size"` GuardianNodes int64 `json:"guardian_nodes"` SubNodes int64 `json:"sub_nodes"` CLBNodes int64 `json:"clb_nodes"` MintAmounts string `json:"mint_amount"` BlockInfo BlockRet `json:"block_info"` TxInfo TxRet `json:"tx_info"` CirculationsInfo CirculationsRet `json:"circulations_info"` NftMinerInfo NftMinerRet `json:"nft_miner_info"` EcoLibsInfo EcoLibsRet `json:"eco_libs_info"` KeysInfo KeysRet `json:"keys_info"` CandidateNodeInfo CandidateHonorNodeRet `json:"candidate_node_info"` CastNodeInfo CastNodeRet `json:"cast_node_info"` //todo:Need Add Digits int64 `json:"digits"` }
type SearchHashResponse ¶
type SearchHashResponse struct {
HashType int `json:"hash_type"`
}
func SearchHash ¶
func SearchHash(hash string) (SearchHashResponse, error)
type SnippetsParams ¶
type SpentInfo ¶
type SpentInfo struct { InputTxHash []byte `gorm:"default:(-)"` InputIndex int32 OutputTxHash []byte `gorm:"not null"` OutputIndex int32 `gorm:"not null"` OutputKeyId int64 `gorm:"not null"` OutputValue string `gorm:"not null"` Ecosystem int64 BlockId int64 Type int64 }
SpentInfo is model
func (*SpentInfo) GetAmountByKeyId ¶
func (*SpentInfo) GetExplorer ¶
func (si *SpentInfo) GetExplorer(txHash []byte) (*UtxoExplorer, error)
func (*SpentInfo) GetOutputKeysByBlockId ¶
func (*SpentInfo) GetOutputs ¶
func (*SpentInfo) UnmarshalTransaction ¶
func (si *SpentInfo) UnmarshalTransaction(txData []byte) (*UtxoExplorerInfo, error)
type SpentInfoHistory ¶
type SpentInfoHistory struct { Id int64 `gorm:"primary_key;not null"` SenderId int64 `gorm:"column:sender_id;not null"` RecipientId int64 `gorm:"column:recipient_id;not null"` SenderBalance string `gorm:"type:decimal(30);default:'0';not null"` RecipientBalance string `gorm:"type:decimal(30);default:'0';not null"` Amount string `gorm:"column:amount;type:decimal(30);default:'0';not null"` Block int64 `gorm:"column:block;not null;index"` Hash []byte `gorm:"column:hash;not null;index"` CreatedAt int64 `gorm:"column:created_at;not null"` Ecosystem int64 `gorm:"not null"` Type int `gorm:"not null"` //1:UTXO_TransferSelf 2:UTXO_Tx 3:fees 4:taxes 5:startUp 6:combustion SubType int `gorm:"not null"` //type is 1 then 1:AccountUTXO 2:UTXO-Account }
func (*SpentInfoHistory) CreateTable ¶
func (p *SpentInfoHistory) CreateTable() (err error)
func (*SpentInfoHistory) GetKeyBalance ¶
func (*SpentInfoHistory) GetLast ¶
func (p *SpentInfoHistory) GetLast() (bool, error)
func (*SpentInfoHistory) RollbackOne ¶
func (p *SpentInfoHistory) RollbackOne() error
func (*SpentInfoHistory) RollbackTransaction ¶
func (p *SpentInfoHistory) RollbackTransaction() error
func (*SpentInfoHistory) TableName ¶
func (p *SpentInfoHistory) TableName() string
type StakingAccountResponse ¶
type StakingAccountResponse struct { Account string `json:"account" gorm:"column:account"` StakeAmount decimal.Decimal `json:"stake_amount" gorm:"column:stake_amount"` AccountedFor decimal.Decimal `json:"accounted_for"` }
func GetTopTenStakingAccount ¶
func GetTopTenStakingAccount() ([]StakingAccountResponse, error)
type StateParameter ¶
type StateParameter struct { ID int64 `gorm:"primary_key;not null" json:"id"` Name string `gorm:"not null;size:100" json:"name"` Value string `gorm:"not null" json:"value"` Conditions string `gorm:"not null" json:"conditions"` // contains filtered or unexported fields }
StateParameter is model
func (*StateParameter) FindStateParameters ¶
func (sp *StateParameter) FindStateParameters(page int, size int, name, order string, ecosystem int64) (num int64, rets []StateParameter, err error)
func (*StateParameter) Get ¶
func (sp *StateParameter) Get(name string) (bool, error)
Get is retrieving model from database
func (*StateParameter) GetMintAmount ¶
func (sp *StateParameter) GetMintAmount() (string, error)
Get is retrieving model from database
func (*StateParameter) SetTableFix ¶
func (sp *StateParameter) SetTableFix(fix int64)
SetTablePrefix is setting table prefix
func (*StateParameter) SetTablePrefix ¶
func (sp *StateParameter) SetTablePrefix(prefix string)
SetTablePrefix is setting table prefix
func (*StateParameter) TableName ¶
func (sp *StateParameter) TableName() string
TableName returns name of table
type StatisticsData ¶
type StorageCapacitysChart ¶
type StorageCapacitysChart struct { Name string `json:"name,omitempty"` //ecosystem name Time []int64 `json:"time"` StorageCapacitys []string `json:"storage_capacitys"` }
func Get15DayBlockSizeChart ¶
func Get15DayBlockSizeChart() (StorageCapacitysChart, error)
func Get15DaysStorageCapacityFromRedis ¶
func Get15DaysStorageCapacityFromRedis(ecosystem int64) (*StorageCapacitysChart, error)
type StrReplaceStruct ¶
type SubjectInfo ¶
type SubjectInfo struct { ContractAccept string `json:"contract_accept"` ContractReject string `json:"contract_reject"` ContractAcceptParams struct { Value string `json:"Value"` VotingId int `json:"VotingId"` Conditions string `json:"Conditions"` TemplateId int `json:"TemplateId"` ApplicationId int `json:"ApplicationId"` TokenEcosystem int `json:"TokenEcosystem"` } `json:"contract_accept_params"` ContractRejectParams struct { } `json:"contract_reject_params"` }
type SystemParameterResult ¶
type SystemParameterResult struct { Total int64 `json:"total"` Page int `json:"page"` Limit int `json:"limit"` Rets []PlatformParameter `json:"rets"` }
type TableModel ¶
type TableModel struct { ID int64 `gorm:"primary_key;not_null" json:"id" ` NodePosition int64 `gorm:"not null" json:"nodeposition"` Enable bool `gorm:"not null" json:"enable"` Fmode int `gorm:"not null" json:"fmode"` // <0 1 id 2 3 Smode bool `gorm:"not null" json:"smode"` // false no flash true flash memory Name string `gorm:"not null" json:"name"` Time time.Time `gorm:"not null" json:"time"` Dataid int64 `gorm:"not null" json:"id"` Count int `gorm:"not null" json:"count"` Updatetime int `gorm:"not null" json:"updatetime"` }
redisModel get redis information from config.yml
type TableParams ¶
type TableShowModel ¶
type TokenEcosystemResponse ¶
type TokenEcosystemResponse struct { Emission int64 `json:"emission"` EmissionRatio decimal.Decimal `json:"emission_ratio"` UnEmission int64 `json:"un_emission"` UnEmissionRatio decimal.Decimal `json:"un_emission_ratio"` }
func GetTokenEcosystemRatioChart ¶
func GetTokenEcosystemRatioChart() (TokenEcosystemResponse, error)
type TotalResult ¶
type TotalResult struct {
Total int64 `json:"total"`
}
type Transaction ¶
type Transaction struct { Hash []byte `gorm:"private_key;not null"` Data []byte `gorm:"not null"` Used int8 `gorm:"not null"` HighRate transactionRate `gorm:"not null"` Expedite decimal.Decimal `gorm:"not null"` Type int8 `gorm:"not null"` KeyID int64 `gorm:"not null"` Sent int8 `gorm:"not null"` Verified int8 `gorm:"not null"` Time int64 `gorm:"not null"` }
func (*Transaction) TableName ¶
func (p *Transaction) TableName() string
TableName returns name of table
type TransactionData ¶
type TransactionData struct { Hash []byte `gorm:"primary_key;not null;index"` Block int64 `gorm:"not null;index"` TxData []byte `gorm:"not null"` TxTime int64 `gorm:"not null"` Type int `gorm:"not null"` //type 1:utxo transaction 0:contract transaction }
func (*TransactionData) CreateTable ¶
func (p *TransactionData) CreateTable() (err error)
func (*TransactionData) GetFirstByType ¶
func (p *TransactionData) GetFirstByType(blockId int64, txType int) (bool, error)
func (*TransactionData) GetLast ¶
func (p *TransactionData) GetLast() (bool, error)
func (*TransactionData) GetLastByType ¶
func (p *TransactionData) GetLastByType(txType int) (bool, error)
func (*TransactionData) GetTxDataByHash ¶
func (p *TransactionData) GetTxDataByHash(hash []byte) (bool, error)
func (*TransactionData) RollbackOne ¶
func (p *TransactionData) RollbackOne() error
func (*TransactionData) RollbackTransaction ¶
func (p *TransactionData) RollbackTransaction() error
func (*TransactionData) TableName ¶
func (p *TransactionData) TableName() string
type TransactionHistoryHex ¶
type TransactionList ¶
type TransactionListResponse ¶
type TransactionRelation ¶
type TransactionRelation struct { Hash []byte `gorm:"column:hash;not null;index"` SenderIds string `gorm:"column:sender_ids;not null"` RecipientIds string `gorm:"column:recipient_ids"` Ecosystem int64 `gorm:"column:ecosystem;not null"` Block int64 `gorm:"column:block;not null;index"` CreatedAt int64 `gorm:"column:created_at;not null"` }
func (*TransactionRelation) CreateIndex ¶
func (p *TransactionRelation) CreateIndex() error
func (*TransactionRelation) CreateTable ¶
func (p *TransactionRelation) CreateTable() (err error)
func (*TransactionRelation) GetLast ¶
func (p *TransactionRelation) GetLast() (bool, error)
func (*TransactionRelation) RollbackOne ¶
func (p *TransactionRelation) RollbackOne() error
func (*TransactionRelation) RollbackTransaction ¶
func (p *TransactionRelation) RollbackTransaction() error
func (*TransactionRelation) TableName ¶
func (p *TransactionRelation) TableName() string
type TransactionStatus ¶
type TransactionStatus struct { Hash []byte `gorm:"primary_key;not null" json:"hash"` Time int64 `gorm:"not null" json:"time"` Type int64 `gorm:"not null" json:"type"` Ecosystem int64 `gorm:"not null" json:"ecosystem"` WalletID int64 `gorm:"not null" json:"wallet_id"` BlockID int64 `gorm:"not null;index:tsblockid_idx" json:"block_id"` Error string `gorm:"not null" json:"error"` Penalty int64 `gorm:"not null" json:"penalty"` }
TransactionStatus is model
func (*TransactionStatus) BatchInsert_Sqlites ¶
func (ts *TransactionStatus) BatchInsert_Sqlites(objArr *[]TransactionStatus) error
func (*TransactionStatus) BatchUpdate_Sqlite ¶
func (ts *TransactionStatus) BatchUpdate_Sqlite(reportForms *[]TransactionStatus) error
func (*TransactionStatus) BatchinsertSqlite ¶
func (ts *TransactionStatus) BatchinsertSqlite(objArr *[]TransactionStatus) error
func (*TransactionStatus) Create ¶
func (ts *TransactionStatus) Create() error
func (*TransactionStatus) Create_Sqlite ¶
func (ts *TransactionStatus) Create_Sqlite() error
func (*TransactionStatus) DBconnGetcount_Sqlite ¶
func (ts *TransactionStatus) DBconnGetcount_Sqlite() (int64, error)
func (*TransactionStatus) DbconnbatchinsertSqlites ¶
func (ts *TransactionStatus) DbconnbatchinsertSqlites(objArr *[]TransactionStatus) error
func (*TransactionStatus) DbconngetSqlite ¶
func (ts *TransactionStatus) DbconngetSqlite(transactionHash []byte) (bool, error)
func (*TransactionStatus) Get ¶
func (ts *TransactionStatus) Get(transactionHash []byte) (bool, error)
func (*TransactionStatus) GetNodecount ¶
func (ts *TransactionStatus) GetNodecount(db *gorm.DB) (int64, error)
func (*TransactionStatus) GetTimelimit ¶
func (ts *TransactionStatus) GetTimelimit(time time.Time) (*[]TransactionStatus, error)
func (*TransactionStatus) GetTimelimit_Sqlite ¶
func (ts *TransactionStatus) GetTimelimit_Sqlite(time time.Time) (*[]TransactionStatus, error)
func (*TransactionStatus) GetTransactions ¶
func (ts *TransactionStatus) GetTransactions(page int, size int, order string) (*[]TransactionStatusHex, int64, error)
func (*TransactionStatus) Get_Sqlite ¶
func (ts *TransactionStatus) Get_Sqlite(transactionHash []byte) (bool, error)
func (*TransactionStatus) Getcount ¶
func (ts *TransactionStatus) Getcount() (int64, error)
func (*TransactionStatus) Getcount_Sqlite ¶
func (ts *TransactionStatus) Getcount_Sqlite() (int64, error)
func (*TransactionStatus) TableName ¶
func (ts *TransactionStatus) TableName() string
TableName returns name of table
type TransactionStatusHex ¶
type TransactionStatusHex struct { Hash string `gorm:"primary_key;not null" json:"hash"` Time int64 `gorm:"not null" json:"time"` Type int64 `gorm:"not null" json:"type"` WalletID string `gorm:"not null" json:"wallet_id"` BlockID int64 `gorm:"not null" json:"block_id"` Error string `gorm:"not null" json:"err"` Penalty int64 `gorm:"not null" json:"penalty"` Ecosystemname string `json:"ecosystemname"` TokenSymbol string `json:"token_symbol"` Ecosystem int64 `json:"ecosystem"` }
type TransactionsResponse ¶
type TransactionsResponse struct { CountResponse List []*Transaction `json:"list"` }
func GetQueueTransactions ¶
func GetQueueTransactions(reqUrl string, page, limit int) (*TransactionsResponse, error)
GetQueueTransactions get queue transactions from node
type TransactionsStatusResponse ¶
type TransactionsStatusResponse struct { CountResponse List []TransactionStatus `json:"list"` }
type TxChangeChart ¶
type TxDetailedInfo ¶
type TxDetailedInfoHeadResponse ¶
type TxDetailedInfoHeadResponse struct { BlockID int64 `json:"block_id"` Hash string `json:"hash"` ContractName string `json:"contract_name"` ContractCode string `json:"contract_code"` Params string `json:"params"` Time int64 `json:"time"` EcosystemName string `json:"ecosystem_name"` Ecosystem int64 `json:"ecosystem"` LogoHash string `json:"logo_hash"` TokenSymbol string `json:"token_symbol"` Address string `json:"address"` Size string `json:"size"` }
type TxDetailedInfoHex ¶
type TxDetailedInfoHex struct { Hash string `json:"hash"` ContractName string `json:"contract_name"` //Params map[string]any `json:"params"` Params string `json:"params"` KeyID string `json:"key_id"` Time int64 `json:"time"` Type int64 `json:"type"` Size int64 `json:"size"` Ecosystemname string `json:"ecosystemname"` TokenSymbol string `json:"token_symbol"` Ecosystem int64 `json:"ecosystem"` }
type TxDetailedInfoResponse ¶
type TxDetailedInfoResponse struct { Hash string `json:"hash"` ContractName string `json:"contract_name"` //Params map[string]any `json:"params"` Params string `json:"params"` KeyID string `json:"key_id"` Time int64 `json:"time"` Type int64 `json:"type"` Size string `json:"size"` Ecosystemname string `json:"ecosystemname"` TokenSymbol string `json:"token_symbol"` Ecosystem int64 `json:"ecosystem"` }
type TxListChart ¶
type TxListChart struct { Name string `json:"name,omitempty"` Time []int64 `json:"time"` Tx []int64 `json:"tx"` }
func Get15DaysTxCountFromRedis ¶
func Get15DaysTxCountFromRedis(ecosystem int64) (*TxListChart, error)
type UtxoExplorer ¶
type UtxoExplorer struct { UtxoType string `json:"utxo_type"` Comment string `json:"comment"` Sender string `json:"sender"` Recipient string `json:"recipient"` Amount string `json:"amount"` Expedite string `json:"expedite"` Ecosystem int64 `json:"ecosystem"` TokenSymbol string `json:"token_symbol"` Change []utxoDetail `json:"change"` Outputs []utxoDetail `json:"outputs"` BasisGasFee FeesInfo `json:"basis_gas_fee"` EcoGasFee FeesInfo `json:"eco_gas_fee"` Size string `json:"size"` Digits int64 `json:"digits"` }
type UtxoExplorerInfo ¶
type UtxoExplorerInfo struct { UtxoType string `json:"utxo_type"` Comment string `json:"comment"` Sender string `json:"sender"` Recipient string `json:"recipient"` Amount string `json:"amount"` Expedite string `json:"expedite"` Ecosystem int64 `json:"ecosystem"` TokenSymbol string `json:"token_symbol"` Size int64 `json:"size"` }
type VoteStatus ¶
type Voting ¶
type Voting struct { Id int64 `gorm:"primary_key;not null"` Creator string `gorm:"column:lock;type:jsonb"` DateEnded int64 `gorm:"column:date_ended"` DateStarted int64 `gorm:"column:date_started"` Deleted int64 `gorm:"column:deleted"` Ecosystem int64 `gorm:"column:ecosystem"` Flags string `gorm:"column:flags;type:jsonb"` Optional string `gorm:"column:optional;type:jsonb"` Progress string `gorm:"column:progress;type:jsonb"` Status int64 `gorm:"column:status"` Voting string `gorm:"column:voting;type:jsonb"` }
type VotingInfo ¶
type VotingInfo struct { Name string `json:"name"` Type int `json:"type"` Quorum int `json:"quorum"` Rating int `json:"rating"` Volume int `json:"volume"` RoleId string `json:"role_id"` Description string `json:"description"` TypeDecision int `json:"type_decision"` CountTypeVoters int `json:"count_type_voters"` TypeParticipants int `json:"type_participants"` }
type VotingResponse ¶
type VotingResponse struct { TotalResult VoteInfo }
func GetLatestDaoVoting ¶
func GetLatestDaoVoting() (VotingResponse, error)
type VotingSubject ¶
type VotingSubject struct { Id int64 `gorm:"primary_key;not null"` Ecosystem int64 `gorm:"column:ecosystem"` NumberAccept int64 `gorm:"column:number_accept"` Results string `gorm:"column:results;type:jsonb"` Subject string `gorm:"column:subject;type:jsonb"` VotingId int64 `gorm:"column:voting_id"` }
func (*VotingSubject) GetByVotingId ¶
func (p *VotingSubject) GetByVotingId(votingId int64, ecosystem int64) (bool, error)
func (*VotingSubject) TableName ¶
func (p *VotingSubject) TableName() string
Source Files ¶
- BlockTxDetailedInfoHex.go
- LogTransaction.go
- account_detail.go
- airdrop_info.go
- app_param.go
- applications.go
- assign_info.go
- binary.go
- block.go
- blockInfo.go
- blockchain.go
- blockchain_api.go
- blockchain_client.go
- bridge_setting.go
- bridge_token.go
- buffer_eco_chart.go
- candidate_decisions.go
- candidate_requests.go
- centrifugo.go
- chart_data.go
- consts.go
- contracts.go
- country_locator.go
- daily_active_report.go
- daily_node_report.go
- dashboard.go
- data_chart.go
- database_type.go
- datamodel.go
- date.go
- db.go
- eco_chart.go
- ecosystem_app_params.go
- ecosystem_info.go
- ecosystems.go
- goredis.go
- history.go
- honor_node_info.go
- iname.go
- keys.go
- language.go
- logo.go
- maxblockid.go
- members.go
- mine_incomehistory.go
- mine_incomehistoryleveldb.go
- mine_info.go
- mine_stake_status.go
- mint_node.go
- nft_miner_events.go
- nft_miner_items.go
- nft_miner_staking.go
- node_transaction.go
- node_transaction_status.go
- nodedb.go
- parameters.go
- platform_parameters.go
- point.go
- polygon.go
- response_type.go
- result.go
- scan_out.go
- sort.go
- spent_info.go
- spent_info_history.go
- table_index.go
- time.go
- transaction_data.go
- transaction_relation.go
- transaction_status.go
- transactionqueue.go
- trigger.go
- votings.go
- votings_subject.go
- wait_group.go
- wherebuild.go