config

package
v0.0.0-...-a26e058 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const UnsupportedChain = "Unsupport chain"
View Source
const UnsupportedOperation = UnsupportedChain

Variables

This section is empty.

Functions

func LoadConfigFile

func LoadConfigFile(filePath string, cfg *Config) error

Types

type Config

type Config struct {
	Database  *Database  `yaml:"database"`
	Fullnode  Fullnode   `yaml:"fullnode"`
	NetWork   string     `yaml:"network"`
	Server    *Server    `yaml:"server"`
	RpcServer *RpcServer `yaml:"rpcserver"`
	Chains    []string   `yaml:"chains"`
	AesKey    string     `yaml:"aes_key"`
}

type Database

type Database struct {
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Database string `yaml:"database"`
}

type Eth

type Eth struct {
	RPCURL        string `yaml:"rpc_url"`
	RPCUser       string `yaml:"rpc_user"`
	RPCPass       string `yaml:"rpc_pass"`
	KeyLockerAddr string `yaml:"key_locker_addr"`
	WalletAddr    string `yaml:"wallet_addr"`
	WalletPriv    string `yaml:"wallet_priv"`
	TimeOut       int64  `yaml:"time_out"`
	Confirmations int64  `yaml:"confirmations"`
}

type Fullnode

type Fullnode struct {
	Eth  *Eth  `yaml:"eth"`
	Ipfs *Ipfs `yaml:"ipfs"`
}

Fullnode define

type Ipfs

type Ipfs struct {
	NetworkNode []string `yaml:"network_node"`
	RepoPath    string   `yaml:"repo_path"`
}

type NetWorkType

type NetWorkType int
const (
	MainNet NetWorkType = iota
	TestNet
	RegTest
)

type RPC

type RPC struct {
	RPCURL  string `yaml:"rpc_url"`
	RPCUser string `yaml:"rpc_user"`
	RPCPass string `yaml:"rpc_pass"`
}

type RpcServer

type RpcServer struct {
	Port string `yaml:"port"`
}

type Server

type Server struct {
	Port  int  `yaml:"port"`
	Debug bool `yaml:"debug"`
}

Jump to

Keyboard shortcuts

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