pusher/idl/push.thrift
timerzz 4ec0cd1564
Some checks failed
Build image / build (push) Failing after 4m48s
feat 测试
2024-05-20 17:57:25 +08:00

37 lines
1.1 KiB
Thrift

include "config.thrift"
struct PushReq {
1: required list<i64> ids (api.body="ids");
2: required string title (api.body="title");
3: required string content (api.body="content");
}
struct Resp {
1: required i64 code (api.body="code");
2: string msg (api.body="msg");
3: string msgId (api.body="msgId");
}
struct ListPusherRequest {
1: string keyword (api.query="keyword");
2: optional i64 page = 10 (api.query="page");
3: optional i16 size = 1 (api.query="size");
4: bool all (api.query="all");
}
struct ListPusherResponse {
1: i64 total (api.body="total");
2: list<config.PusherConfig> list (api.body="list");
}
struct GetPusherOptionsResponse {
1: map<config.PusherConfigType,list<config.FormItem>> options
}
service PushService{
Resp Push(1: PushReq req) (api.post="/api/v1/push");
Resp Add(1: config.PusherConfig req) (api.post="/api/v1/pushers");
ListPusherResponse List(1: ListPusherRequest req) (api.get="/api/v1/pushers");
GetPusherOptionsResponse GetPusherOptions() (api.get="/api/v1/pushers/options")
}