adds http.endpoint replaces net/http with gin as gateway moves gateway server into separate package
34 lines
878 B
Protocol Buffer
34 lines
878 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package pb;
|
|
|
|
import "protoc-gen-openapiv2/options/annotations.proto";
|
|
|
|
import "document.proto";
|
|
|
|
option go_package = "github.com/itsscb/df/pb";
|
|
|
|
message UploadDocumentRequest {
|
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
|
json_schema: {
|
|
title: "UploadDocument [only HTTP]";
|
|
description: "Upload a Document [only HTTP]";
|
|
required: [
|
|
"file"
|
|
];
|
|
};
|
|
example: "{\"file\": \"10101010101010010100101010010101\", \"person_id\": \"1\" }";
|
|
};
|
|
bytes file = 1;
|
|
optional uint64 person_id = 2;
|
|
optional uint64 mail_id = 3;
|
|
}
|
|
|
|
message UploadDocumentResponse {
|
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
|
json_schema: {
|
|
title: "UploadDocument Response";
|
|
};
|
|
};
|
|
Document document = 1;
|
|
} |