config

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnv

func GetEnv(key, fallback string) string

func GetEnvAsBool

func GetEnvAsBool(name string, defaultVal bool) bool

func GetEnvAsInt

func GetEnvAsInt(name string, defaultVal int) int

func GetEnvAsUUID

func GetEnvAsUUID(name string) (uuid.UUID, error)

Types

type Config added in v0.0.14

type Config struct {
	ServicePort         int
	NodeHost            string
	XrayExecutablePath  string
	XrayAssetsPath      string
	SslCertFile         string
	SslKeyFile          string
	ApiKey              uuid.UUID
	ServiceProtocol     string
	Debug               bool
	GeneratedConfigPath string
	LogBufferSize       int
}

func Load added in v0.0.14

func Load() (*Config, error)

func NewTestConfig added in v0.0.14

func NewTestConfig(generatedConfigPath string, key uuid.UUID) *Config

NewTestConfig creates a config for testing

Jump to

Keyboard shortcuts

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