server

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: AGPL-3.0 Imports: 25 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(logger *slog.Logger) error

Start will start the server.

Types

type Config

type Config struct {
	Port         uint64  `koanf:"port"         validate:"port"`
	Host         string  `koanf:"host"         validate:"hostname|fqdn|ip"`
	CertFile     string  `koanf:"crt"          validate:"omitempty,file"`
	KeyFile      string  `koanf:"key"          validate:"omitempty,file"`
	ReadTimeout  timeout `koanf:"readtimeout"  validate:"required,validateFn"`
	WriteTimeout timeout `koanf:"writetimeout" validate:"required,validateFn"`
	IdleTimeout  timeout `koanf:"idletimeout"  validate:"required,validateFn"`
	BlockSignup  bool    `koanf:"blocksignup"`
	BlockLogin   bool    `koanf:"blocklogin"`
	ImgProxy     ImgProxyConfig
}

Config contains the server configuration options.

type ImgProxyConfig

type ImgProxyConfig struct {
	Key     string `koanf:"key"     validate:"required,base64rawurl"`
	Salt    string `koanf:"salt"    validate:"required,base64rawurl"`
	BaseURL string `koanf:"baseurl" validate:"required,url"`
}

Directories

Path Synopsis
Package forms contains methods for handling form decoding and encoding.
Package forms contains methods for handling form decoding and encoding.
Package handlers contains chainable handlers/middleware for routing.
Package handlers contains chainable handlers/middleware for routing.
Package session contains methods and objects for managing user sessions.
Package session contains methods and objects for managing user sessions.

Jump to

Keyboard shortcuts

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