config

package
v0.0.0-...-414f6a4 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config struct {
	Server struct {
		Host              string         `koanf:"host"`
		Port              int            `koanf:"port"`
		CompresssionLevel compress.Level `koanf:"compression_level"`
		Prefork           bool           `koanf:"prefork"`

		Ratelimits struct {
			Requests int           `koanf:"requests"`
			Duration time.Duration `koanf:"duration"`
		} `koanf:"ratelimits"`
	}

	Documents struct {
		IDLength          int   `koanf:"id_length"`
		MaxDocumentLength int   `koanf:"max_document_length"`
		MaxAge            int64 `koanf:"max_age"`
	} `koanf:"documents"`

	Database struct {
		Dialect       string `koanf:"dialect"`
		ConnectionURI string `koanf:"connection_uri"`
	} `koanf:"database"`
}

Config is the loaded config object

Functions

func Load

func Load() error

Load configuration from file

Types

This section is empty.

Jump to

Keyboard shortcuts

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