config

package
v0.0.0-...-a8dead8 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	RestApi    RestApi              `yaml:"rest" json:"rest"`
	Database   database.Config      `yaml:"database" json:"database"`
	EnableOTEL bool                 `yaml:"enableOtel" json:"enableOtel" default:"false"`
	JWT        middleware.JWTConfig `yaml:"jwt" json:"jwt"`
}

Config serves as a struct to which configuration is mapped into from ENV or configuration file it is a global variable that can be accessed from anywhere in a program

var (
	Conf Config
)

func InitConfig

func InitConfig() Config

type RestApi

type RestApi struct {
	Context string `yaml:"context" json:"context" env:"REST_API_CONTEXT" env-default:"/"`
	Port    int    `yaml:"port" json:"port" env:"REST_API_PORT" env-default:"8080"`
}

Jump to

Keyboard shortcuts

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