conf

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2020 License: Apache-2.0 Imports: 12 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) ([]byte, string, error)

LoadECPrivateKeyFromPEM reads file, divides into key and certificates

func LoadECPublicKeyFromPEM

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

LoadECPublicKeyFromPEM reads file, divides into key and certificates

func ParsePKCS8ECPrivateKey

func ParsePKCS8ECPrivateKey(der []byte) (keyHex []byte, curveName string, err error)

export parsePKCS8ECPrivateKey

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

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