config

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JsonConfigFileName   = "space.json"
	SpaceServerPort      = "space/rpcPort"
	SpaceProxyServerPort = "space/rpcProxyPort"
	SpaceStorePath       = "space/storePath"
	TextileHubTarget     = "space/textileHubTarget"
	TextileThreadsTarget = "space/textileThreadsTarget"
	MountFuseDrive       = "space/mountFuseDrive"
	FuseMountPath        = "space/fuseMountPath"
	FuseDriveName        = "space/fuseDriveName"
	SpaceServicesAPIURL  = "space/servicesApiUrl"
	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 added in v0.0.6

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 added in v0.0.6

func NewJson(env env.SpaceEnv) Config

Deprecated for the default values config

func NewMap added in v0.0.6

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

type Flags added in v0.0.6

type Flags struct {
	Ipfsaddr  string
	Mongousr  string
	Mongopw   string
	Mongohost string
	DevMode   bool
}

Jump to

Keyboard shortcuts

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