config

package
v0.0.0-...-eb61186 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultConfigPath is the default path to the config file
	DefaultConfigPath = "/etc/uptimo.toml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DB     DBConfig     `toml:"db"`
	Debug  bool         `toml:"debug"`
	Server ServerConfig `toml:"server"`
}

func LoadConfig

func LoadConfig() (*Config, error)

type DBConfig

type DBConfig struct {
	Driver string `toml:"driver"`
	URL    string `toml:"url"`
}

type ServerConfig

type ServerConfig struct {
	Port      int        `toml:"port"`
	RateLimit rate.Limit `toml:"rate_limit"`
}

Jump to

Keyboard shortcuts

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