Documentation
¶
Index ¶
- Constants
- Variables
- func Engine() *gin.Engine
- func JwtGenerate(id string, admin bool) (string, error)
- func OpenStaticFile(name string) (file http.File, err error)
- func Serve() error
- func ServeAutoCert() error
- func ServeHTTP() error
- func ServeTLS() error
- func ServeUnix() error
- func Shutdown() error
- func Startup() error
- func Static(fs http.FileSystem, path, prefix, index string)
- func StaticDir(dir string, path, prefix, index string)
- func StaticEmbedFS(fs embed.FS, path, prefix, index string)
- func StaticFS(fs fs.FS, path, prefix, index string)
- func StaticZip(zip string, path, prefix, index string)
- type Claims
- type Store
- type ZipFS
- type ZipFile
Constants ¶
View Source
const MODULE = "web"
Variables ¶
View Source
var JwtExpire = time.Hour * 24 * 30
View Source
var JwtKey = []byte("boat")
View Source
var Server *http.Server
Functions ¶
func ServeAutoCert ¶ added in v0.0.4
func ServeAutoCert() error
func Static ¶
func Static(fs http.FileSystem, path, prefix, index string)
Static 静态目录 path url路径。 prefix 基本路径(主要用于zip文件)。 index 默认首页,index.html 代表SPA应用。
func StaticEmbedFS ¶ added in v0.0.2
Types ¶
Click to show internal directories.
Click to hide internal directories.