config

package
v0.0.0-...-aeadd1c Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Name string
	Env  string
}

App contains all the environment variables for the application

type Container

type Container struct {
	App   *App
	Token *Token
	Redis *Redis
	DB    *DB
	HTTP  *HTTP
}

Container contains environment variables for the application, database, cache, token, and http server

func New

func New() (*Container, error)

New creates a new container instance

type DB

type DB struct {
	Connection string
	Host       string
	Port       string
	User       string
	Password   string
	Name       string
}

Database contains all the environment variables for the database

type HTTP

type HTTP struct {
	Env            string
	URL            string
	Port           string
	AllowedOrigins string
}

HTTP contains all the environment variables for the http server

type Redis

type Redis struct {
	Addr     string
	Password string
}

Redis contains all the environment variables for the cache service

type Token

type Token struct {
	Duration string
}

Token contains all the environment variables for the token service

Jump to

Keyboard shortcuts

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