config

package
v0.0.0-...-f352d09 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2015 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 {
	Host string
	Port int
}

type CORS

type CORS struct {
	Enable  bool
	Origins string
	Methods string
	Headers string
}

type Config

type Config struct {
	// Token加密密钥 (AES)
	TokenSecret    string
	TokenExpiredIn int64

	LogPath  string
	Database Database
	App      App
	File     File
	CORS     CORS
}

配置主结构

type Database

type Database struct {
	Type         string // mysql/postgres/sqlite3/mssql
	Host         string
	UserName     string
	Password     string
	DatabaseName string
	Path         string // 如Sqlite等嵌入式数据库时存放的位置
	SSLMode      bool

	LogPath string

	ShowSQL   bool
	ShowInfo  bool
	ShowDebug bool
	ShowErr   bool
	ShowWarn  bool

	EnableCache bool
}

数据库相关配置

type Email

type Email struct {
	Host     string
	Port     int
	UserName string
	Password string
	// 发件邮箱
	Sender string
}

type File

type File struct {
	UploadPath string
}

Jump to

Keyboard shortcuts

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