config

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

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

	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"

	// Only for testing purposes
	CLNDatadir = "CLN_DATADIR"

	// 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
	CLNDatadir       string // for testing purposes only
	UnlockerType     string
	UnlockerFilePath string
	UnlockerPassword string
	DisableTelemetry bool
	// 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