Files
sponge/internal/ecode/userExample_rpc.go
2022-11-11 22:54:22 +08:00

23 lines
985 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// nolint
package ecode
import (
"github.com/zhufuyi/sponge/pkg/errcode"
)
// userExample rpc服务级别错误码
// 每个资源名称对应唯一编号(rpc类型)编号范围1~100如果存在编号相同触发panic
var (
_userExampleNO = 1
_userExampleName = "userExample"
_userExampleBaseCode = errcode.RCode(_userExampleNO)
StatusCreateUserExample = errcode.NewRPCStatus(_userExampleBaseCode+1, "failed to create "+_userExampleName)
StatusDeleteUserExample = errcode.NewRPCStatus(_userExampleBaseCode+2, "failed to delete "+_userExampleName)
StatusUpdateUserExample = errcode.NewRPCStatus(_userExampleBaseCode+3, "failed to update "+_userExampleName)
StatusGetUserExample = errcode.NewRPCStatus(_userExampleBaseCode+4, "failed to get "+_userExampleName+" details")
StatusListUserExample = errcode.NewRPCStatus(_userExampleBaseCode+5, "failed to get list of "+_userExampleName)
// 每添加一个错误码,在上一个错误码基础上+1
)