conf

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

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

Go to latest
Published: Sep 21, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package conf parse config to configuration

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadECPrivateKeyFromPEM

func LoadECPrivateKeyFromPEM(path string) (string, string, string, error)

LoadECPrivateKeyFromPEM reads file, divides into key and certificates

Types

type Config

type Config struct {
	IsHTTP     bool
	ChainID    int64
	CAFile     string
	Key        string
	Cert       string
	IsSMCrypto bool
	PrivateKey string
	GroupID    int
	NodeURL    string
}

Config contains configuration items for sdk

func ParseConfig

func ParseConfig(buffer []byte) ([]Config, error)

ParseConfig parses the configuration from []byte

func ParseConfigFile

func ParseConfigFile(cfgFile string) ([]Config, error)

ParseConfigFile parses the configuration from toml config file

Jump to

Keyboard shortcuts

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