package apierrors import omnierrors "git.yuntuo.hk/k2safe/go-omni/errors" func Catalog() omnierrors.Catalog { return omnierrors.Catalog{ DefaultStatus: 400, Definitions: map[string]omnierrors.Definition{ "INVALID": {Code: 400002, Message: "用户名格式不正确"}, "TOO_LONG": {Code: 400003, Message: "{label}不能超过{max}个字符", Params: []omnierrors.Parameter{{Name: "label", Type: "string"}, {Name: "max", Type: "int"}}}, "INTERNAL_ERROR": {Status: 500, Code: 9999, Message: "系统错误"}, "NOT_FOUND": {Status: 404, Code: 404001, Message: "接口不存在"}, "METHOD_NOT_ALLOWED": {Status: 405, Code: 405001, Message: "请求方法不支持"}, "BODY_TOO_LARGE": {Status: 413, Code: 413001, Message: "请求体太大"}, "INVALID_MULTIPART": {Status: 400, Code: 400004, Message: "上传内容不完整"}, }, } }