23 lines
330 B
Go
23 lines
330 B
Go
package controller
|
|
|
|
import (
|
|
"elasticstream/source/elastic"
|
|
|
|
"github.com/elastic/go-elasticsearch/v8"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func Ack(c *gin.Context) {
|
|
|
|
var req Position
|
|
|
|
c.BindJSON(c, &req)
|
|
|
|
err := client.Ack(c, req)
|
|
if err != nil {
|
|
c.Status(http.StatusInternalServerError)
|
|
return
|
|
}
|
|
c.Status(http.StatusOK)
|
|
}
|