config

package
v0.0.0-...-3f639d1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiServer

type ApiServer struct {
	Env     string `mapstructure:"env" json:"env" yaml:"env"`
	Port    string `mapstructure:"port" json:"port" yaml:"port"`
	AppName string `mapstructure:"app-name" json:"app-name" yaml:"app-name"`
	AppUrl  string `mapstructure:"app-url" json:"app-url" yaml:"app-url"`
}

type Config

type Config struct {
	ApiServer ApiServer `mapstructure:"api-server" json:"api-server" yaml:"api-server"`
	Log       Log       `mapstructure:"log" json:"log" yaml:"log"`
	Database  Database  `mapstructure:"database" json:"database" yaml:"database"`
}

type Database

type Database struct {
	Driver              string `mapstructure:"driver" json:"driver" yaml:"driver"`
	Host                string `mapstructure:"host" json:"host" yaml:"host"`
	Port                int    `mapstructure:"port" json:"port" yaml:"port"`
	Database            string `mapstructure:"database" json:"database" yaml:"database"`
	UserName            string `mapstructure:"username" json:"username" yaml:"username"`
	Password            string `mapstructure:"password" json:"password" yaml:"password"`
	Charset             string `mapstructure:"charset" json:"charset" yaml:"charset"`
	MaxIdleConns        int    `mapstructure:"max-idle-conns" json:"max-idle-conns" yaml:"max-idle-conns"`
	MaxOpenConns        int    `mapstructure:"max-open-conns" json:"max-open-conns" yaml:"max-open-conns"`
	LogMode             string `mapstructure:"log-mode" json:"log-mode" yaml:"log-mode"`
	EnableFileLogWriter bool   `mapstructure:"enable-file-log-writer" json:"enable-file-log-writer" yaml:"enable-file-log-writer"`
	LogFilename         string `mapstructure:"log-filename" json:"log-filename" yaml:"log-filename"`
}

type Log

type Log struct {
	Level      string `mapstructure:"level" json:"level" yaml:"level"`
	RootDir    string `mapstructure:"root-dir" json:"root-dir" yaml:"root-dir"`
	Filename   string `mapstructure:"filename" json:"filename" yaml:"filename"`
	Format     string `mapstructure:"format" json:"format" yaml:"format"`
	ShowLine   bool   `mapstructure:"show-line" json:"show-line" yaml:"show-line"`
	MaxBackups int    `mapstructure:"max-backups" json:"max-backups" yaml:"max-backups"`
	MaxSize    int    `mapstructure:"max-size" json:"max-size" yaml:"max-size"` // MB
	MaxAge     int    `mapstructure:"max-age" json:"max-age" yaml:"max-age"`    // day
	Compress   bool   `mapstructure:"compress" json:"compress" yaml:"compress"`
}

Jump to

Keyboard shortcuts

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