mirror of
https://github.com/langhuihui/monibuca.git
synced 2025-12-24 13:48:04 +08:00
79 lines
1.6 KiB
Protocol Buffer
79 lines
1.6 KiB
Protocol Buffer
syntax = "proto3";
|
|
import "google/api/annotations.proto";
|
|
import "google/protobuf/empty.proto";
|
|
import "google/protobuf/timestamp.proto";
|
|
package mp4;
|
|
option go_package="m7s.live/v5/plugin/mp4/pb";
|
|
|
|
service api {
|
|
rpc List (ReqRecordList) returns (ResponseList) {
|
|
option (google.api.http) = {
|
|
get: "/mp4/api/list/{streamPath=**}"
|
|
};
|
|
}
|
|
rpc Catalog (google.protobuf.Empty) returns (ResponseCatalog) {
|
|
option (google.api.http) = {
|
|
get: "/mp4/api/catalog"
|
|
};
|
|
}
|
|
rpc Delete (ReqRecordDelete) returns (ResponseDelete) {
|
|
option (google.api.http) = {
|
|
post: "/mp4/api/delete/{streamPath=**}"
|
|
body: "*"
|
|
};
|
|
}
|
|
}
|
|
|
|
message ReqRecordList {
|
|
string streamPath = 1;
|
|
string range = 2;
|
|
string start = 3;
|
|
string end = 4;
|
|
uint32 page = 5;
|
|
uint32 pageSize = 6;
|
|
}
|
|
|
|
message RecordFile {
|
|
uint32 id = 1;
|
|
string filePath = 2;
|
|
string streamPath = 3;
|
|
google.protobuf.Timestamp startTime = 4;
|
|
google.protobuf.Timestamp endTime = 5;
|
|
}
|
|
|
|
message ResponseList {
|
|
int32 code = 1;
|
|
string message = 2;
|
|
uint32 total = 3;
|
|
uint32 page = 4;
|
|
uint32 pageSize = 5;
|
|
repeated RecordFile data = 6;
|
|
}
|
|
|
|
message Catalog {
|
|
string streamPath = 1;
|
|
uint32 count = 2;
|
|
google.protobuf.Timestamp startTime = 3;
|
|
google.protobuf.Timestamp endTime = 4;
|
|
}
|
|
|
|
message ResponseCatalog {
|
|
int32 code = 1;
|
|
string message = 2;
|
|
repeated Catalog data = 3;
|
|
}
|
|
|
|
message ReqRecordDelete {
|
|
string streamPath = 1;
|
|
repeated uint32 ids = 2;
|
|
string startTime = 3;
|
|
string endTime = 4;
|
|
string range = 5;
|
|
}
|
|
|
|
message ResponseDelete {
|
|
int32 code = 1;
|
|
string message = 2;
|
|
repeated RecordFile data = 3;
|
|
}
|