web

package
v4.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: GPL-3.0 Imports: 22 Imported by: 8

Documentation

Index

Constants

View Source
const JwtExpire = time.Hour * 24 * 30
View Source
const JwtKey = "iot-master"
View Source
const MODULE = "web"

Variables

View Source
var Engine *gin.Engine

Functions

func CreateReverseProxy

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

func JwtGenerate

func JwtGenerate(id string) (string, error)

func RegisterSwaggerDocs

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

func Serve

func Serve()

func ServeHTTP

func ServeHTTP()

func ServeLetsEncrypt

func ServeLetsEncrypt()

func ServeTLS

func ServeTLS()

func Start

func Start()

Types

type Claims

type Claims struct {
	Id string `json:"id"`
	jwt.RegisteredClaims
}

func JwtVerify

func JwtVerify(str string) (*Claims, error)

type FileSystem

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

func (*FileSystem) Open

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

func (*FileSystem) Put

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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