mirror of
https://github.com/JuLi0n21/thumbnailservice.git
synced 2026-04-19 16:00:07 +00:00
init
This commit is contained in:
32
thumbnail.proto
Normal file
32
thumbnail.proto
Normal file
@@ -0,0 +1,32 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package thumbnail_service;
|
||||
|
||||
option go_package = "./proto";
|
||||
|
||||
// Enum for the file type
|
||||
enum FileType {
|
||||
FILE_TYPE_UNSPECIFIED = 0; // Default value for unspecified file type
|
||||
IMAGE = 1; // Image file
|
||||
VIDEO = 2; // Video file
|
||||
PDF = 3; // PDF file
|
||||
}
|
||||
|
||||
// Service definition
|
||||
service ThumbnailService {
|
||||
rpc GenerateThumbnail(ThumbnailRequest) returns (ThumbnailResponse);
|
||||
}
|
||||
|
||||
// Request message for generating thumbnails
|
||||
message ThumbnailRequest {
|
||||
bytes file_content = 1; // File content as bytes
|
||||
FileType file_type = 2; // File type (image, video, pdf)
|
||||
int32 max_width = 3; // Optional max width for resizing (0 means no limit)
|
||||
int32 max_height = 4; // Optional max height for resizing (0 means no limit)
|
||||
}
|
||||
|
||||
// Response message for the thumbnail generation
|
||||
message ThumbnailResponse {
|
||||
string message = 1; // Message indicating success or failure
|
||||
bytes thumbnail_content = 2; // Thumbnail content as bytes
|
||||
}
|
||||
Reference in New Issue
Block a user