config

package
v0.0.0-...-8c67d6e Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GormConfig

func GormConfig() gorm.Config

func MysqlConfig

func MysqlConfig(config Mysql) mysql.Config

Types

type Config

type Config struct {
	Log    Log    `yaml:"log"`
	Mysql  Mysql  `yaml:"mysql"`
	System System `yaml:"system"`
}

type Log

type Log struct {
	Path       string `yaml:"path"`
	Filename   string `yaml:"filename"`
	MaxSize    int    `yaml:"maxSize"`
	MaxBackups int    `yaml:"maxBackups"`
	MaxAge     int    `yaml:"maxAge"`
}

type Mysql

type Mysql struct {
	Host     string `yaml:"host"`
	Port     string `yaml:"port"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	Database string `yaml:"database"`
	MaxIdle  int    `yaml:"maxIdle"`
	MaxOpen  int    `yaml:"maxOpen"`
}

type System

type System struct {
	Port                  int    `yaml:"port"`
	SuccessCode           int    `yaml:"successCode"`
	SuccessMessage        string `yaml:"successMessage"`
	ErrorCode             int    `yaml:"errorCode"`
	ErrorMessage          string `yaml:"errorMessage"`
	BindError             string `yaml:"bindError"`
	GenPluginToPath       string `yaml:"genPluginToPath"`
	GenPluginTemplatePath string `yaml:"genPluginTemplatePath"`
	ImportPath            string `yaml:"importPath"`
	ExportPath            string `yaml:"exportPath"`
	TemplatePath          string `yaml:"templatePath"`
}

Jump to

Keyboard shortcuts

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