config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package config handles configuration via environment variables

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MongoURI             string        `env:"MONGO_URI,required" usage:"URI to MongoDB host. Example: mongodb://user:pass@localhost:27017"`
	APIRootURL           string        `env:"API_URL,required" usage:"Root URL of Helldivers 2 API. Example: http://localhost:4000"`
	APIRateLimitInterval time.Duration `` /* 134-byte string literal not displayed */
	APIRateLimitCount    int           `` /* 150-byte string literal not displayed */
	WorkerInterval       time.Duration `env:"WORKER_INTERVAL" default:"5m" usage:"Interval at which data will be queried from the API and written to the database."`
}

Config contains configuration values

func Get

func Get() *Config

Get reads environment variables and parses them into a Config struct.

Any required environment variables which are not provided will cause the application to exit.

Jump to

Keyboard shortcuts

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