config

package
v0.0.0-...-492db17 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 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 Config

type Config struct {
	DatabaseURL string `toml:"db_url"`
	API         struct {
		Domain   string `toml:"domain"`
		Port     uint16 `toml:"port"`
		UseTLS   bool   `toml:"use_tls"`
		CertFile string `toml:"cert_file"`
		KeyFile  string `toml:"key_file"`
	} `toml:"api"`
	WebApp struct {
		Domain                 string `toml:"domain"`
		Port                   uint16 `toml:"port"`
		ResourcesPath          string `toml:"resources_path"`
		AllowSelfSignedAPICert bool   `toml:"allow_self_signed_api_cert"`
		UseTLS                 bool   `toml:"use_tls"`
		CertFile               string `toml:"cert_file"`
		KeyFile                string `toml:"key_file"`
	} `toml:"webapp"`
}

Config is type in which config is stored (OGO BLIN NAFIG)

func (*Config) InitFromTOML

func (c *Config) InitFromTOML(stream io.Reader) error

InitFromToml wraps toml.DecodeReader, because "you don't need to import toml to use config"(c)

Jump to

Keyboard shortcuts

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