server

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: AGPL-3.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCommand

func NewCommand() *cobra.Command

Types

type Config

type Config struct {
	Server         ServerConfig          `mapstructure:"server"`
	Database       database.Config       `mapstructure:"database"`
	PasswordHasher crypto.HashConfig     `mapstructure:"password_hasher"`
	Schema         SchemaConfig          `mapstructure:"schema"`
	Session        service.SessionConfig `mapstructure:"session"`
}

func (Config) Validate

func (c Config) Validate() error

type SchemaConfig

type SchemaConfig struct {
	BuiltinPublicBase string `mapstructure:"builtin_public_base"`
	LRUCacheSize      int    `mapstructure:"lru_cache_size"`
}

type ServerConfig

type ServerConfig struct {
	Address string `mapstructure:"address"`
	// DataDir is the local runtime root used by zero-config server defaults.
	// When unset, it defaults to a nextgen-data directory next to the binary.
	DataDir string `mapstructure:"data_dir"`
	// EncryptionKey is the 32-byte (hex-encoded, 64 chars) symmetric
	// key used to seal flow cookies. If unset, the server creates or reuses
	// EncryptionKeyFile.
	EncryptionKey string `mapstructure:"encryption_key"`
	// EncryptionKeyFile stores the generated encryption key for zero-config
	// local starts. When unset, it defaults under DataDir.
	EncryptionKeyFile string `mapstructure:"encryption_key_file"`

	ConsoleEnabled bool   `mapstructure:"console_enabled"`
	ConsolePath    string `mapstructure:"console_path"`
	LoginEnabled   bool   `mapstructure:"login_enabled"`
	LoginPath      string `mapstructure:"login_path"`
}

type SessionConfig

type SessionConfig struct {
	DefaultTTL time.Duration `mapstructure:"default_ttl"`
	MaxTTL     time.Duration `mapstructure:"max_ttl"`
}

Jump to

Keyboard shortcuts

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