Documentation ¶
Index ¶
- Constants
- func AbsConfigPath(filename string, projectPath string, relPath string) string
- func Bootstrap(appName string, projectPath string)
- func EnvConfigFile() string
- func Extension2Type(ext string) string
- func SetConfiguration(opts *Options)
- func Setup(appName string, projectPath string, filepath string)
- type Options
Constants ¶
View Source
const ( ConfigFileEnvKey string = "BEAP_CONFIG" DefaultConfigDir string = "configs" DefaultConfigFile string = "app" DefaultConfigType string = "yml" ExtensionSep string = "." ConfigReadError string = "Couldn't read config file" )
Configuration related constants
Variables ¶
This section is empty.
Functions ¶
func AbsConfigPath ¶
AbsConfigPath ...
func EnvConfigFile ¶
func EnvConfigFile() string
EnvConfigFile extracts the value associated with the environment variable that specifies which config file to use when starting up a system.
Types ¶
type Options ¶
type Options struct { AbsPath string // The absolute path to the config file AppName string ConfigDir string File string // The name of the config file, minus any path or extension ProjectPath string // The absolute path to the project being configured RelPath string // The relative path to the config file Type string // The config file type, usually extension }
Options for use in configuration functions
func ParseConfigFilename ¶
ParseConfigFilename takes a given string and parses it as a filename, separating prefix directories, name of file, and file extension.
Click to show internal directories.
Click to hide internal directories.