(c *gin.Context)
| 27 | } |
| 28 | |
| 29 | func (p *Http) SendHandle(c *gin.Context) { |
| 30 | var req Req |
| 31 | if err := c.ShouldBind(&req); err != nil { |
| 32 | common.ErrorResp(c, err, 400) |
| 33 | return |
| 34 | } |
| 35 | select { |
| 36 | case p.Received <- req.Message: |
| 37 | common.SuccessResp(c) |
| 38 | default: |
| 39 | common.ErrorStrResp(c, "nowhere needed", 500) |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | func (p *Http) Send(message Message) error { |
| 44 | select { |
nothing calls this directly
no test coverage detected