config

package
v0.0.0-...-37d38c9 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "1.0"

Version is the box version

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ListenAddress   string
	SecretKey       string
	MaxUsers        int64
	UploadDirectory string
	DatabaseFile    string
	JWTSecret       string
}

Config holds the global configuration of the app

func (*Config) GetFromDotEnv

func (c *Config) GetFromDotEnv()

GetFromDotEnv gets the config from the .env file

func (*Config) GetFromEnv

func (c *Config) GetFromEnv()

GetFromEnv gets the config from environment variables

func (*Config) InitConfig

func (c *Config) InitConfig(dotenv bool)

InitConfig initializes the configuration object

func (*Config) SetDefaults

func (c *Config) SetDefaults()

SetDefaults sets the config to default

Jump to

Keyboard shortcuts

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