config

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

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

Go to latest
Published: May 22, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(db *database.PasteDB) error

LoadConfig loads data from yaml into internal Configuration struct. Get results with GetConfig()

Types

type Configuration

type Configuration struct {
	MaxDatabaseSize         float64 `yaml:"max_database_size"`
	CustomDatabaseDirectory string  `yaml:"custom_database_directory"`
	TextFormName            string  `yaml:"text_form_name"`
	FileFormName            string  `yaml:"file_form_name"`
	AdminCookieName         string  `yaml:"admin_cookie_name"`
	Port                    string  `yaml:"port"`
	AdminKey                string  `yaml:"admin_key"`
}

Configuration is a struct of configuration data from config file.

func GetConfig

func GetConfig() *Configuration

GetConfig returns address for internal config file. Before running this remeber to LoadConfig()

Jump to

Keyboard shortcuts

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