callback.api 798 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. syntax = "v1"
  2. info(
  3. title: "type title here"
  4. desc: "type desc here"
  5. author: "type author here"
  6. email: "type email here"
  7. version: "type version here"
  8. )
  9. type CallbackRequest {
  10. MsgSignature string `form:"msg_signature"`
  11. Timestamp string `form:"timestamp"`
  12. Nonce string `form:"nonce"`
  13. Echostr string `form:"echostr"`
  14. }
  15. type CallbackMsgRequest {
  16. MsgSignature string `form:"msg_signature"`
  17. Timestamp string `form:"timestamp"`
  18. Nonce string `form:"nonce"`
  19. }
  20. type CallbackResponse {
  21. Code int `json:"code"`
  22. Msg string `json:"msg"`
  23. Data string `json:"data"`
  24. }
  25. @server(
  26. // jwt: Auth
  27. group: callback
  28. timeout: 3s
  29. )
  30. service callback {
  31. @handler callbackHandler
  32. get /callback (CallbackRequest)
  33. @handler callbackMsgHandler
  34. post /callback (CallbackMsgRequest)
  35. }