config

package
v0.3.19 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EntityWallet       = "wallet"
	EntityService      = "service"
	EntityNotification = "notification"
	EntityDelegator    = "delegator"

	ActionAccess = "access"
)

Variables

View Source
var (
	Datadir               = "DATADIR"
	DbType                = "DB_TYPE"
	GRPCPort              = "GRPC_PORT"
	HTTPPort              = "HTTP_PORT"
	WithTLS               = "WITH_TLS"
	LogLevel              = "LOG_LEVEL"
	ArkServer             = "ARK_SERVER"
	EsploraURL            = "ESPLORA_URL"
	BoltzURL              = "BOLTZ_URL"
	BoltzWSURL            = "BOLTZ_WS_URL"
	DisableTelemetry      = "DISABLE_TELEMETRY"
	NoMacaroons           = "NO_MACAROONS"
	OtelCollectorURL      = "OTEL_COLLECTOR_URL"
	OtelPushInterval      = "OTEL_PUSH_INTERVAL"
	PyroscopeURL          = "PYROSCOPE_URL"
	LndUrl                = "LND_URL"
	ClnUrl                = "CLN_URL"
	ClnDatadir            = "CLN_DATADIR"
	LndDatadir            = "LND_DATADIR"
	SwapTimeout           = "SWAP_TIMEOUT"
	SchedulerPollInterval = "SCHEDULER_POLL_INTERVAL"
	ProfilingEnabled      = "PROFILING_ENABLED"
	RefreshDbInterval     = "REFRESH_DB_INTERVAL"
	DelegatorPort         = "DELEGATOR_PORT"
	DelegatorFee          = "DELEGATOR_FEE"
	DelegatorEnabled      = "DELEGATOR_ENABLED"

	// Unlocker configuration
	UnlockerType     = "UNLOCKER_TYPE"
	UnlockerFilePath = "UNLOCKER_FILE_PATH"
	UnlockerPassword = "UNLOCKER_PASSWORD"
)

Functions

func AdminPermissions added in v0.1.12

func AdminPermissions() []bakery.Op

AdminPermissions grants access to all protected methods for all entities

func AllPermissionsByMethod added in v0.1.12

func AllPermissionsByMethod() map[string][]bakery.Op

AllPermissionsByMethod combines whitelisted and protected methods

func ProtectedByMethod added in v0.1.12

func ProtectedByMethod() map[string][]bakery.Op

ProtectedByMethod methods requiring user macaroon

func WhitelistedByMethod added in v0.1.12

func WhitelistedByMethod() map[string][]bakery.Op

WhitelistedByMethod methods accessible without macaroon (public)

Types

type Config

type Config struct {
	Datadir               string
	DbType                string
	GRPCPort              uint32
	HTTPPort              uint32
	WithTLS               bool
	LogLevel              uint32
	ArkServer             string
	EsploraURL            string
	BoltzURL              string
	BoltzWSURL            string
	SchedulerPollInterval int64
	ProfilingEnabled      bool
	RefreshDbInterval     int64
	DelegatorPort         uint32
	DelegatorFee          uint64
	DelegatorEnabled      bool

	UnlockerType     string
	UnlockerFilePath string
	UnlockerPassword string
	DisableTelemetry bool
	SwapTimeout      uint32
	OtelCollectorURL string
	OtelPushInterval int64
	PyroscopeURL     string

	LnConnectionOpts *domain.LnConnectionOpts
	// contains filtered or unexported fields
}

func LoadConfig

func LoadConfig() (*Config, error)

func (Config) MacaroonSvc added in v0.1.12

func (c Config) MacaroonSvc() macaroon.Service

func (*Config) UnlockerService added in v0.1.8

func (c *Config) UnlockerService() ports.Unlocker

Jump to

Keyboard shortcuts

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