fix errors proto (#1020)

pull/1021/head
Tony Chen 3 years ago committed by GitHub
parent 996922fa87
commit 50e3dea2ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cmd/kratos/internal/proto/client/client.go
  2. 14
      errors/errors.proto

@ -78,8 +78,8 @@ func generate(proto string, args []string) error {
path, name := filepath.Split(proto)
input := []string{
"--proto_path=.",
"--proto_path=" + base.KratosMod(),
"--proto_path=" + filepath.Join(base.KratosMod(), "third_party"),
"--proto_path=" + filepath.Join(base.KratosMod(), "errors"),
"--go_out=paths=source_relative:.",
"--go-grpc_out=paths=source_relative:.",
"--go-http_out=paths=source_relative:.",

@ -9,6 +9,13 @@ option objc_class_prefix = "KratosErrors";
import "google/protobuf/descriptor.proto";
message Error {
int32 code = 1;
string reason = 2;
string message = 3;
map<string, string> metadata = 4;
};
extend google.protobuf.EnumOptions {
int32 default_code = 1108;
}
@ -16,10 +23,3 @@ extend google.protobuf.EnumOptions {
extend google.protobuf.EnumValueOptions {
int32 code = 1109;
}
message Error {
int32 code = 1;
string reason = 2;
string message = 3;
map<string, string> metadata = 4;
};

Loading…
Cancel
Save