service

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AdminRoot = ""

AdminRoot cache

View Source
var AdminRootLen = 0

AdminRootLen cache

View Source
var AppFileServer http.Handler

AppFileServer static file server

View Source
var Guards = map[string]gin.HandlerFunc{
	"bearer-jwt":       guardBearerJWT,
	"query-jwt":        guardQueryJWT,
	"cross-origin":     guardCrossOrigin,
	"widget-table":     table.Guard,
	"widget-list":      list.Guard,
	"widget-form":      form.Guard,
	"widget-chart":     chart.Guard,
	"widget-dashboard": dashboard.Guard,
}

Guards middlewares

View Source
var Middlewares = []func(c *gin.Context){
	withStaticFileServer,
}

Middlewares the middlewares

View Source
var XGenFileServerV1 http.Handler = http.FileServer(data.XgenV1())

XGenFileServerV1 XGen v1.0

Functions

func SetupStatic added in v0.10.2

func SetupStatic() error

SetupStatic setup static file server

func Start

func Start(cfg config.Config) (*http.Server, error)

Start the yao service

func Stop

func Stop(srv *http.Server) error

Stop the yao service

func Watch

func Watch(srv *http.Server, interrupt chan uint8) (err error)

Watch the application code change for hot update

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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