conf

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: Apache-2.0 Imports: 12 Imported by: 18

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) ([]byte, string, error)

LoadECPrivateKeyFromPEM reads file, divides into key and certificates

func LoadECPublicKeyFromPEM added in v0.10.0

func LoadECPublicKeyFromPEM(path string) ([]byte, string, error)

LoadECPublicKeyFromPEM 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 []byte
	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 added in v0.10.0

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