util

package
v0.0.0-...-1f60ea5 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const CONTENT_TYPE_HTML = 0

正文数据类型

View Source
const CONTENT_TYPE_MARKDOWN = 1
View Source
const ERROR_DB_CONNECT = 206

DB

View Source
const ERROR_DB_DELETE = 209
View Source
const ERROR_DB_INSERT = 207
View Source
const ERROR_DB_SELECT = 210
View Source
const ERROR_DB_UPDATE = 208
View Source
const ERROR_FUNC_NON_EXISTS = 110
View Source
const ERROR_GEN_UUID = 107
View Source
const ERROR_INPUT_NULL = 104
View Source
const ERROR_IP_UNAUTHORIZED = 111
View Source
const ERROR_JSON_DECODE = 106
View Source
const ERROR_JSON_FORMAT_ERROR = 103
View Source
const ERROR_NETWORK_ERROR = 101
View Source
const ERROR_NO_ERROR = 301
View Source
const ERROR_PARAM_ERROR = 100
View Source
const ERROR_RAL = 105
View Source
const ERROR_REDIS = 109
View Source
const ERROR_USER_NOT_LOGIN = 102
View Source
const ERROR_USER_UNAUTHORIZED = 112
View Source
const ERROR_UUID_MAX = 108
View Source
const OK = 0

直接从PHP LIB里面复制过来的 意外好用 通用错误码,占用100开头

View Source
const STATUS_INVALID = 0

状态标记

View Source
const STATUS_VALID = 1
View Source
const TYPE_ESSAY = 1

数据类型标记

View Source
const TYPE_SUBSCRIBE = 3
View Source
const TYPE_UNSUBSCRIBE = 4
View Source
const TYPE_WISH = 2

Variables

This section is empty.

Functions

func CORSMiddleware

func CORSMiddleware() gin.HandlerFunc

func Exception

func Exception(c *gin.Context, errNo int, errMessage ...string)

func GetConfig

func GetConfig(confFile, section string) (map[string]string, error)

func GetErrorMessage

func GetErrorMessage(errorNo int) string

func Latlng2Tile

func Latlng2Tile(lat, lng, z float64) (x, y int)

func Output

func Output(c *gin.Context, resultData ...interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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