config

package
v0.0.0-...-a3eebca Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	MaxQueryLimit      int64   `mapstructure:"max_query_limit"`
	MaxDistanceDefault float64 `mapstructure:"max_distance_default"`
}

type Configuration

type Configuration struct {
	App    AppConfig     `mapstructure:"app"`
	Mongo  mongo.Config  `mapstructure:"mongo"`
	Server HttpServer    `mapstructure:"server"`
	Logger logger.Config `mapstructure:"logger"`
	Maps   MapsConfig    `mapstructure:"maps"`
}

func New

func New(configDir string) *Configuration

type HttpServer

type HttpServer struct {
	Port string `mapstructure:"port"`
}

type MapsConfig

type MapsConfig struct {
	LocationQueryPlaceholder  string       `mapstructure:"location_query_placeholder"`
	ProviderAPIKeyPlaceholder string       `mapstructure:"provider_api_key_placeholder"`
	OSM                       MapsProvider `mapstructure:"osm"`
	BingMaps                  MapsProvider `mapstructure:"bing_maps"`
	GoogleMaps                MapsProvider `mapstructure:"google_maps"`
}

type MapsProvider

type MapsProvider struct {
	Key     string `mapstructure:"key"`
	URL     string `mapstructure:"url"`
	Enabled bool   `mapstructure:"enabled"`
}

Jump to

Keyboard shortcuts

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