contracts/proto/media.proto
Sergey Krylov e71b116e06
Some checks failed
Publish / Publish npm package action (push) Successful in 1m4s
Publish Go Bondings / Publish Go package action (push) Failing after 1m30s
feat: add media.proto
2026-03-29 09:01:27 +03:00

44 lines
770 B
Protocol Buffer

syntax = "proto3";
package media.v1;
option go_package = "git.ksv741.keenetic.pro/teacinema/contracts/media;media";
option java_multiple_files = true;
service MediaService {
rpc Upload (UploadRequest) returns (UploadResponse);
rpc Get (GetRequest) returns (GetResponse);
rpc Delete (DeleteRequest) returns (DeleteResponse);
}
message UploadRequest {
string file_name = 1;
string folder = 2;
string content_type = 3;
bytes data = 4;
optional int32 resize_width = 5;
optional int32 resize_height = 6;
}
message UploadResponse {
string key = 1;
}
message GetRequest {
string key = 1;
}
message GetResponse {
bytes data = 1;
string content_type = 2;
}
message DeleteRequest {
string key = 1;
}
message DeleteResponse {
bool ok = 1;
}