config

package
v0.0.0-...-6c6b626 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Copyright (c) 2023 Tiago Melo. All rights reserved. Use of this source code is governed by the MIT License that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	KafkaBrokerHost string `envconfig:"KAFKA_BROKER_HOST" required:"true"`
	KafkaTopic      string `envconfig:"KAFKA_TOPIC" required:"true"`
	KafkaGroupId    string `envconfig:"KAFKA_GROUP_ID" required:"true"`
	MongodbDatabase string `envconfig:"MONGODB_DATABASE" required:"true"`
	MongodbHostName string `envconfig:"MONGODB_HOST_NAME" required:"true"`
	MongodbPort     int    `envconfig:"MONGODB_PORT" required:"true"`
}

Config holds all configuration needed by this app.

func Read

func Read(envFile string) (*Config, error)

Read reads the environment variables from the given file and returns a Config.

Jump to

Keyboard shortcuts

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