config

package
v0.0.0-...-c0eaf75 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const OfficialPath = "/etc/hyperledger/fabric"

Variables

This section is empty.

Functions

func AddConfigPath

func AddConfigPath(v *viper.Viper, p string)

func GetPath

func GetPath(key string) string

---------------------------------------------------------------------------------- GetPath() ---------------------------------------------------------------------------------- GetPath allows configuration strings that specify a (config-file) relative path

For example: Assume our config is located in /etc/hyperledger/fabric/core.yaml with a key "msp.configPath" = "msp/config.yaml".

This function will return:

GetPath("msp.configPath") -> /etc/hyperledger/fabric/msp/config.yaml

----------------------------------------------------------------------------------

func InitViper

func InitViper(v *viper.Viper, configName string) error

---------------------------------------------------------------------------------- InitViper() ---------------------------------------------------------------------------------- Performs basic initialization of our viper-based configuration layer. Primary thrust is to establish the paths that should be consulted to find the configuration we need. If v == nil, we will initialize the global Viper instance ----------------------------------------------------------------------------------

func TranslatePath

func TranslatePath(base, p string) string

---------------------------------------------------------------------------------- TranslatePath() ---------------------------------------------------------------------------------- Translates a relative path into a fully qualified path relative to the config file that specified it. Absolute paths are passed unscathed. ----------------------------------------------------------------------------------

func TranslatePathInPlace

func TranslatePathInPlace(base string, p *string)

---------------------------------------------------------------------------------- TranslatePathInPlace() ---------------------------------------------------------------------------------- Translates a relative path into a fully qualified path in-place (updating the pointer) relative to the config file that specified it. Absolute paths are passed unscathed. ----------------------------------------------------------------------------------

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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