config

package
v0.0.0-...-8cd5d0d Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACME

type ACME struct {
	Email        string `toml:"email"`
	DirectoryURL string `toml:"directory_url"`
}

type API

type API struct {
	UseSSL     bool     `toml:"use_ssl"`
	Domain     string   `toml:"domain"`
	CertFile   string   `toml:"cert_file"`
	KeyFile    string   `toml:"key_file"`
	Port       int      `toml:"port"`
	Token      string   `toml:"token"`
	AllowedIPs []string `toml:"allowed_ips"`
}

type Config

type Config struct {
	CertDirectory  string `toml:"cert_directory"`
	MaxBodyBytes   int    `toml:"max_body_bytes"`
	MaxHeaderBytes int    `toml:"max_header_bytes"`
	StrictSNIHost  bool   `toml:"strict_sni_host"`
	HSTS           bool   `toml:"hsts"`
	API            API    `toml:"api"`
	ACME           ACME   `toml:"acme"`
	Redis          Redis  `toml:"redis"`
}

func ParseFile

func ParseFile(p string) (Config, error)

ParseFile returns a new decoded Config using given path.

type Redis

type Redis struct {
	Prefix   string `toml:"prefix"`
	Host     string `toml:"host"`
	Port     int    `toml:"port"`
	Password string `toml:"password"`
}

Jump to

Keyboard shortcuts

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