config

package
v1.0.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server struct {
		Enabled     bool   `yaml:"enabled"`
		GrpcAddr    string `yaml:"grpc_addr"`
		HttpAddr    string `yaml:"http_addr"`
		HttpDIDAddr string `yaml:"http_did_addr"`
	} `yaml:"server"`
	Sql struct {
		ConnectionString string `yaml:"connection_string"`
		Type             string `yaml:"type"`
	} `yaml:"sql"`
	DID struct {
		UniversalResolverUrls []string `yaml:"universal_resolver_urls"`
	} `yaml:"did"`
	ServiceList []Services `yaml:"service_list"`
	Lightning   struct {
		LndNode Lnd `yaml:"lnd_node"`
	} `yaml:"lightning"`
	IPFS struct {
		Directory string `yaml:"directory"`
	} `yaml:"ipfs"`
	ION ION `yaml:"ion"`
	Log struct {
		IgnoreFileWrite bool `yaml:"ignore_file_write"`
	} `yaml:"log"`
	Key struct {
		Passphrase string `yaml:"passphrase"`
	} `yaml:"key"`
}

func GetConfig

func GetConfig(path string) (config Config)

func (*Config) DoesServiceExists

func (cfg *Config) DoesServiceExists(serviceType string) (bool, error)

type GlobalConfig

type GlobalConfig interface {
	GetConfig() Config
	SaveConfig(cfg Config)
	WriteConfig() error
}

func NewGlobalConfig

func NewGlobalConfig(path string, configChangeChan chan interface{}) (GlobalConfig, error)

type ION

type ION struct {
	Url    string `yaml:"url"`
	Active bool   `yaml:"active"`
}

type Lnd

type Lnd struct {
	Ip               string `yaml:"ip"`
	Port             string `yaml:"port"`
	PubKey           string `yaml:"pub_key"`
	TlsCert          string `yaml:"tls_cert"`
	TlsCertHex       string `yaml:"tls_cert_hex"`
	AdminMacaroon    string `yaml:"admin_macaroon"`
	AdminMacaroonHex string `yaml:"admin_macaroon_hex"`
	Listening        bool   `yaml:"listening"`
}

type Services

type Services struct {
	ServiceType           string      `yaml:"service_type"`
	Active                bool        `yaml:"active"`
	CustomMessageType     string      `yaml:"custom_message_type"`
	AdditionalServiceData interface{} `yaml:"additional_service_data"`
}

Jump to

Keyboard shortcuts

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