config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2018 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

* Copyright © 2018. TIBCO Software Inc. * This file is subject to the license terms contained * in the license file that is distributed with this file.

Index

Constants

View Source
const (
	// Flag Keys ======================
	CONFIG_FLAG_KEY = "config"

	// Defaults =======================
	DEFAULT_FOLDER_NAME = ".dovetail-cli"
	DEFAULT_FILE_NAME   = "config.json"

	// Types of supported blockchains
	HYPERLEDGER_FABRIC = "fabric"
	CORDA              = "corda"
)

Variables

This section is empty.

Functions

func Blockchains

func Blockchains() []string

Returns a list of the supported blockchains

func DefaultLocation

func DefaultLocation() (string, error)

DefaultLocation returns the full location of the default configuration file

func GetConfigFile

func GetConfigFile(cfgFileFlag string) (string, error)

GetConfigFile file returns the config file location If the config flag is set the default location is overriden

func ReadConfigFile

func ReadConfigFile(cfgFileFlag string) error

ReadConfigFile reads the config after setting the right file path to viper If the config flag is set the default location is overriden

Types

type Config

type Config struct {
	Hyperledger *hlconfig.Config `json:"hyperledger"`
}

func New

func New() *Config

New is a config constructor with default values

Jump to

Keyboard shortcuts

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