config

package
v0.0.0-...-c9ce307 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	App struct {
		Name    string `yaml:"name"`
		Version string `yaml:"version"`
	} `yaml:"app"`

	Cache struct {
		Host string `yaml:"host"`
		Port uint16 `yaml:"port"`
	} `yaml:"cache"`

	Server  `yaml:"server"`
	Session `yaml:"session"`
}

func New

func New(path string) (*Configuration, error)

type Server

type Server struct {
	BaseURL        string `yaml:"base_url"`
	Port           uint16 `yaml:"port"`
	AllowedOrigins string `yaml:"origins"`
	RPM            uint16 `yaml:"rpm"`
	Metrics        struct {
		Enabled  bool   `yaml:"enabled"`
		Route    string `yaml:"route"`
		User     string `yaml:"user"`
		Password string `yaml:"password"`
	} `yaml:"metrics"`
}

type Session

type Session struct {
	MaxUsers int  `yaml:"max_users" json:"maxUsers"`
	ReadOnly bool `yaml:"read_only" json:"readOnly"`
}

Jump to

Keyboard shortcuts

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