config

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 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"
	MinThreadsConnection     = "space/minThreadsConn"
	MaxThreadsConnection     = "space/maxThreadsConn"
	BuckdPath                = "space/BuckdPath"
	BuckdApiMaAddr           = "space/BuckdApiMaAddr"
	BuckdApiProxyMaAddr      = "space/BuckdApiProxyMaAddr"
	BuckdThreadsHostMaAddr   = "Space/BuckdThreadsHostMaAddr"
	BuckdGatewayPort         = "Space/BuckdGatewayPort"
	LogLevel                 = "Space/LogLevel"
)

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(flags *Flags) Config

type Flags

type Flags struct {
	Ipfsaddr               string
	Ipfsnode               bool
	Ipfsnodeaddr           string
	Ipfsnodepath           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
	SpaceStorePath         string
	RpcServerPort          int
	RpcProxyServerPort     int
	RestProxyServerPort    int
	BuckdPath              string
	BuckdApiMaAddr         string
	BuckdApiProxyMaAddr    string
	BuckdThreadsHostMaAddr string
	BuckdGatewayPort       int
	LogLevel               string
}

Jump to

Keyboard shortcuts

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