web

package
v3.4.8 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: GPL-3.0 Imports: 20 Imported by: 30

Documentation

Index

Constants

View Source
const ENV = "IOT_MASTER_WEB_"

Variables

This section is empty.

Functions

func CreateReverseProxy

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

func Load added in v3.1.0

func Load() error

func RegisterSwaggerDocs added in v3.0.2

func RegisterSwaggerDocs(app *gin.RouterGroup, instance string)

func SetOptions added in v3.1.0

func SetOptions(opts Options)

func Store added in v3.1.0

func Store() error

Types

type Engine added in v3.1.0

type Engine struct {
	*gin.Engine
}

func CreateEngine

func CreateEngine() *Engine

func (*Engine) FileSystem added in v3.2.0

func (app *Engine) FileSystem() *FileSystem

func (*Engine) RegisterFS added in v3.1.0

func (app *Engine) RegisterFS(fs http.FileSystem, prefix, index string)

func (*Engine) Serve added in v3.1.0

func (app *Engine) Serve()

type FileSystem added in v3.2.0

type FileSystem struct {
	// contains filtered or unexported fields
}

func (*FileSystem) Open added in v3.2.0

func (f *FileSystem) Open(name string) (file http.File, err error)

func (*FileSystem) Put added in v3.2.0

func (f *FileSystem) Put(path string, fs http.FileSystem, prefix string, index string)

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

func GetOptions added in v3.1.0

func GetOptions() Options

func (*Options) FromEnv added in v3.1.0

func (options *Options) FromEnv()

func (*Options) ToEnv added in v3.1.0

func (options *Options) ToEnv() []string

Jump to

Keyboard shortcuts

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