Files
kitchensink/steps/step4/pkg/proto/based32.proto
2022-05-16 12:26:09 +03:00

43 lines
773 B
Protocol Buffer

syntax = "proto3";
package proto;
option go_package = "github.com/quanterall/kitchensink/pkg/proto";
service Transcriber {
rpc Encode(stream EncodeRequest) returns (stream EncodeResponse);
rpc Decode(stream DecodeRequest) returns (stream DecodeResponse);
}
message EncodeRequest {
uint64 IdNonce = 1;
bytes Data = 2;
}
message EncodeResponse {
uint64 IdNonce = 1;
oneof Encoded {
string EncodedString = 2;
Error Error = 3;
}
}
message DecodeRequest{
uint64 IdNonce = 1;
string EncodedString = 2;
}
message DecodeResponse {
uint64 IdNonce = 1;
oneof Decoded {
bytes Data = 2;
Error Error = 3;
}
}
enum Error {
ZERO_LENGTH = 0;
CHECK_FAILED = 1;
NIL_SLICE = 2;
CHECK_TOO_SHORT = 3;
INCORRECT_HUMAN_READABLE_PART = 4;
}