Documentation
¶
Index ¶
- func HandleCantorsList(app *infrastructure.AppState) gin.HandlerFunc
- func HandleDeleteCantor(app *infrastructure.AppState) gin.HandlerFunc
- func HandleDiscover(app *infrastructure.AppState) gin.HandlerFunc
- func HandleFinOps(app *infrastructure.AppState) gin.HandlerFunc
- func HandleGetHistory(app *infrastructure.AppState) gin.HandlerFunc
- func HandleGetRates(app *infrastructure.AppState) gin.HandlerFunc
- func HandleHealthCheck(app *infrastructure.AppState) gin.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleCantorsList ¶
func HandleCantorsList(app *infrastructure.AppState) gin.HandlerFunc
HandleCantorsList godoc @Summary List Cantors @Description Returns a list of all available cantors with their geolocations. @Tags cantors @Produce json @Success 200 {array} infrastructure.CantorListResponse @Failure 500 {object} map[string]string @Router /cantors [get]
func HandleDeleteCantor ¶
func HandleDeleteCantor(app *infrastructure.AppState) gin.HandlerFunc
HandleDeleteCantor godoc @Summary Delete Cantor @Description Deletes a discovered cantor from the database by ID. @Tags cantors @Param id path int true "Cantor ID" @Produce json @Success 200 {object} map[string]string @Failure 400 {object} map[string]string @Failure 403 {object} map[string]string @Failure 404 {object} map[string]string @Failure 500 {object} map[string]string @Router /cantors/{id} [delete]
func HandleDiscover ¶
func HandleDiscover(app *infrastructure.AppState) gin.HandlerFunc
HandleDiscover godoc @Summary Discover New Cantor @Description Attempts to discover exchange rates on a new URL using heuristic scraping and adds it to the database and Elasticsearch. @Tags discovery @Accept json @Produce json @Param discovery body map[string]string true "Discovery parameters (url, name, lat, lon)" @Success 201 {object} map[string]string @Failure 400 {object} map[string]string @Failure 500 {object} map[string]string @Router /discover [post]
func HandleFinOps ¶
func HandleFinOps(app *infrastructure.AppState) gin.HandlerFunc
func HandleGetHistory ¶
func HandleGetHistory(app *infrastructure.AppState) gin.HandlerFunc
func HandleGetRates ¶
func HandleGetRates(app *infrastructure.AppState) gin.HandlerFunc
HandleGetRates godoc @Summary Get Rates @Description Returns the buy and sell rates for a specific cantor and currency. Scrapes data in real-time if not cached. @Tags rates @Produce json @Param cantor_id query int true "Cantor ID" @Param currency query string true "Currency Code (e.g., EUR, USD)" @Success 200 {object} pb.RateResponse @Failure 400 {object} map[string]string @Failure 404 {object} map[string]string @Failure 500 {object} map[string]string @Router /rates [get]
func HandleHealthCheck ¶
func HandleHealthCheck(app *infrastructure.AppState) gin.HandlerFunc
HandleHealthCheck godoc @Summary Health Check @Description Checks if the server, database, and Redis are running correctly. @Tags health @Produce json @Success 200 {object} map[string]string @Failure 503 {object} map[string]string @Router /healthz [get]
Types ¶
This section is empty.