config

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Settings

type Settings struct {
	Environment                    string `yaml:"ENVIRONMENT"`
	Port                           string `yaml:"PORT"`
	LogLevel                       string `yaml:"LOG_LEVEL"`
	DBUser                         string `yaml:"DB_USER"`
	DBPassword                     string `yaml:"DB_PASSWORD"`
	DBPort                         string `yaml:"DB_PORT"`
	DBHost                         string `yaml:"DB_HOST"`
	DBName                         string `yaml:"DB_NAME"`
	DBMaxOpenConnections           int    `yaml:"DB_MAX_OPEN_CONNECTIONS"`
	DBMaxIdleConnections           int    `yaml:"DB_MAX_IDLE_CONNECTIONS"`
	ServiceName                    string `yaml:"SERVICE_NAME"`
	JWTKeySetURL                   string `yaml:"JWT_KEY_SET_URL"`
	GRPCPort                       string `yaml:"GRPC_PORT"`
	SwaggerBaseURL                 string `yaml:"SWAGGER_BASE_URL"`
	ElasticSearchAnalyticsHost     string `yaml:"ELASTIC_SEARCH_ANALYTICS_HOST"`
	ElasticSearchAnalyticsUsername string `yaml:"ELASTIC_SEARCH_ANALYTICS_USERNAME"`
	ElasticSearchAnalyticsPassword string `yaml:"ELASTIC_SEARCH_ANALYTICS_PASSWORD"`
	DeviceDataIndexName            string `yaml:"DEVICE_DATA_INDEX_NAME"`
	DevicesAPIGRPCAddr             string `yaml:"DEVICES_API_GRPC_ADDR"`
}

Settings contains the application config

func (*Settings) GetWriterDSN

func (app *Settings) GetWriterDSN(withSearchPath bool) string

GetWriterDSN builds the connection string to the db writer - for now same as reader

Jump to

Keyboard shortcuts

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