images: update proto to include get and delete
This commit is contained in:
parent
e7a7002293
commit
fc4429a918
18
schemas/proto/images/v1/delete.proto
Normal file
18
schemas/proto/images/v1/delete.proto
Normal file
|
@ -0,0 +1,18 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package images.v1;
|
||||
|
||||
message DeleteImagesRequest {
|
||||
repeated DeleteImage deletes = 1;
|
||||
bool blacklist = 2;
|
||||
}
|
||||
|
||||
message DeleteImage {
|
||||
string post_name = 1;
|
||||
repeated string devices = 2;
|
||||
}
|
||||
|
||||
message DeleteImagesResponse {
|
||||
// The number of images that will be deleted.
|
||||
int64 count = 1;
|
||||
}
|
13
schemas/proto/images/v1/get.proto
Normal file
13
schemas/proto/images/v1/get.proto
Normal file
|
@ -0,0 +1,13 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package images.v1;
|
||||
|
||||
import "images/v1/types.proto";
|
||||
|
||||
message GetImageRequest {
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message GetImageResponse {
|
||||
Image image = 1;
|
||||
}
|
|
@ -2,8 +2,12 @@ syntax = "proto3";
|
|||
|
||||
package images.v1;
|
||||
|
||||
import "images/v1/delete.proto";
|
||||
import "images/v1/get.proto";
|
||||
import "images/v1/list.proto";
|
||||
|
||||
service ImageService {
|
||||
rpc ListImages(ListImagesRequest) returns (ListImagesResponse) {}
|
||||
rpc DeleteImages(DeleteImagesRequest) returns (DeleteImagesResponse) {}
|
||||
rpc GetImage(GetImageRequest) returns (GetImageResponse) {}
|
||||
}
|
||||
|
|
|
@ -40,8 +40,13 @@ message ListImagesRequest {
|
|||
// cannot be set (value > 0) with after (value > 0).
|
||||
int64 before = 5;
|
||||
|
||||
// OrderBy orders the images by the given field.
|
||||
//
|
||||
// if not set, the default order is by created_at DESC,
|
||||
// regardless of the sort field.
|
||||
OrderBy order_by = 6;
|
||||
|
||||
// sort orders the images by the given sort.
|
||||
Sort sort = 7;
|
||||
|
||||
// search searches images by text. ignored if empty.
|
||||
|
@ -61,6 +66,9 @@ message ListImagesRequest {
|
|||
|
||||
// nsfw filters the images to be fetched based on the nsfw flag.
|
||||
NSFW nsfw = 9;
|
||||
|
||||
// blacklist filters the images to be fetched based on the blacklist flag.
|
||||
Blacklist blacklist = 10;
|
||||
}
|
||||
|
||||
message ListImagesResponse {
|
||||
|
|
Loading…
Reference in a new issue