Documentation
¶
Index ¶
Constants ¶
const DefaultPort = 53842
DefaultPort for the webserver
Variables ¶
var BuildTime = "Dev Build"
BuildTime is the time of the build (auto-generated value)
var Builder = "Manual Build"
Builder is the name of builder (auto-generated value)
var IsDocker = "false"
IsDocker has to be true if compiled for the Docker image (auto-generated value)
Functions ¶
func GetConfigPaths ¶
GetConfigPaths returns the config paths to config files and the directory containing the files. The following results are returned: Path to config file, Path to directory containing config file, Name of config file, Path to AWS config file
func IsDockerInstance ¶
func IsDockerInstance() bool
IsDockerInstance returns true if the binary was compiled with the official docker makefile, which sets IsDocker to true
Types ¶
type Environment ¶
type Environment struct { ConfigDir string `env:"CONFIG_DIR" envDefault:"config"` ConfigFile string `env:"CONFIG_FILE" envDefault:"config.json"` DataDir string `env:"DATA_DIR" envDefault:"data"` WebserverPort int `env:"PORT" envDefault:"53842"` LengthId int `env:"LENGTH_ID" envDefault:"15"` MaxMemory int `env:"MAX_MEMORY_UPLOAD" envDefault:"40"` MaxFileSize int `env:"MAX_FILESIZE" envDefault:"102400"` // 102400==100GB AwsBucket string `env:"AWS_BUCKET"` AwsRegion string `env:"AWS_REGION"` AwsKeyId string `env:"AWS_KEY"` AwsKeySecret string `env:"AWS_KEY_SECRET"` AwsEndpoint string `env:"AWS_ENDPOINT"` ConfigPath string FileDbPath string FileDb string `env:"FILE_DB" envDefault:"filestorage.db"` }
Environment is a struct containing available env variables
func (*Environment) IsAwsProvided ¶
func (e *Environment) IsAwsProvided() bool
IsAwsProvided returns true if all required env variables have been set for using AWS S3 / Backblaze