StarterCore

package module
v1.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2021 License: Apache-2.0 Imports: 1 Imported by: 1

README

starter-core

「仅发布」

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBConfig

type DBConfig struct {
	Url string `value:"${db.url}"`
}

type GrpcEndpointConfig

type GrpcEndpointConfig struct {
	Address string `value:"${address:=127.0.0.1:9090}"`
}

GrpcEndpointConfig gRPC 服务端点配置

type GrpcServerConfig

type GrpcServerConfig struct {
	Port int `value:"${grpc.server.port:=9090}"`
}

GrpcServerConfig gRPC 服务器配置

type MongoConfig

type MongoConfig struct {
	Url string `value:"${mongo.url:=mongodb://localhost}"`
}

type RedisConfig

type RedisConfig struct {
	Host     string `value:"${redis.host:=127.0.0.1}"`
	Port     int    `value:"${redis.port:=6379}"`
	Password string `value:"${redis.password:=}"`
	Database int    `value:"${redis.database:=0}"`
}

type WebServerConfig

type WebServerConfig struct {
	IP           string `value:"${web.server.ip:=}"`              // 监听 IP
	Port         int    `value:"${web.server.port:=8080}"`        // HTTP 端口
	EnableSSL    bool   `value:"${web.server.ssl.enable:=false}"` // 是否启用 HTTPS
	KeyFile      string `value:"${web.server.ssl.key:=}"`         // SSL 秘钥
	CertFile     string `value:"${web.server.ssl.cert:=}"`        // SSL 证书
	BasePath     string `value:"${web.server.base-path:=/}"`      // 根路径
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
}

WebServerConfig Web 服务器配置

Jump to

Keyboard shortcuts

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