resource

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config = Resource{}

Functions

This section is empty.

Types

type GzconfigStruct

type GzconfigStruct struct {
	// web:通用;scf:云函数
	Mode string // "web"
	//  none(默认),dev、prod、test。分别对应 application-${Active}
	Active string
	// mode为scf时必填,作为请求路由前缀 /de
	Name string
	Log  struct {
		Level  string // "error"
		Format string
		Color  bool
	}
	Server struct {
		// 如 127.0.0.1
		Host string // ""
		// 如 6150
		Port string // "6150"
	}
	// 编译配置
	Build struct {
		// 如 windows
		Goos string // "windows"
		// amd64
		Goarch string // "and64"
	}
	// 中间件配置
	Middleware struct {
		Jwt struct {
			Secret  string
			Lookup  string
			Prex    string
			Ignores []string
		}
	}
	Http struct {
		Gzip bool
	}
	Cache struct {
		// all cache redis
		Type string
	}
	Datasource struct {
		Type     string
		Source   string
		MaxIdle  int16
		OpenIdle int16
	}
	Banner struct {
		Mode string // off on 隐藏、打印banner 默认on
		Text string // 自定义banner
	}
}
var GzConfig *GzconfigStruct

声明

func GetConfig

func GetConfig() *GzconfigStruct

type Resource

type Resource struct {
	Gz GzconfigStruct
}

Jump to

Keyboard shortcuts

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