config

package
v0.0.0-...-8735fdd Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "unknown"

Functions

This section is empty.

Types

type Config

type Config struct {
	Token         string `env:"TOKEN"`
	UploadDir     string `env:"UPLOAD_DIR"      envDefault:"./uploads"`
	Port          int    `env:"PORT"            envDefault:"8080"`
	MaxSizeUpload int64  `env:"MAX_SIZE_UPLOAD" envDefault:"104857600"` // 100 MB

	DBHost     string `env:"DB_HOST"     envDefault:"localhost"`
	DBPort     string `env:"DB_PORT"     envDefault:"5432"`
	DBUser     string `env:"DB_USER"     envDefault:"user"`
	DBPassword string `env:"DB_PASSWORD" envDefault:"password"`
	DBName     string `env:"DB_NAME"     envDefault:"app_db"`
}

func New

func New() *Config

func (*Config) GetUploadDir

func (c *Config) GetUploadDir() string

Jump to

Keyboard shortcuts

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