config

package
v0.0.0-...-0eba841 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Nekobin  Nekobin  `yaml:"nekobin"`
	Database Database `yaml:"database"`
	Limits   Limits   `yaml:"limits"`
}

func Load

func Load(path string) *Config

type Database

type Database struct {
	URI string `yaml:"uri"`

	MaxIdleConns    int           `yaml:"max_idle_conns"`
	MaxOpenConns    int           `yaml:"max_open_conns"`
	ConnMaxLifetime time.Duration `yaml:"conn_max_lifetime"`
}

type Documents

type Documents struct {
	Get  []limiter.Limit `yaml:"get"`
	Post []limiter.Limit `yaml:"post"`
}

type Limits

type Limits struct {
	Documents Documents `yaml:"documents"`
}

type Nekobin

type Nekobin struct {
	Host string `yaml:"host"`
	Port string `yaml:"port"`

	MaxTitleLength   int `yaml:"max_title_length"`
	MaxAuthorLength  int `yaml:"max_author_length"`
	MaxContentLength int `yaml:"max_content_length"`
}

Jump to

Keyboard shortcuts

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