config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Address string `env:"ADDRESS" envDefault:"0.0.0.0:7080"`
	// ResourceLocation is the location where Arkwaifu puts its resources.
	// The "resources" include AVG images and backgrounds.
	//
	// There will be "{config.ResourceLocation}/{resVersion}" subdirectories under ResourceLocation, which are the
	// resources of the specified version.
	ResourceLocation string `env:"RESOURCE_LOCATION" envDefault:"./arkwaifu_resource"`

	PostgresDSN string `env:"POSTGRES_DSN"`

	// ForceUpdate indicates whether the updateloop should force an update during initialization (only once).
	// This environment variable is useful in development. Don't use in production unless you really find it fits.
	ForceUpdate bool `env:"FORCE_UPDATE" envDefault:"false"`
}

func ProvideConfig

func ProvideConfig() (*Config, error)

Jump to

Keyboard shortcuts

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