config

package
v0.0.0-...-1788c2a Latest Latest
Warning

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

Go to latest
Published: Jul 8, 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"`

	Settings struct {
		CloseRegistration bool `toml:"close_registration" json:"close_registration"`
	} `toml:"settings" json:"settings"`
}

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