web_gin

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(key string, value ICmdWebHandler)

* * @Description: reg * @param: key * @param: value * @Author: Iori * @Date: 2022-04-26 17:31:33 *

func RunGin

func RunGin(conf Config, load_routers func(router *gin.Engine)) error

* * @Description: Run gin start the server * @param: http_port * @param: mode * @param: session_name * @param: load_routers * @return: error * @Author: Iori * @Date: 2022-02-28 11:27:27 *

Types

type Config

type Config struct {
	IP          string `json:"ip" yaml:"ip"`                     // ip addr
	Port        int    `json:"port" yaml:"port"`                 // port 端口
	SessionName string `json:"session_name" yaml:"session_name"` //session名
	AuthEnable  bool   `json:"auth_enable" yaml:"auth_enable"`   //签名开关
	Mode        string `json:"mode" yaml:"mode"`                 //http模式
}

type ICmdWebHandler

type ICmdWebHandler interface {
	ProcessCmd(cParams, data *map[string]interface{}) *gin.H
}
ICmdWsHandler

* @Description:

func GetHandlers

func GetHandlers(key string) (value ICmdWebHandler, ok bool)

* * @Description: get handlers * @param: key * @return: value * @return: ok * @Author: Iori * @Date: 2022-04-26 17:31:21 *

Jump to

Keyboard shortcuts

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