result

package
v0.0.0-...-07d35cb Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package result 定义了所有的错误消息代码及对应的消息

Index

Constants

View Source
const (
	BadRequest = http.StatusBadRequest*100 + iota
	BadRequestInvalidParam
	BadRequestInvalidQuery
	BadRequestInvalidBody
	BadRequestInvalidHeader
)

400

View Source
const (
	Unauthorized = http.StatusUnauthorized*100 + iota
	UnauthorizedInvalidState
	UnauthorizedInvalidToken
	UnauthorizedInvalidPassword
	UnauthorizedInvalidUsername
	UnauthorizedNeedChangePassword
	UnauthorizedAuthTokenExpired
)

401

View Source
const (
	Forbidden = http.StatusForbidden*100 + iota
	ForbiddenNewOldPasswordIsEqual
	ForbiddenExistSubItem
	ForbiddenStateNotAllow
	ForbiddenIsFull
	ForbiddenNotDeleteOwn
	ForbiddenOnlyCompanyOwner
	ForbiddenExists
)

403

View Source
const (
	NotFoundCompany = http.StatusNotFound*100 + iota
	NotFoundDepartment
	NotFoundStaff
)

404

Variables

This section is empty.

Functions

func Init

func Init()

Init 初始化消息内容

Types

This section is empty.

Jump to

Keyboard shortcuts

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