config

package
v0.0.0-...-d2da372 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 4 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 `mapstructure:"name"`
	Debug       bool   `mapstructure:"debug"`
	Environment string `mapstructure:"environment"`
}

type Cache

type Cache struct {
	Host   string `mapstructure:"host"`
	Port   int    `mapstructure:"port"`
	DB     int    `mapstructure:"db"`
	Pass   string `mapstructure:"pass"`
	Prefix string `mapstructure:"prefix"`
}

type Config

type Config struct {
	App      App      `mapstructure:"app"`
	Server   Server   `mapstructure:"server"`
	Database Database `mapstructure:"database"`
	Cache    Cache    `mapstructure:"cache"`
}

func New

func New() (cfg *Config, err error)

type Database

type Database struct {
	Host     string `mapstructure:"host"`
	Port     int    `mapstructure:"port"`
	User     string `mapstructure:"user"`
	Password string `mapstructure:"password"`
	Database string `mapstructure:"database"`
}

type Server

type Server struct {
	Port int `mapstructure:"port"`
}

Jump to

Keyboard shortcuts

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