config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Options(
	fx.Provide(New),
)

Module exported for returning the application Config.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServiceName         string `envconfig:"SERVICE_NAME" default:"spoty"`
	Prod                bool   `envconfig:"PROD" default:"false"`
	SpotifyClientID     string `envconfig:"SPOTIFY_CLIENT_ID" required:"true"`
	SpotifyClientSecret string `envconfig:"SPOTIFY_CLIENT_SECRET" required:"true"`
	SpotifyRedirectURI  string `envconfig:"SPOTIFY_REDIRECT_URI" default:"http://0.0.0.0:13337/api/callback"`
	HttpServerHost      string `envconfig:"HTTP_SERVER_HOST" default:"0.0.0.0"`
	HttpServerPort      int    `envconfig:"HTTP_SERVER_PORT" default:"13337"`
	CacheMaxKeys        int64  `envconfig:"CACHE_MAX_KEYS" default:"64"`
	CacheMaxCost        int64  `envconfig:"CACHE_MAX_COST" default:"1000000"`
	JaegerEndpoint      string `envconfig:"JAEGER_ENDPOINT" default:"http://localhost:14268/api/traces"`
	AMQPURI             string `envconfig:"AMQP_URI" default:"amqp://guest:guest@localhost:5672"`
}

Config is the configuration for the application.

func New

func New() (*Config, error)

New processes and returns a new application Config.

Jump to

Keyboard shortcuts

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