pusher/idl/push.thrift
timerzz e099838d65
All checks were successful
Build image / build (push) Successful in 1m27s
feat 修改pusher options返回类型
2024-05-21 14:01:28 +08:00

37 lines
1.0 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: list<config.PusherOption> 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")
}