web

package
v3.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: GPL-3.0 Imports: 16 Imported by: 30

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEngine

func CreateEngine(cfg Options) *gin.Engine

func CreateReverseProxy

func CreateReverseProxy(typ, address string) (*httputil.ReverseProxy, error)

func RegisterFS

func RegisterFS(app *gin.Engine, fs http.FileSystem)

func RegisterSwaggerDocs added in v3.0.2

func RegisterSwaggerDocs(app *gin.Engine)

Types

type Options

type Options struct {
	Addr  string `yaml:"addr" json:"addr"`
	Debug bool   `yaml:"debug,omitempty" json:"debug,omitempty"`
	Cors  bool   `json:"cors,omitempty" json:"cors,omitempty"`
	Gzip  bool   `json:"gzip,omitempty" json:"gzip,omitempty"`
}

Options 参数

func Default

func Default() Options

Jump to

Keyboard shortcuts

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