section

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 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 App

type App struct {
	Title      string                 // 应用程序标题
	Copyright  string                 // 版权信息
	Debug      bool                   // 是否开启调试
	TimeFormat string                 // 时间格式
	Charset    string                 // 字符集
	Settings   map[string]interface{} // 应用配置
}

App 应用程序

type Cache

type Cache struct {
	Proto        string // 协议
	Addr         string // 地址
	MaxOpenConns int    // 最大连接数
	MaxIdleConns int    // 最大空闲连接数
	ReadTimeout  string // 读超时
	WriteTimeout string // 写超时

}

Cache 缓存

type Caches

type Caches map[string]*Cache

Caches 缓存引擎列表

type Config

type Config struct {
	App       *App      // 应用程序
	Server    *Server   // 服务器配置
	Databases Databases // 数据库引擎列表
	Caches    Caches    // 缓存引擎列表
}

Config 配置

type Database

type Database struct {
	DriverName      string // 数据库驱动名称
	ConnString      string // 数据库连接字符串
	ConnMaxLifetime string // 连接生命周期(分钟)
	MaxOpenConns    int    // 最大连接数
	MaxIdleConns    int    // 最大空闲连接数
	Log             bool   // 数据库日志
}

Database 数据库配置

type Databases

type Databases map[string]*Database

Databases 数据库引擎列表

type Server

type Server struct {
	HttpAddr     string // HTTP 服务地址
	GrpcAddr     string // GRPC 服务地址
	NatsAddr     string // NATS 服务地址
	DebugAddr    string // Debug 服务地址
	ReadTimeout  string // 读超时
	WriteTimeout string // 写超时
	IdleTimeout  string // 空闲超时
}

Server 服务器

Jump to

Keyboard shortcuts

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