conf

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 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
	TLSCAContext   []byte
	Key            string
	TLSKeyContext  []byte
	Cert           string
	TLSCertContext []byte
	IsSMCrypto     bool
	DynamicKey     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

func ParseConfigOptions added in v0.11.0

func ParseConfigOptions(caFile string, key string, cert, keyFile string, groupId int, ipPort string, isHttp bool, chainId int64, isSMCrypto bool) (*Config, error)

ParseConfigOptions parses from arguments

Jump to

Keyboard shortcuts

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