All checks were successful
Build and Push Image / build-and-push (push) Successful in 5m24s
102 lines
1.4 KiB
Protocol Buffer
102 lines
1.4 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
option csharp_namespace = "Aoba.RPC";
|
|
package aoba;
|
|
import "google/protobuf/empty.proto";
|
|
|
|
message Credentials{
|
|
string user = 1;
|
|
string password = 2;
|
|
}
|
|
|
|
message PassKeyPayload {
|
|
|
|
}
|
|
|
|
|
|
message Jwt{
|
|
string token = 1;
|
|
}
|
|
|
|
message LoginResponse{
|
|
oneof result {
|
|
Jwt jwt = 1;
|
|
LoginError error = 2;
|
|
}
|
|
}
|
|
|
|
message LoginError{
|
|
string message = 1;
|
|
}
|
|
|
|
message PageFilter {
|
|
optional int32 page = 1;
|
|
optional int32 pageSize = 2;
|
|
optional string query = 3;
|
|
}
|
|
|
|
message Id {
|
|
string value = 1;
|
|
}
|
|
|
|
message MediaResponse {
|
|
oneof result {
|
|
MediaModel value = 1;
|
|
google.protobuf.Empty empty = 2;
|
|
}
|
|
}
|
|
|
|
message ListResponse {
|
|
repeated MediaModel items = 1;
|
|
Pagination pagination = 2;
|
|
}
|
|
|
|
message Pagination {
|
|
int32 page = 1;
|
|
int32 pageSize = 2;
|
|
int64 totalPages = 3;
|
|
int64 totalItems = 4;
|
|
optional string query = 5;
|
|
}
|
|
|
|
message UserResponse {
|
|
oneof userResult {
|
|
UserModel user = 1;
|
|
google.protobuf.Empty empty = 2;
|
|
}
|
|
}
|
|
|
|
message UserModel {
|
|
Id id = 1;
|
|
string username = 2;
|
|
string email = 3;
|
|
bool isAdmin = 4;
|
|
}
|
|
|
|
|
|
message MediaModel {
|
|
Id id = 1;
|
|
string fileName = 2;
|
|
MediaType mediaType = 3;
|
|
string ext = 4;
|
|
int32 viewCount = 5;
|
|
Id owner = 6;
|
|
string thumbUrl = 7;
|
|
}
|
|
|
|
enum MediaType {
|
|
Image = 0;
|
|
Audio = 1;
|
|
Video = 2;
|
|
Text = 3;
|
|
Code = 4;
|
|
Raw = 5;
|
|
}
|
|
|
|
message ShareXResponse {
|
|
oneof dstResult {
|
|
string destination = 1;
|
|
string error = 2;
|
|
}
|
|
}
|