cmd

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Main = gcmd.Command{
		Name:  "main",
		Usage: "main",
		Brief: "start http server",
		Func: func(ctx context.Context, parser *gcmd.Parser) (err error) {
			s := g.Server()
			SystemInit(s, ctx)
			s.Run()
			return nil
		},
	}
)

Functions

func MiddlewareCORS

func MiddlewareCORS(r *ghttp.Request)

func MiddlewareHandlerResponse

func MiddlewareHandlerResponse(r *ghttp.Request)

MiddlewareHandlerResponse only modifies the response format of ghttp.MiddlewareHandlerResponse

func SetGToken

func SetGToken(ctx context.Context, gt *gtoken.GToken)

func SystemInit

func SystemInit(s *ghttp.Server, ctx context.Context)

func UseGToken

func UseGToken() *gtoken.GToken

Types

This section is empty.

Jump to

Keyboard shortcuts

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