golib/gconsts/err_code.go
2023-06-15 21:22:51 +08:00

25 lines
728 B
Go
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// err_code.go
// Copyright (C) 2022 tiglog <me@tiglog.com>
//
// Distributed under terms of the MIT license.
//
package gconsts
const (
ErrCodeNone = 0 // 正确的结果
ErrCodeBadRequest = 40000 // 无效的请求
ErrCodeValidateFail = 40001 // 验证失败
ErrCodeNoLogin = 40100 // 没有认证
ErrCodeNoToken = 40101 // 没有带 token
ErrCodeExpiredToken = 40102 // token 过期
ErrCodeInvalidToken = 40103 // 1无效的 token
ErrCodeNoPermission = 40300 // 没有权限
ErrCodePageNotFound = 40400 // 页面不存在
ErrCodeEntryNotFound = 40401 // 对象不存在
ErrCodeResNotFound = 40402 // 资源不存在
ErrCodeInternal = 50000 // 服务内部错误
)