Documentation ¶
Overview ¶
Package conf provide easy configuration and 12-factor app compliant management of the VitrnX App
Index ¶
Constants ¶
View Source
const ( KeyEnvType = "env" KeyAdminEmail = "auth.adminEmail" KeyAnonymousEmail = "auth.anonymousEmail" KeyKnownRoles = "auth.knownRoles" KeyPublicURL = "publicUrl" )
KEYS (to retrieve values via Viper)
View Source
const ( // EnvDev is the development environment EnvDev = "dev" // EnvTest is the test environment EnvTest = "test" // EnvStaging is the pre-production environment EnvStaging = "staging" // EnvProd is the production environment EnvProd = "prod" )
View Source
const (
BaseName = "vitrnx"
)
Variables ¶
View Source
var ( // VitrnxInstanceID exposes the unique name of the current instance, // it is used among others in various file paths when in prod environment VitrnxInstanceID string // VitrnxVersion exposes current version of the backend VitrnxVersion = "0.1.4-SNAPSHOT" // BuildTimestamp exposes running app build time stamp BuildTimestamp = "" // BuildRevision exposes the git id that was at master origin head at the time of building BuildRevision = "" // Env exposes current environment type (dev, prod...) Env = EnvDev )
Functions ¶
func GetAllowedOrigins ¶
func GetAllowedOrigins() string
GetAllowedOrigins simply returns the correct value for CORS policy.
func GetConfigFile ¶
func GetDataFolderPath ¶
func GetDataFolderPath() string
GetDataFolderPath return the path to an existing data folder
func GetKnownConfFolderPaths ¶
func GetKnownConfFolderPaths() []string
GetKnownConfFolderPaths returns an array with the path of the folder where we might find the various configuration files Note that first found must be used.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.