Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Config = Configuration{ ListenAddr: ":8080", BaseURL: "http://localhost:8080", DisplayURL: "", DataDir: "data", Backend: "boltdb", EnableDebugMode: false, EnableAccessLogs: true, EnableColorLogs: true, UseSSL: false, ShortedIDLength: 4, AuthBackend: "oauth", Redis: redisConf{ Host: "127.0.0.1:6379", MaxRetries: 3, ReadTimeout: "3s", WriteTimeout: "3s", SessionDB: "1", SharedKey: "secret", }, }
Config contains the default values
Functions ¶
func CheckForPrivateKey ¶
func CheckForPrivateKey() error
CheckForPrivateKey checks if already an private key exists, if not it will be randomly generated and saved as a private.dat file in the data directory
func ReadInConfig ¶
func ReadInConfig() error
ReadInConfig loads the Configuration and other needed folders for further usage
Types ¶
type Configuration ¶
type Configuration struct { ListenAddr string `yaml:"ListenAddr" env:"LISTEN_ADDR"` BaseURL string `yaml:"BaseURL" env:"BASE_URL"` DisplayURL string `yaml:"DisplayURL" env:"DISPLAY_URL"` DataDir string `yaml:"DataDir" env:"DATA_DIR"` Backend string `yaml:"Backend" env:"BACKEND"` AuthBackend string `yaml:"AuthBackend" env:"AUTH_BACKEND"` UseSSL bool `yaml:"EnableSSL" env:"USE_SSL"` EnableDebugMode bool `yaml:"EnableDebugMode" env:"ENABLE_DEBUG_MODE"` EnableAccessLogs bool `yaml:"EnableAccessLogs" env:"ENABLE_ACCESS_LOGS"` EnableColorLogs bool `yaml:"EnableColorLogs" env:"ENABLE_COLOR_LOGS"` ShortedIDLength int `yaml:"ShortedIDLength" env:"SHORTED_ID_LENGTH"` Google oAuthConf `yaml:"Google" env:"GOOGLE"` GitHub oAuthConf `yaml:"GitHub" env:"GITHUB"` Microsoft oAuthConf `yaml:"Microsoft" env:"MICROSOFT"` Okta oAuthConf `yaml:"Okta" env:"OKTA"` Proxy proxyAuthConf `yaml:"Proxy" env:"PROXY"` Redis redisConf `yaml:"Redis" env:"REDIS"` }
Configuration are the available config values
type Info ¶
type Info struct { NodeJS string `json:"nodeJS"` Commit string `json:"commit"` Yarn string `json:"yarn"` CompilationTime string `json:"compilationTime"` }
Info holds the information which will be added at build time
var VersionInfo Info
VersionInfo are the information which will be added at build time and shown in the frontend under the about tab
Click to show internal directories.
Click to hide internal directories.