| |
| |
| syntax = "proto3"; |
| |
| package bufman.dubbo.apache.org.registry.v1alpha1; |
| |
| import "image/v1/image.proto"; |
| |
| // The supported formats for the serialized message conversion. |
| enum ConvertFormat { |
| CONVERT_FORMAT_UNSPECIFIED = 0; |
| CONVERT_FORMAT_BIN = 1; |
| CONVERT_FORMAT_JSON = 2; |
| } |
| |
| // ConvertService coverts serialized messages |
| service ConvertService { |
| // Convert converts a serialized message according to |
| // the provided type name using an image. |
| rpc Convert(ConvertRequest) returns (ConvertResponse); |
| } |
| |
| message ConvertRequest { |
| // type_name is the full type name of the serialized message (like acme.weather.v1.Units). |
| string type_name = 1; |
| // image is the image source that defines the serialized message. |
| bufman.dubbo.apache.org.image.v1.Image image = 2; |
| // payload is the serialized Protobuf message. |
| bytes payload = 3; |
| // request_format is the format of the payload. |
| ConvertFormat request_format = 4; |
| // response_format is the desired format of the output result. |
| ConvertFormat response_format = 5; |
| } |
| |
| message ConvertResponse { |
| // payload is the converted serialized message in one of the supported formats. |
| bytes payload = 1; |
| } |