Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLogHandler ¶
Types ¶
type LogBatchRequest ¶
type LogBatchRequest struct { Stream string `json:"stream" validate:"required"` Logs []LogBatchSingleLog `json:"logs" validate:"required"` }
type LogBatchSingleLog ¶
type LogHttpHandler ¶
type LogHttpHandler struct {
// contains filtered or unexported fields
}
func (*LogHttpHandler) Log ¶
func (h *LogHttpHandler) Log(c *fiber.Ctx) error
Log godoc @ID log @Router /log [post] @Tags log @Description add a new log on a logstream @Summary push a log @Accept json @Param Payload body LogRequest true "send a log" @Produce json @Success 200 {object} http_common.SuccessResponse @Failure 404 {object} http_common.ErrorResponse @Failure 422 {object} http_common.ErrorResponse @Failure 500 {object} http_common.ErrorResponse
func (*LogHttpHandler) LogBatch ¶
func (h *LogHttpHandler) LogBatch(c *fiber.Ctx) error
LogBatch godoc @ID batch @Router /batch [post] @Tags log @Description add a bunch of logs at once to a stream @Summary push multiple logs at once @Accept json @Param Payload body LogBatchRequest true "batch some logs" @Produce json @Success 200 {object} http_common.SuccessResponse @Failure 404 {object} http_common.ErrorResponse @Failure 422 {object} http_common.ErrorResponse @Failure 500 {object} http_common.ErrorResponse