base

package
v0.0.0-...-83ced17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

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

func SearchRoutes(params types.RouteParams)

func Upsert

func Upsert[T types.Searchable](db *gorm.DB, index string, uuid string, model types.ToSearchDocument) error

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 (*SearchService) SearchEvents

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL