config

package
v0.0.0-...-9a8ac55 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: AGPL-3.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 Config

type Config struct {
	IsDefault bool           `toml:"-"`
	Instance  InstanceConfig `toml:"instance"`
	Database  DatabaseConfig `toml:"database"`
}

func LoadConfig

func LoadConfig(path string) (Config, error)

load config by path (filename), if specified file does not exist, return the default config as hardcoded below.

type DatabaseConfig

type DatabaseConfig struct {
	Host string `toml:"host"`
	User string `toml:"user"`
	Pass string `toml:"pass"`
	DB   string `toml:"db"`
}

type InstanceConfig

type InstanceConfig struct {
	Name        string `toml:"name"`
	Description string `toml:"description"`
	Domain      string `toml:"domain"`
	Software    string `toml:"software"`
}

Jump to

Keyboard shortcuts

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