app

package
v0.0.0-...-251ec48 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(ctx context.Context, opts ...Option) (func(), error)

Init 应用初始化

func InitGinEngine

func InitGinEngine() *gin.Engine

InitGinEngine 初始化 gin

func InitHTTPServer

func InitHTTPServer(ctx context.Context, handler http.Handler) func()

InitHTTPServer 初始化http服务

func Run

func Run(ctx context.Context, opts ...Option) error

Run 运行服务

Types

type Option

type Option func(*options)

Option 定义配置项

func SetConfigFile

func SetConfigFile(s string) Option

SetConfigFile 设定配置文件

func SetEnv

func SetEnv(env string) Option

SetEnv 设置环境变量

func SetVersion

func SetVersion(s string) Option

SetVersion 设定版本号

func SetWWWDir

func SetWWWDir(s string) Option

SetWWWDir 设定静态站点目录

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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