Files
opencloud/thumbnails/pkg/proto/v0/thumbnails.proto
A.Unger 530336a826 Add 'thumbnails/' from commit '2ebf7b2f23af96b3b499c401fe5498a9349403d8'
git-subtree-dir: thumbnails
git-subtree-mainline: ccc651a11e
git-subtree-split: 2ebf7b2f23
2020-09-18 13:02:40 +02:00

39 lines
1.0 KiB
Protocol Buffer

syntax = "proto3";
package com.owncloud.ocis.thumbnails.v0;
option go_package = "proto";
// A Service for handling thumbnail generation
service ThumbnailService {
// Generates the thumbnail and returns it.
rpc GetThumbnail(GetRequest) returns (GetResponse);
}
// A request to retrieve a thumbnail
message GetRequest {
// The path to the source image
string filepath = 1;
// The file types to which the thumbnail cna get encoded to.
enum FileType {
PNG = 0; // Represents PNG type
JPG = 1; // Represents JPG type
}
// The type to which the thumbnail should get encoded to.
FileType filetype = 2;
// The etag of the source image
string etag = 3;
// The width of the thumbnail
int32 width = 4;
// The height of the thumbnail
int32 height = 5;
// The authorization token
string authorization = 6;
}
// The service response
message GetResponse {
// The thumbnail as a binary
bytes thumbnail = 1;
// The mimetype of the thumbnail
string mimetype = 2;
}