utils

package
v2.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: May 22, 2018 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfFilepath string = "./config/goku.conf"

Functions

func CheckFileIsExist

func CheckFileIsExist(filename string) bool

*

  • 判断文件是否存在 存在返回 true 不存在返回false

func GetGatewayServiceStatus

func GetGatewayServiceStatus(port string) bool

func GetRandomString

func GetRandomString(num int) string

生成随机字符串

func GetResultInfo

func GetResultInfo(statusCode string, resultType string, resultKey string, result interface{}, successCount string) map[string]interface{}

func GetVisitCount

func GetVisitCount(url string) map[string]interface{}

func Md5

func Md5(encodeString string) string

func ParseArgs

func ParseArgs()

func ReloadConf

func ReloadConf()

func RestartGatewayService

func RestartGatewayService(port string) bool

func StartGatewayService

func StartGatewayService(port string) bool

func StopGatewayService

func StopGatewayService(port string, force bool) bool

关闭后端服务

func String

func String(info interface{}) string

Types

type ResultInfo

type ResultInfo struct {
	ResultType string      `json:"type"`
	StatusCode string      `json:"statusCode"`
	ResultKey  string      `json:"resultKey"`
	Result     interface{} `json:"result,omitempty"`
}

Jump to

Keyboard shortcuts

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