config

package
v0.0.0-...-614cbfb Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseDb

type BaseDb struct {
	User     string `json:"User" gorm:"column:User"`
	Port     int    `json:"Port" gorm:"column:Port"`
	DbName   string `json:"DbName" gorm:"column:DbName"`
	Addr     string `json:"Addr" gorm:"column:Addr"`
	Password string `json:"Password" gorm:"column:Password"`
}
{
    "Addr": "192.168.2.9",
    "Port": 9000,
    "User": "test",
    "Password": "test",
    "DbName": "base"
  }

type Chain

type Chain struct {
	ChainName string `json:"chainName" gorm:"column:chainName"`
	ChainIcon string `json:"chainIcon" gorm:"column:chainIcon"`
	WsUri     string `json:"wsUri" gorm:"column:wsUri"`
	HttpUri   string `json:"httpUri" gorm:"column:httpUri"`
	ChainCode int64  `json:"chainCode" gorm:"column:chainCode"`
	HttpPort  string `json:"httpPort" gorm:"column:httpPort"`
	WsPort    string `json:"wsPort" gorm:"column:wsPort"`
}

func LoadChains

func LoadChains(path string) ([]*Chain, error)

type Config

type Config struct {
	RootPath  string  `json:"RootPath"`
	Port      int     `json:"Port"`
	LogLevel  int     `json:"LogLevel"`
	BaseDb    *BaseDb `json:"BaseDb"`
	ChainPath string  `json:"ChainPath"`
}

func LoadConfig

func LoadConfig(path string) Config

Jump to

Keyboard shortcuts

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