config

package
v0.1.0-dev Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JsonConfigFileName       = "space.json"
	SpaceServerPort          = "space/rpcPort"
	SpaceProxyServerPort     = "space/rpcProxyPort"
	SpaceRestProxyServerPort = "space/restProxyPort"
	SpaceStorageSiteUrl      = "space/storageSiteUrl"
	SpaceStorePath           = "space/storePath"
	TextileHubTarget         = "space/textileHubTarget"
	TextileHubMa             = "space/textileHubMa"
	TextileThreadsTarget     = "space/textileThreadsTarget"
	TextileHubGatewayUrl     = "space/TextileHubGatewayUrl"
	TextileUserKey           = "space/textileUserKey"
	TextileUserSecret        = "space/textileUserSecret"
	MountFuseDrive           = "space/mountFuseDrive"
	FuseMountPath            = "space/fuseMountPath"
	FuseDriveName            = "space/fuseDriveName"
	SpaceServicesAPIURL      = "space/servicesApiUrl"
	SpaceVaultAPIURL         = "space/vaultApiUrl"
	SpaceVaultSaltSecret     = "space/vaultSaltSecret"
	SpaceServicesHubAuthURL  = "space/servicesHubAuthUrl"
	Ipfsaddr                 = "space/ipfsAddr"
	Ipfsnode                 = "space/ipfsNode"
	Ipfsnodeaddr             = "space/ipfsNodeAddr"
	Ipfsnodepath             = "space/ipfsNodePath"
	Mongousr                 = "space/mongoUsr"
	Mongopw                  = "space/mongoPw"
	Mongohost                = "space/mongoHost"
	Mongorepset              = "space/mongoRepSet"
	MinThreadsConnection     = "space/minThreadsConn"
	MaxThreadsConnection     = "space/maxThreadsConn"
)

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
	GetBool(key string, defaultValue interface{}) bool
}

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
	Ipfsnode             bool
	Ipfsnodeaddr         string
	Ipfsnodepath         string
	Mongousr             string
	Mongopw              string
	Mongohost            string
	Mongorepset          string
	DevMode              bool
	ServicesAPIURL       string
	SpaceStorageSiteUrl  string
	VaultAPIURL          string
	VaultSaltSecret      string
	ServicesHubAuthURL   string
	TextileHubTarget     string
	TextileHubMa         string
	TextileThreadsTarget string
	TextileHubGatewayUrl string
	TextileUserKey       string
	TextileUserSecret    string
}

Jump to

Keyboard shortcuts

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