gin

package
v0.0.0-...-c42b9c9 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: MIT Imports: 21 Imported by: 1

Documentation

Overview

Package websdk for web frame

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateGin

func CreateGin() *gin.Engine

CreateGin create gin instance

func DoRequest

func DoRequest(uri, method string, param map[string]interface{}) string

DoRequest do request

func GetRequest

func GetRequest(uri string, param map[string]interface{}, router *gin.Engine) string

GetRequest func get request

func HeartBeat

func HeartBeat(c *gin.Context)

HeartBeat heart beat

func ParseToStr

func ParseToStr(mp map[string]interface{}) string

ParseToStr parse map to str

func Run

func Run(engine *gin.Engine, port string) error

Run run web sever param engine: instance of gin.Engine param port: format as :port, for example :31112

func RunByPort

func RunByPort(engine *gin.Engine, port int) error

RunByPort run with port

func RunWithGraceShutDown

func RunWithGraceShutDown(engine *gin.Engine, port string, timeout int)

RunWithGraceShutDown run with grace shutdown

func SetRespGetterFactory

func SetRespGetterFactory(factory utils.RespGetterFactory)

SetRespGetterFactory set resp getter factory

Types

This section is empty.

Jump to

Keyboard shortcuts

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