settings

package
v0.0.0-...-91de801 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppSettings

type AppSettings struct {
	WebserverPort      int         `toml:"webserver_port"`
	AdminWebserverPort int         `toml:"admin_webserver_port"`
	DatabaseHost       string      `toml:"database_host"`
	DatabasePort       int         `toml:"database_port"`
	DatabaseUser       string      `toml:"database_user"`
	DatabasePassword   string      `toml:"database_password"`
	DatabaseName       string      `toml:"database_name"`
	ImageDirectory     string      `toml:"image_dir"`
	Shortcodes         []Shortcode `toml:"shortcodes"`
}

func LoadSettings

func LoadSettings() (*AppSettings, error)

func New

func New(filepath *string) (*AppSettings, error)

func ReadConfigToml

func ReadConfigToml(filepath *string) (*AppSettings, error)

type Shortcode

type Shortcode struct {
	Name   string `toml:"name"`   // name for the shortcode {{ name:…:…}}
	Plugin string `toml:"plugin"` // the lua plugin path
}

Jump to

Keyboard shortcuts

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