e

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

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

Go to latest
Published: Dec 29, 2018 License: Apache-2.0 Imports: 0 Imported by: 12

Documentation

Index

Constants

View Source
const (
	SUCCESS        = 200
	ERROR          = 500
	INVALID_PARAMS = 400

	ERROR_EXIST_VIDEO     = 10001
	ERROR_EXIST_USER_NAME = 10002

	ERROR_NOT_EXIST_VIDEO    = 20002
	ERROR_NOT_EXIST_USERID   = 20003
	ERROR_NOT_EXIST_USERNAME = 20004

	ERROR_AUTH_INVALID_SESSION   = 30001
	ERROR_AUTH_PWD_UNMATCH       = 30002
	ERROR_AUTH_USERNAME_MISMATCH = 30003

	ERROR_ADD_COMMENT_FAIL   = 40001
	ERROR_ADD_USER_FAIL      = 40002
	ERROR_ADD_VIDEOINFO_FAIL = 40003
	ERROR_ADD_DELRECS_FAIL   = 40004

	ERROR_GET_COMMENTS_FAIL   = 50001
	ERROR_GET_VIDEOINFOS_FAIL = 50002

	ERROR_UPLOAD_VIDEO_FILE_TOO_BIG       = 60001
	ERROR_UPLOAD_VIDEO_FORMAT_UNSUPPORTED = 60002
	ERROR_UPLOAD_VIDEO_SAVE_FAIL          = 60003

	ERROR_REQUEST_NOT_RECOGNIZED             = 70001
	ERROR_REQUEST_BODY_PARSE_FAILED          = 70002
	ERROR_REQUEST_MISMATCH_USERNAME_URL_BODY = 70003
	ERROR_REQUEST_UNMARSHAL_BODY_FAILED      = 70004
	ERROR_REQUEST_BODY_UNMARSHAL_JSON_FAIL   = 70005

	ERROR_DELETE_USER_FAIL      = 80001
	ERROR_DELETE_VIDEOINFO_FAIL = 80002

	ERROR_MODIFY_USER_FAIL = 90001

	ERROR_FIND_USER_FAIL = 100001

	ERROR_COUNT_COMMENT_FAIL   = 110001
	ERROR_COUNT_VIDEOINFO_FAIL = 110002

	ERROR_DB_ERROR_INFO = 120001

	ERROR_OPEN_FILE_FAIL = 130001
)

Variables

View Source
var MsgFlags = map[int]string{
	SUCCESS:        "ok",
	ERROR:          "fail",
	INVALID_PARAMS: "请求参数错误",

	ERROR_EXIST_VIDEO:     "已经存在该视频",
	ERROR_EXIST_USER_NAME: "用户名已经存在",

	ERROR_NOT_EXIST_VIDEO:    "该视频不存在",
	ERROR_NOT_EXIST_USERID:   "该用户不存在",
	ERROR_NOT_EXIST_USERNAME: "该用户名已经存在",

	ERROR_AUTH_INVALID_SESSION:   "session已经无效",
	ERROR_AUTH_PWD_UNMATCH:       "密码不匹配",
	ERROR_AUTH_USERNAME_MISMATCH: "用户名不匹配",

	ERROR_ADD_COMMENT_FAIL:   "添加评论失败",
	ERROR_ADD_USER_FAIL:      "添加用户失败",
	ERROR_ADD_VIDEOINFO_FAIL: "添加视频信息错误",
	ERROR_ADD_DELRECS_FAIL:   "添加应删除的视频信息失败",

	ERROR_GET_COMMENTS_FAIL:   "获取评论失败",
	ERROR_GET_VIDEOINFOS_FAIL: "获取用户视频失败",

	ERROR_UPLOAD_VIDEO_FILE_TOO_BIG:       "上传的视频文件太大了",
	ERROR_UPLOAD_VIDEO_FORMAT_UNSUPPORTED: "上传的视频文件格式不正确",
	ERROR_UPLOAD_VIDEO_SAVE_FAIL:          "上传的视频文件保存失败",

	ERROR_REQUEST_NOT_RECOGNIZED:             "请求没有认证",
	ERROR_REQUEST_BODY_PARSE_FAILED:          "请求body解析失败",
	ERROR_REQUEST_MISMATCH_USERNAME_URL_BODY: "请求中url和body中的username不一致",
	ERROR_REQUEST_UNMARSHAL_BODY_FAILED:      "解析请求中json格式的body失败",
	ERROR_REQUEST_BODY_UNMARSHAL_JSON_FAIL:   "http请求中body中json数据解析错误",

	ERROR_DELETE_USER_FAIL:      "删除用户失败",
	ERROR_DELETE_VIDEOINFO_FAIL: "删除视频信息失败",

	ERROR_MODIFY_USER_FAIL: "修改用户失败",

	ERROR_FIND_USER_FAIL: "查找用户失败",

	ERROR_COUNT_COMMENT_FAIL:   "获取评论数量失败",
	ERROR_COUNT_VIDEOINFO_FAIL: "获取视频信息数量失败",

	ERROR_DB_ERROR_INFO:  "数据库错误!",
	ERROR_OPEN_FILE_FAIL: "打开文件失败",
}

Functions

func GetMsg

func GetMsg(code int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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