You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.4 KiB
63 lines
1.4 KiB
syntax = "v1"
|
|
import "/apis/teThoroughlyRegister.api"
|
|
import "/apis/pgTest.api"
|
|
|
|
type Request {
|
|
Name string `path:"name,options=you|me"`
|
|
}
|
|
|
|
type EsQueryName {
|
|
Name string `json:"name"`
|
|
Page int32 `json:"page"`
|
|
Size int32 `json:"size"`
|
|
}
|
|
|
|
type EsProQueryName {
|
|
Name string `json:"name"`
|
|
Code string `json:"code"`
|
|
LotType string `json:"lotType"`
|
|
Year string `json:"year"`
|
|
Page int32 `json:"page"`
|
|
Size int32 `json:"size"`
|
|
}
|
|
|
|
// 通用api返回参数
|
|
type Response {
|
|
Success bool `json:"success,default=true"` // 是否成功
|
|
Message string `json:"message,optional"` // 消息
|
|
Result interface{} `json:"data,optional"` // 数据
|
|
Total int64 `json:"total,optional"` // 总数
|
|
}
|
|
|
|
service demo-api {
|
|
@doc(
|
|
summary: "获取系统状态",
|
|
)
|
|
@handler PingHandler
|
|
post /ping returns (Response)
|
|
|
|
@doc(
|
|
summary: "es 压测 demo",
|
|
)
|
|
@handler EsPressureTestHandler
|
|
post /es/pressureTest(EsQueryName) returns (Response)
|
|
|
|
@doc(
|
|
summary: "es pro 正式环境",
|
|
|
|
)
|
|
@handler EsProSearchDistrictHandler
|
|
post /es/pro/searchDistrict(EsProQueryName) returns (Response)
|
|
|
|
@doc(
|
|
summary: "es pro 正式环境 正式查询",
|
|
)
|
|
@handler EsProFromJavaSearchDistrictHandler
|
|
post /es/pro/fromJavaSearchDistrict(EsProQueryName) returns (Response)
|
|
|
|
@doc(
|
|
summary: "测试返回503",
|
|
)
|
|
@handler Test503Handler
|
|
get /test503 returns (Response)
|
|
}
|