config

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: MIT-0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Hostname string `yaml:"hostname"`
	Smtp     struct {
		Host       string `yaml:"host"`
		Port       int    `yaml:"port"`
		Validation struct {
			MaximumLineLength int `yaml:"maximum_line_length"`
			MaximumReceivers  int `yaml:"maximum_receivers"`
		} `yaml:"validation"`
	} `yaml:"smtp"`
	Http struct {
		Host         string `yaml:"host"`
		Port         int    `yaml:"port"`
		Path         string `yaml:"path"`
		AllowOrigins string `yaml:"allow_origins"`
		AssetsRoot   string `yaml:"assets_root"`
		BaseUrl      string `yaml:"base_url"`
	} `yaml:"http"`
	Websocket struct {
		MaxConnection int `yaml:"max_connection"`
	} `yaml:"websocket"`
	Storage struct {
		Use          string `yaml:"use"`
		PerRoomLimit int    `yaml:"per_room_limit"`
		Directory    struct {
			Path string `yaml:"path"`
		} `yaml:"directory"`
	} `yaml:"storage"`
	Authentication struct {
		Use  string `yaml:"use"`
		File struct {
			Path string `yaml:"path"`
		} `yaml:"file"`
	} `yaml:"authentication"`
	Log struct {
		Level string `yaml:"level"`
	} `yaml:"log"`
}

func ParseConfig

func ParseConfig(filePath string) *AppConfig

Jump to

Keyboard shortcuts

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