config

package
v0.0.0-...-0120b79 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package config impls method to load and use configuration

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AppPort           string `mapstructure:"APP_PORT"`
	CassandraHost     string `mapstructure:"CASSANDRA_HOST"`
	CassandraPort     int    `mapstructure:"CASSANDRA_PORT"`
	CassandraKeyspace string `mapstructure:"CASSANDRA_KEYSPACE"`
	StreamAPIKey      string `mapstructure:"STREAM_API_KEY"`
	StreamAPISecret   string `mapstructure:"STREAM_API_SECRET"`
	StreamAPIRegion   string `mapstructure:"STREAM_API_REGION"`
}

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

func LoadConfig

func LoadConfig() (config Config, err error)

LoadConfig loads env variables to config object

Jump to

Keyboard shortcuts

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