server

package
v0.168.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: AGPL-3.0 Imports: 28 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:"required,port"`
	Host                 string         `koanf:"host"                 validate:"required,hostname|fqdn|ip"`
	BaseURL              string         `koanf:"baseurl"              validate:"required,url"`
	CompressionLevel     int            `koanf:"compressionlevel"     validate:"number"`
	CompressionMimetypes []string       `koanf:"compressionmimetypes"`
	CertFile             string         `koanf:"crt"                  validate:"omitempty,file"`
	KeyFile              string         `koanf:"key"                  validate:"omitempty,file"`
	ReadTimeout          config.Timeout `koanf:"readtimeout"          validate:"required,validateFn"`
	WriteTimeout         config.Timeout `koanf:"writetimeout"         validate:"required,validateFn"`
	IdleTimeout          config.Timeout `koanf:"idletimeout"          validate:"required,validateFn"`
	BlockSignup          bool           `koanf:"blocksignup"`
	BlockLogin           bool           `koanf:"blocklogin"`
	EnableOTEL           bool           `koanf:"enableotel"`
}

Config contains the server configuration options.

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.
etag
Package etag implements middleware for handling the ETag header in responses.
Package etag implements middleware for handling the ETag header in responses.
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