config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Create the first init function to be executed in the package

This file contains the configuration for the MySQL database connection. This is a custom implementation and can be changed as needed!

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDB

func GetDB() *gorm.DB

GetDB returns the global database connection

func GetEnv

func GetEnv(key string) (string, bool)

GetEnv returns the value and existance status of the environment variable with the given key

func GetEnvValue

func GetEnvValue(key string) string

GetEnvValue returns the value of the environment variable with the given key. If no such key exists, an empty string is returned

func GetEnvWithDefault

func GetEnvWithDefault(key, defaultValue string) string

GetEnvWithDefault returns the value of the environment variable with the given key. If no such key exists, the default value is returned

func KeyExists

func KeyExists(key string) bool

KeyExists returns true if the environment variable with the given key exists, false otherwise

Types

This section is empty.

Jump to

Keyboard shortcuts

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