config

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitViper

func InitViper() *viper.Viper

Types

type BscScan

type BscScan struct {
	ApiKey    string `toml:"ApiKey"`
	UrlPrefix string `toml:"UrlPrefix"`
}

type Chain

type Chain struct {
	WsNodeAddress  string `toml:"WsNodeAddress"`
	RpcNodeAddress string `toml:"RpcNodeAddress"`
}

type Config

type Config struct {
	System      System       `json:"system" toml:"System"`
	Moralis     Moralis      `json:"moralis" toml:"Moralis"`
	BscScan     BscScan      `json:"bscscan" toml:"Bscscan"`
	Contract    Contract     `json:"contract" toml:"Contract"`
	Redis       Redis        `json:"redis" toml:"Redis"`
	Chain       Chain        `json:"chain" toml:"Chain"`
	Mysql       Mysql        `json:"mysql" toml:"Mysql"`
	SignService SignService  `json:"signService" toml:"SignService"`
	SignWorkers []SignWorker `json:"signWorkers" toml:"SignWorkers"`
	Limit       Limit        `json:"limit" toml:"Limit"`
}
var Cfg Config

type Contract

type Contract struct {
	NftContractAddress   []string `toml:"NftContract"`
	ERC20ContractAddress []string `toml:"ERC20Contract"`
	GameVaultAddress     string   `toml:"GameVaultAddress"`
}

type Limit

type Limit struct {
	NftLimit      int `json:"nftLimit" toml:"NftLimit"`
	TxRecordLimit int `json:"txRecordLimit" toml:"TxRecordLimit"`
}

type Moralis

type Moralis struct {
	XApiKey string `toml:"XApiKey"`
}

type Mysql

type Mysql struct {
	Path         string `json:"path" toml:"Path"`
	Port         string `json:"port" toml:"Port"`
	Config       string `json:"config" toml:"Config"`
	Dbname       string `json:"db_name" toml:"DbName"`
	Username     string `json:"username" toml:"Username"`
	Password     string `json:"password" toml:"Password"`
	MaxIdleConns int    `json:"maxIdleConns" toml:"MaxIdleConns"`
	MaxOpenConns int    `json:"maxOpenConns" toml:"MaxOpenConns"`
}

func (*Mysql) Dsn

func (m *Mysql) Dsn() string

type Redis

type Redis struct {
	Address  string `toml:"Address"`
	Password string `toml:"Password"`
}

type SignService

type SignService struct {
	TaskThreshold int `toml:"TaskThreshold"`
	SchedInterval int `toml:"SchedInterval"`
}

type SignWorker

type SignWorker struct {
	WalletAddress string `toml:"WalletAddress"`
	ServerUrl     string `toml:"ServerUrl"`
}

type System

type System struct {
	Port      string `toml:"Port"`
	MachineId string `toml:"MachineId"`
}

Jump to

Keyboard shortcuts

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