config

package
v0.0.0-...-fbe82ab Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2019 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允许指定(配置文件)相对路径的配置字符串

例如:假设我们的配置位于/etc/hyperledger/fabric/core.yaml中, 一个密钥“MSP.CONTROPATION”=“MSP/CONFIG.YAML”。

此函数将返回: getpath(“msp.configpath”)->/etc/hyperledger/fabric/msp/config.yaml

——————————————————————————————————————————————————————————————————————————————————————————————————————————————————

func InitViper

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

—————————————————————————————————————————————————————————————————————————————————————————————————————————————————— Invivior() —————————————————————————————————————————————————————————————————————————————————————————————————————————————————— 执行基于viper的配置层的基本初始化。 主要的推动力是建立应该寻找的路径。 我们需要的配置。如果v==nil,我们将初始化全局 蝰蛇实例 ——————————————————————————————————————————————————————————————————————————————————————————————————————————————————

func TranslatePath

func TranslatePath(base, p string) string

—————————————————————————————————————————————————————————————————————————————————————————————————————————————————— 转换词() —————————————————————————————————————————————————————————————————————————————————————————————————————————————————— 将相对路径转换为与配置相对应的完全限定路径。 指定它的文件。绝对路径是毫发无损地通过的。 ——————————————————————————————————————————————————————————————————————————————————————————————————————————————————

func TranslatePathInPlace

func TranslatePathInPlace(base string, p *string)

—————————————————————————————————————————————————————————————————————————————————————————————————————————————————— 翻译位置() —————————————————————————————————————————————————————————————————————————————————————————————————————————————————— 将相对路径转换为就地完全限定路径(更新 指针)相对于指定它的配置文件。绝对路径是 顺利通过。 ——————————————————————————————————————————————————————————————————————————————————————————————————————————————————

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