config

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetermineEnv

func DetermineEnv() string

DetermineEnv helps to determine the location of the config file based on platform or flags during running of GoPage

Types

type Config

type Config struct {
	Server      ServerConfigurations
	Directories DirectoriesConfigurations
}

Config is a struct to contain the full config.yml file with multiple sections

func LoadConfig

func LoadConfig(path string) (config Config, err error)

LoadConfig is needed for viper to load the config file

type DirectoriesConfigurations

type DirectoriesConfigurations struct {
	StaticAssets  string
	Templates     string
	Data          string
	Plugin        string
	ServerSetting string
	UserSetting   string
	Script        string
}

DirectoriesConfigurations struct contains the options within the yaml specific to the location of other data

type ServerConfigurations

type ServerConfigurations struct {
	Port int
}

ServerConfigurations struct contains the options within the yaml specific to the server

Jump to

Keyboard shortcuts

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