util

package
v0.0.0-...-80e74b5 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const HttpCode = "x-http-code"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Environment       string `mapstructure:"ENVIRONMENT"`
	HTTPServerAddress string `mapstructure:"HTTP_SERVER_ADDRESS"`
	GRPCServerAddress string `mapstructure:"GRPC_SERVER_ADDRESS"`
	ScyllaKeyspace    string `mapstructure:"SCYLLA_KEYSPACE"`
	ScyllaHosts       string `mapstructure:"SCYLLA_HOSTS"`
	ScyllaPort        string `mapstructure:"SCYLLA_PORT"`
	RedisAddress      string `mapstructure:"REDIS_ADDRESS"`
	RedisPassword     string `mapstructure:"REDIS_PASSWORD"`
	RedisDatabase     string `mapstructure:"REDIS_DATABASE"`
}

Config stores all configuration of the application. The values are read by viper from a config file or environment variable.

func LoadConfig

func LoadConfig(path string) (config Config, err error)

LoadConfig reads configuration from file or environment variables.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳