config

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JsonConfigFileName       = "space.json"
	SpaceServerPort          = "space/rpcPort"
	SpaceProxyServerPort     = "space/rpcProxyPort"
	SpaceRestProxyServerPort = "space/restProxyPort"
	SpaceStorePath           = "space/storePath"
	TextileHubTarget         = "space/textileHubTarget"
	TextileThreadsTarget     = "space/textileThreadsTarget"
	MountFuseDrive           = "space/mountFuseDrive"
	FuseMountPath            = "space/fuseMountPath"
	FuseDriveName            = "space/fuseDriveName"
	SpaceServicesAPIURL      = "space/servicesApiUrl"
	SpaceServicesHubAuthURL  = "space/servicesHubAuthUrl"
	Ipfsaddr                 = "space/ipfsAddr"
	Mongousr                 = "space/mongoUsr"
	Mongopw                  = "space/mongoPw"
	Mongohost                = "space/mongoHost"
)

Variables

View Source
var (
	ErrConfigNotLoaded = errors.New("config file was not loaded correctly or it does not exist")
)

Functions

func CreateConfigJson

func CreateConfigJson() error

Types

type Config

type Config interface {
	GetString(key string, defaultValue interface{}) string
	GetInt(key string, defaultValue interface{}) int
}

Config used to fetch config information

func NewJson

func NewJson(env env.SpaceEnv) Config

Deprecated for the default values config

func NewMap

func NewMap(envVal env.SpaceEnv, flags *Flags) Config

type Flags

type Flags struct {
	Ipfsaddr             string
	Mongousr             string
	Mongopw              string
	Mongohost            string
	DevMode              bool
	ServicesAPIURL       string
	ServicesHubAuthURL   string
	TextileHubTarget     string
	TextileThreadsTarget string
}

Jump to

Keyboard shortcuts

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