include "config.thrift" struct PushReq { 1: required list 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 list (api.body="list"); } struct GetPusherOptionsResponse { 1: list 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") }