config

package
v0.0.0-...-2d98496 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: GPL-3.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefault

func GetDefault() string

Types

type Configs

type Configs struct {
	Server   Server   `yaml:"server"`
	Database Database `yaml:"database"`
	Logger   Logger   `yaml:"logger"`
}

func Load

func Load() (Configs, error)

func (*Configs) SetDefault

func (s *Configs) SetDefault()

type Database

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

func (*Database) SetDefault

func (d *Database) SetDefault()

type Logger

type Logger struct {
	Level string `yaml:"level"`
}

func (*Logger) SetDefault

func (l *Logger) SetDefault()

type Server

type Server struct {
	Port   int    `yaml:"port"`
	Bind   string `yaml:"bind"`
	Debug  bool   `yaml:"debug"`
	Secret string `yaml:"secret"`
}

func (*Server) SetDefault

func (s *Server) SetDefault()

Jump to

Keyboard shortcuts

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