mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-30 04:31:03 +02:00
81f96ee74d
* fix error encoder
19 lines
462 B
Protocol Buffer
19 lines
462 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package errors;
|
|
|
|
import "errors/errors.proto";
|
|
|
|
// 多语言特定包名,用于源代码引用
|
|
option go_package = "github.com/go-kratos/kratos/examples/blog/api/v1;v1";
|
|
option java_multiple_files = true;
|
|
option java_package = "blog.v1.errors";
|
|
option objc_class_prefix = "APIBlogErrors";
|
|
|
|
enum ErrorReason {
|
|
option (errors.default_code) = 500;
|
|
|
|
USER_NOT_FOUND = 0 [(errors.code) = 404];
|
|
CONTENT_MISSING = 1 [(errors.code) = 400];;
|
|
}
|