diff --git a/helloworld/examples.json b/helloworld/examples.json index 325770b..b8fb7c1 100644 --- a/helloworld/examples.json +++ b/helloworld/examples.json @@ -7,7 +7,7 @@ "name": "John" }, "response": { - "msg": "Hello John" + "message": "Hello John" } }] } diff --git a/helloworld/handler/helloworld.go b/helloworld/handler/helloworld.go index ad5fbfe..f753b2f 100644 --- a/helloworld/handler/helloworld.go +++ b/helloworld/handler/helloworld.go @@ -12,6 +12,6 @@ type Helloworld struct{} // Call is a single request handler called via client.Call or the generated client code func (e *Helloworld) Call(ctx context.Context, req *helloworld.Request, rsp *helloworld.Response) error { logger.Info("Received Helloworld.Call request") - rsp.Msg = "Hello " + req.Name + rsp.Message = "Hello " + req.Name return nil } diff --git a/helloworld/proto/helloworld.pb.go b/helloworld/proto/helloworld.pb.go index 09a77d1..eab111b 100644 --- a/helloworld/proto/helloworld.pb.go +++ b/helloworld/proto/helloworld.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.5 +// protoc v3.15.6 // source: proto/helloworld.proto package helloworld @@ -20,6 +20,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// Call returns a personalised "Hello $name" response type Request struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -72,7 +73,7 @@ type Response struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` } func (x *Response) Reset() { @@ -107,9 +108,9 @@ func (*Response) Descriptor() ([]byte, []int) { return file_proto_helloworld_proto_rawDescGZIP(), []int{1} } -func (x *Response) GetMsg() string { +func (x *Response) GetMessage() string { if x != nil { - return x.Msg + return x.Message } return "" } @@ -121,15 +122,15 @@ var file_proto_helloworld_proto_rawDesc = []byte{ 0x6c, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x22, 0x1d, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x22, 0x1c, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, - 0x67, 0x32, 0x41, 0x0a, 0x0a, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x12, - 0x33, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x13, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, - 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x68, - 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x42, 0x14, 0x5a, 0x12, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, - 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x61, 0x6d, 0x65, 0x22, 0x24, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x41, 0x0a, 0x0a, 0x48, 0x65, 0x6c, + 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x12, 0x33, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, + 0x13, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, + 0x64, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x14, 0x5a, 0x12, + 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, + 0x6c, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/helloworld/proto/helloworld.proto b/helloworld/proto/helloworld.proto index 1ab0f13..49a7a52 100644 --- a/helloworld/proto/helloworld.proto +++ b/helloworld/proto/helloworld.proto @@ -14,5 +14,5 @@ message Request { } message Response { - string msg = 1; + string message = 1; }