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: 0

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