configs

package
v0.0.0-...-7fd60d6 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//API the base path for the services
	API = "/api"

	// APIHealth health check path
	APIHealth = API + "/health"

	// APITemperature weather api path
	APITemperature = API + "/temperature"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Log struct {
		Level string `env:"SUNNY_LOG_LEVEL"`
	}
	Server struct {
		Port    int `env:"SUNNY_SERVER_PORT"`
		Swagger struct {
			Enabled bool   `env:"SUNNY_SWAGGER_ENABLED"`
			Path    string `env:"SUNNY_SWAGGER_PATH"`
		}
		Geolocation struct {
			Internal bool   `env:"SUNNY_GEOLOCATION_INTERNAL"`
			Path     string `env:"SUNNY_GEOLOCATION_PATH"`
		}
	}
	External struct {
		Geolocation struct {
			Host   string `env:"SUNNY_EXTERNAL_GEOLOCATION_HOST"`
			ApiKey string `env:"SUNNY_EXTERNAL_GEOLOCATION_APIKEY"`
		}
		Weather struct {
			Host   string `env:"SUNNY_EXTERNAL_WEATHER_HOST"`
			ApiKey string `env:"SUNNY_EXTERNAL_WEATHER_APIKEY"`
		}
	}
}

func (*Config) PrintConfigs

func (c *Config) PrintConfigs(l *zap.Logger, version string)

Jump to

Keyboard shortcuts

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