config

package
v0.0.0-...-ba1e856 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultRelays = []string{
	"wss://relay.8333.space",
}

Functions

func LoadConfig

func LoadConfig[T any]() (*T, error)

load the and marshal Configuration from .env file from the UserHomeDir if this file was not found, fallback to the os environment variables

Types

type EntryConfig

type EntryConfig struct {
	NostrRelays   []string `env:"NOSTR_RELAYS" envSeparator:";"`
	PublicAddress string   `env:"PUBLIC_ADDRESS"`
}

type ExitConfig

type ExitConfig struct {
	NostrRelays     []string `env:"NOSTR_RELAYS" envSeparator:";"`
	NostrPrivateKey string   `env:"NOSTR_PRIVATE_KEY"`
	BackendHost     string   `env:"BACKEND_HOST"`
	BackendScheme   string   `env:"BACKEND_SCHEME"`
	HttpsPort       int32
	HttpsTarget     string
	Public          bool `env:"PUBLIC"`
}

Jump to

Keyboard shortcuts

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