28 lines
542 B
Go
28 lines
542 B
Go
|
|
package handler
|
||
|
|
|
||
|
|
import (
|
||
|
|
"cybertron/service"
|
||
|
|
"github.com/gin-gonic/gin"
|
||
|
|
)
|
||
|
|
|
||
|
|
type SearchHandler struct {
|
||
|
|
searchService *service.SearchService
|
||
|
|
}
|
||
|
|
|
||
|
|
func (h *SearchHandler) SearchErrors(c *gin.Context) {
|
||
|
|
h.searchService.GetErrorDetails(c)
|
||
|
|
}
|
||
|
|
func (h *SearchHandler) GetErrorDetails(c *gin.Context) {
|
||
|
|
h.searchService.GetErrorDetails(c)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (h *SearchHandler) GetErrorList(c *gin.Context) {
|
||
|
|
h.searchService.GetErrorList(c)
|
||
|
|
}
|
||
|
|
|
||
|
|
func NewSearchHandler(s *service.SearchService) *SearchHandler {
|
||
|
|
return &SearchHandler{
|
||
|
|
searchService: s,
|
||
|
|
}
|
||
|
|
}
|