config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: MIT Imports: 6 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      Server     `yaml:"server"`
	Sql         Sql        `yaml:"sql"`
	DID         DID        `yaml:"did"`
	ServiceList []Services `yaml:"service_list"`
	Lightning   Lightning  `yaml:"lightning"`
	ION         ION        `yaml:"ion"`
	Log         Log        `yaml:"log"`
	Key         Key        `yaml:"key"`
	Kv          Kv         `yaml:"kv"`
}

func DefaultConfig

func DefaultConfig() Config

func GetConfig

func GetConfig(path string) (config Config)

func (*Config) DoesServiceExists

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

type DID

type DID struct {
	UniversalResolverUrls []string `yaml:"universal_resolver_urls"`
}

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 Key

type Key struct {
	Passphrase string `yaml:"passphrase"`
}

type Kv added in v1.0.5

type Kv struct {
	Db string `yaml:"db_file"`
}

type Lightning

type Lightning struct {
	LndNode Lnd `yaml:"lnd_node"`
}

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 Log

type Log struct {
	IgnoreFileWrite bool `yaml:"ignore_file_write"`
}

type Server

type Server struct {
	Enabled     bool   `yaml:"enabled"`
	GrpcAddr    string `yaml:"grpc_addr"`
	HttpAddr    string `yaml:"http_addr"`
	HttpDIDAddr string `yaml:"http_did_addr"`
	ClientAddr  string `yaml:"client_addr"`
}

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"`
}

type Sql

type Sql struct {
	ConnectionString string `yaml:"connection_string"`
	Type             string `yaml:"type"`
}

Jump to

Keyboard shortcuts

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