utils

package
v0.0.0-...-1369677 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abort

func Abort(ctx *gin.Context, code int, msg string)

func Extract

func Extract(bind string) (string, error)

Extract 提取ip和端口

func Listen

func Listen(network, addr string) (net.Listener, error)

Listen 服务监听

func ResponseJSON

func ResponseJSON(ctx *gin.Context, code int, msg string, data interface{})

func UpdateProcess

func UpdateProcess(service string)

UpdateProcess 更新程序

Types

type Response

type Response struct {
	// 登陆login-status放到HTTP头部header返回给前端
	Code int         `json:"code"` // 业务错误码
	Data interface{} `json:"data"` // 数据
	Msg  string      `json:"msg"`  // 提示信息
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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