Documentation ¶
Index ¶
- func Delete(db *gorm.DB, index string, uuid string) error
- func Search[T types.Searchable](db *gorm.DB, query types.SearchRequest) (*types.SearchResult[T], error)
- func SearchRoutes(params types.RouteParams)
- func Upsert[T types.Searchable](db *gorm.DB, index string, uuid string, model types.ToSearchDocument) error
- type SearchController
- type SearchService
- type SearchServiceInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Search ¶
func Search[T types.Searchable](db *gorm.DB, query types.SearchRequest) (*types.SearchResult[T], error)
func SearchRoutes ¶
func SearchRoutes(params types.RouteParams)
Types ¶
type SearchController ¶
type SearchController struct {
// contains filtered or unexported fields
}
func NewSearchController ¶
func NewSearchController(searchService SearchServiceInterface) *SearchController
func (*SearchController) SearchClubs ¶
func (s *SearchController) SearchClubs(c *fiber.Ctx) error
SearchClubs godoc
@Summary Searches through clubs @Description Searches through clubs @ID search-clubs @Tags search @Accept json @Produce json @Param searchQuery query search_types.ClubSearchRequest true "Search Body" @Success 200 {object} []search_types.SearchResult[models.Club] @Failure 404 {object} error @Failure 500 {object} error @Router /search/clubs [get]
func (*SearchController) SearchEvents ¶
func (s *SearchController) SearchEvents(c *fiber.Ctx) error
SearchEvents godoc
@Summary Searches through events @Description Searches through events @ID search-event @Tags search @Accept json @Produce json @Param searchQuery query search_types.EventSearchRequest true "Search Body" @Success 200 {object} []search_types.SearchResult[models.Event] @Failure 404 {object} error @Failure 500 {object} error @Router /search/events [get]
type SearchService ¶
type SearchService struct {
types.ServiceParams
}
func (*SearchService) SearchClubs ¶
func (s *SearchService) SearchClubs(query search_types.ClubSearchRequest) (*search_types.SearchResult[models.Club], error)
func (*SearchService) SearchEvents ¶
func (s *SearchService) SearchEvents(query search_types.EventSearchRequest) (*search_types.SearchResult[models.Event], error)
type SearchServiceInterface ¶
type SearchServiceInterface interface { SearchClubs(query search_types.ClubSearchRequest) (*search_types.SearchResult[models.Club], error) SearchEvents(query search_types.EventSearchRequest) (*search_types.SearchResult[models.Event], error) }
func NewSearchService ¶
func NewSearchService(serviceParams types.ServiceParams) SearchServiceInterface