config

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: AGPL-3.0 Imports: 1 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 {
	// HTTP server settings
	Host string
	Port int

	// Valkey/Redis connection
	ValkeyURL      string
	ValkeyPassword string
	ValkeyDB       int

	// UI settings
	OpenBrowser bool

	// Security settings
	ReadOnly     bool
	Prefix       string // Only show/allow keys matching this prefix
	DisableFlush bool   // Block FLUSHDB even in write mode
	MaxKeys      int64  // Limit SCAN count to prevent UI overload (0 = no limit)
	CORSOrigin   string // Allowed CORS origin (default: same-origin only)

	// WebSocket settings
	Notifications bool // Auto-enable Valkey keyspace notifications for live updates

	// Development
	Dev bool // Skip serving embedded frontend

	// Build info (set at build time via main.go)
	Version string
	Commit  string
	Dirty   bool
}

Config holds all application configuration

func New

func New() *Config

New creates a new Config with default values

func (*Config) Addr

func (c *Config) Addr() string

Addr returns the HTTP server address

Jump to

Keyboard shortcuts

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