storage

package
v0.0.0-...-7e9a881 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GormDBInit

func GormDBInit(engine, connect string) (*gorm.DB, error)

Types

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"`
	//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_title   string `gorm:"null" json:"token_title"`
	Ecosystem     int64  `gorm:"null" json:"ecosystem"`
}

type CentrifugoConfig

type CentrifugoConfig struct {
	Enable bool   `yaml:"enable"`
	Secret string `yaml:"secret"`
	URL    string `yaml:"url"`
	Socket string `yaml:"socket"`
	Key    string `yaml:"key"`
}

func (*CentrifugoConfig) Close

func (l *CentrifugoConfig) Close() error

func (*CentrifugoConfig) Conn

func (c *CentrifugoConfig) Conn() *gocent.Client

func (*CentrifugoConfig) Init

func (c *CentrifugoConfig) Init() error

type Crontab

type Crontab struct {
	HonorNode     string `yaml:"honor_node"`
	LoadContracts string `yaml:"load_contracts"`
	ChartData     string `yaml:"chart_data"`
	Realtime      string `yaml:"realtime"`
	HistoryData   string `yaml:"history_data"`
}

type CryptoSettings

type CryptoSettings struct {
	Cryptoer string `yaml:"cryptoer"`
	Hasher   string `yaml:"hasher"`
}

type DatabaseModel

type DatabaseModel struct {
	Enable  bool   `yaml:"enable"`
	DBType  string `yaml:"type"`
	Connect string `yaml:"connect"`
	Name    string `yaml:"name"`
	Ver     string `yaml:"ver"`
	MaxIdle int    `yaml:"max_idle"`
	MaxOpen int    `yaml:"max_open"`
}

func (*DatabaseModel) Close

func (d *DatabaseModel) Close() error

func (*DatabaseModel) Conn

func (d *DatabaseModel) Conn() *gorm.DB

func (*DatabaseModel) GormInit

func (d *DatabaseModel) GormInit() (err error)

type DbConner

type DbConner interface {
	GormInit() error
	Close() error
}

type HonorNodeModel

type HonorNodeModel struct {
	NodeName     string `json:"node_name"`
	TCPAddress   string `json:"tcp_address,omitempty"`
	APIAddress   string `json:"api_address"`
	City         string `json:"city"` //city or continent
	Country      string `json:"country"`
	IconUrl      string `json:"icon_url"`
	NodePosition int64  `json:"node_position"`
	KeyID        string `json:"key_id"`
	Display      bool   `json:"display"`
	//PublicKey       string          `json:"public_key"`
	Latitude        string          `json:"latitude,omitempty"`
	Longitude       string          `json:"longitude,omitempty"`
	NodeBlock       int64           `json:"node_block"`
	PkgAccountedFor decimal.Decimal `json:"pkg_accounted_for"`
	ReplyRate       string          `json:"reply_rate"`
	ConsensusMode   int32           `json:"consensus_mode"`

	NodeStatusTime time.Time `json:"node_status_time,omitempty"`
}

type LDatabaseModel

type LDatabaseModel struct {
	Enable  bool   `yaml:"enable"`
	DBType  string `yaml:"type"`
	Connect string `yaml:"connect"`
	Name    string `yaml:"name"`
	Ver     string `yaml:"ver"`
	MaxIdle int    `yaml:"max_idle"`
	MaxOpen int    `yaml:"max_open"`
}

func (*LDatabaseModel) Close

func (d *LDatabaseModel) Close() error

func (*LDatabaseModel) Conn

func (d *LDatabaseModel) Conn() *gorm.DB

func (*LDatabaseModel) GormInit

func (d *LDatabaseModel) GormInit() (err error)

type RedisModel

type RedisModel struct {
	Address  string `yaml:"address"`
	Port     int    `yaml:"port"`
	Password string `yaml:"password"`
	Db       int    `yaml:"db"`
}

func (*RedisModel) Close

func (l *RedisModel) Close() error

func (*RedisModel) Conn

func (r *RedisModel) Conn() *redis.Client

func (*RedisModel) Init

func (r *RedisModel) Init() error

func (*RedisModel) Str

func (r *RedisModel) Str() 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

Jump to

Keyboard shortcuts

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