Documentation ¶
Index ¶
- Constants
- func AddrToPeerInfo(multiAddr string) (*peer.AddrInfo, error)
- func GetAPI(repoRoot string) (string, error)
- func GetKeyPath(repoRoot string) string
- func GetStoragePath(repoRoot string, subPath ...string) string
- func Initialize(repoRoot string) error
- func Initialized(repoRoot string) bool
- func PathRoot() (string, error)
- func PathRootWithDefault(path string) (string, error)
- func ReadConfig(path, configType string, config interface{}) error
- type Cert
- type Certs
- type Config
- type Gateway
- type Genesis
- type Key
- type Log
- type LogModule
- type Monitor
- type NetworkConfig
- type NetworkNodes
- type Order
- type PProf
- type Port
- type Repo
- type Txpool
Constants ¶
View Source
const ( // key name KeyName = "key.json" // API name APIName = "api" )
Variables ¶
This section is empty.
Functions ¶
func AddrToPeerInfo ¶
AddrToPeerInfo transfer addr to PeerInfo addr example: "/ip4/104.236.76.40/tcp/4001/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64"
func GetKeyPath ¶
func GetStoragePath ¶
func Initialize ¶
func Initialized ¶
func PathRootWithDefault ¶
func ReadConfig ¶
Types ¶
type Certs ¶
type Certs struct { NodeCertData []byte AgencyCertData []byte CACertData []byte NodeCert *x509.Certificate AgencyCert *x509.Certificate CACert *x509.Certificate }
type Config ¶
type Config struct { RepoRoot string `json:"repo_root"` Title string `json:"title"` Solo bool `json:"solo"` Port `json:"port"` PProf `json:"pprof"` Monitor `json:"monitor"` Gateway `json:"gateway"` Log `json:"log"` Cert `json:"cert"` Txpool `json:"txpool"` Order `json:"order"` }
func DefaultConfig ¶
func UnmarshalConfig ¶
type Key ¶
type LogModule ¶
type LogModule struct { P2P string `toml:"p2p" json:"p2p"` Consensus string `toml:"consensus" json:"consensus"` Executor string `toml:"executor" json:"executor"` Router string `toml:"router" json:"router"` API string `toml:"api" json:"api"` CoreAPI string `mapstructure:"coreapi" toml:"coreapi" json:"coreapi"` }
type NetworkConfig ¶
type NetworkNodes ¶
Click to show internal directories.
Click to hide internal directories.