Initial QSfera import
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package qsfera.services.thumbnails.v0;
|
||||
|
||||
option go_package = "github.com/qsfera/server/protogen/gen/qsfera/services/thumbnails/v0";
|
||||
|
||||
import "qsfera/messages/thumbnails/v0/thumbnails.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
|
||||
info: {
|
||||
title: "КуСфера thumbnails";
|
||||
version: "1.0.0";
|
||||
contact: {
|
||||
name: "КуСфера";
|
||||
url: "";
|
||||
email: "";
|
||||
};
|
||||
license: {
|
||||
name: "Apache-2.0";
|
||||
url: "";
|
||||
};
|
||||
};
|
||||
schemes: HTTP;
|
||||
schemes: HTTPS;
|
||||
consumes: "application/json";
|
||||
produces: "application/json";
|
||||
external_docs: {
|
||||
description: "Developer Manual";
|
||||
url: "";
|
||||
};
|
||||
};
|
||||
|
||||
// A Service for handling thumbnail generation
|
||||
service ThumbnailService {
|
||||
// Generates the thumbnail and returns it.
|
||||
rpc GetThumbnail(GetThumbnailRequest) returns (GetThumbnailResponse);
|
||||
}
|
||||
|
||||
// A request to retrieve a thumbnail
|
||||
message GetThumbnailRequest {
|
||||
// The path to the source image
|
||||
string filepath = 1;
|
||||
// The type to which the thumbnail should get encoded to.
|
||||
qsfera.messages.thumbnails.v0.ThumbnailType thumbnail_type = 2;
|
||||
// The width of the thumbnail
|
||||
int32 width = 3;
|
||||
// The height of the thumbnail
|
||||
int32 height = 4;
|
||||
// Indicates which image processor to use
|
||||
string processor = 5;
|
||||
oneof source {
|
||||
qsfera.messages.thumbnails.v0.WebdavSource webdav_source = 6;
|
||||
qsfera.messages.thumbnails.v0.CS3Source cs3_source = 7;
|
||||
}
|
||||
}
|
||||
|
||||
// The service response
|
||||
message GetThumbnailResponse {
|
||||
// The endpoint where the thumbnail can be downloaded.
|
||||
string data_endpoint = 1;
|
||||
// The transfer token to be able to download the thumbnail.
|
||||
string transfer_token = 2;
|
||||
// The mimetype of the thumbnail
|
||||
string mimetype = 3;
|
||||
}
|
||||
Reference in New Issue
Block a user