Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
func (*Manager) Delete ¶
func (m *Manager) Delete(w http.ResponseWriter, r *http.Request)
Delete saved search by ID not done (note - I don't have the user auth stuff here)
@Summary Delete saved search by ID @Description delete a saved search for user @Tags saved_searches @Accept json @Produce json @Success 200 {object} savedsearches.SavedSearch @Router /saved_searches/{id} [delete]
func (*Manager) Get ¶
func (m *Manager) Get(w http.ResponseWriter, r *http.Request)
Get lists saved searches for current user (note - I don't have the user auth stuff here)
@Summary Get Saved Searches for current User @Description get saved searches for user @Tags saved_searches @Accept json @Produce json @Success 200 {array} savedsearches.SavedSearches @Router /saved_searches [get]
func (*Manager) GetByID ¶
func (m *Manager) GetByID(w http.ResponseWriter, r *http.Request)
Get saved searches for current user (note - I don't have the user auth stuff here)
@Summary Get Saved Search for current User @Description get saved searches for user @Tags saved_searches @Accept json @Produce json @Success 200 {array} savedsearches.SavedSearch @Router /saved_searches [get]
func (*Manager) Post ¶
func (m *Manager) Post(w http.ResponseWriter, r *http.Request)
Create saved search for current user (note - I don't have the user auth stuff here)
@Summary Create SavedSearch for current User @Description new saved search for user @Tags saved_searches @Accept json @Produce json @Success 200 {object} savedsearches.SavedSearch @Router /saved_searches [post]
type SavedSearch ¶
type SavedSearch struct { Id int `json:"id"` UserId int `json:"user_id"` Name string `json:"name"` Search SavedSearchQuery `json:"search"` }
func FromDBType ¶
func FromDBType(dbSavedSearch *db.SavedSearch, eligibilityIdToName map[int]string, categoryIdToName map[int]string) *SavedSearch
Convert DB SavedSearch to API SavedSearch
func FromDBTypeArray ¶
func FromDBTypeArray(dbSavedSearches []*db.SavedSearch, eligibilityIdToName map[int]string, categoryIdToName map[int]string) []*SavedSearch
type SavedSearchQuery ¶
type SavedSearches ¶
type SavedSearches struct {
SavedSearches []*SavedSearch `json:"saved_searches"`
}
Click to show internal directories.
Click to hide internal directories.