conf

package
v0.0.0-...-dc75ea3 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: MulanPSL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitialConf

func InitialConf(file string)

InitialConf 初始化配置

Types

type Data

type Data struct {
	ServeAddr    string `ini:"serveAddr"`
	InternalAddr string `ini:"internalAddr"`
	TusServer    string `ini:"tusServer"`
	Log          `ini:"log"`
	Redis        `ini:"redis"`
	MySQL        `ini:"mysql"`
	RabbitMQ     `ini:"rabbitmq"`
}

Data 配置

var Conf Data

Conf 配置

type Log

type Log struct {
	LogDir   string        `ini:"logDir"`
	Module   string        `ini:"module"`
	MaxAge   time.Duration `ini:"maxAge"`
	Rotation time.Duration `ini:"rotation"`
	Debug    bool          `ini:"debug"`
}

Log 日志配置

type MySQL

type MySQL struct {
	User    string `ini:"user"`
	Passwd  string `ini:"passwd"`
	Host    string `ini:"host"`
	Port    string `ini:"port"`
	DB      string `ini:"db"`
	MaxIdea int    `ini:"maxIdea"`
	MaxOpen int    `ini:"maxOpen"`
}

MySQL MySQL 连接配置

type RabbitMQ

type RabbitMQ struct {
	URI string `ini:"uri"`
}

RabbitMQ RabbitMQ 相关配置

type Redis

type Redis struct {
	Addr   string `ini:"addr"`
	Passwd string `ini:"passwd"`
	DB     int    `ini:"db"`
}

Redis Redis 连接配置

Jump to

Keyboard shortcuts

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