config

package
v0.0.0-...-042b078 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func ConnectDB

func ConnectDB() *mongo.Client

func GetCollection

func GetCollection(client *mongo.Client, collectionName string) *mongo.Collection

Types

type AppConfig

type AppConfig struct {
	Port string
	Host string
	Addr string
}

type Config

type Config struct {
	Application AppConfig
	Database    DatabaseConfig
}

func GetEnv

func GetEnv() Config

func LoadConfig

func LoadConfig() (config Config, err error)

type DatabaseConfig

type DatabaseConfig struct {
	User string
	Pass string
	Host string
	Name string
}

func (*DatabaseConfig) GetUri

func (db *DatabaseConfig) GetUri() string

Jump to

Keyboard shortcuts

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