handlers

package
v0.0.0-...-7cabfb3 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchImageData

func FetchImageData(userID, imageID string) ([]byte, error)

func PostColorEnhancementPhoto

func PostColorEnhancementPhoto(userID, imageID string)

PostColorEnhancementPhoto godoc @Summary Enhance image color @Description enhance the color of a given image @Tags images @Accept json @Produce json @Param userID query string true "User ID" @Param imageID query string true "Image ID" @Success 200 {object} string "Completed color enhancement" @Router /enhance-color [post]

Types

type Coordinates

type Coordinates struct {
	Lat float64 `json:"lat"`
	Lon float64 `json:"lon"`
}

type ImageData

type ImageData struct {
	Data struct {
		ImageURL string `json:"image_url"`
	} `json:"data"`
}

ImageData is a struct to parse the data field.

type ImageProcessing

type ImageProcessing struct {
	ImageID  string `json:"image_id"`
	ImageURL string `json:"image_url"`
}

ImageProcessing represents the structure of your image processing data.

func GetImageProcessingPhotos

func GetImageProcessingPhotos() ([]ImageProcessing, error)

GetImageProcessingPhotos godoc @Summary Retrieve processed images @Description Fetches data for images that have undergone processing @Tags images @Accept json @Produce json @Success 200 {array} ImageProcessing @Router /image-processing [get]

type Place

type Place struct {
	Properties struct {
		Rate  int    `json:"rate"`
		Name  string `json:"name"`
		Kinds string `json:"kinds"`
	} `json:"properties"`
	Geometry struct {
		Type        string    `json:"type"`
		Coordinates []float64 `json:"coordinates"`
	} `json:"geometry"`
}

func FetchFamousPlaces

func FetchFamousPlaces() ([]Place, error)

FetchFamousPlaces godoc @Summary Fetch famous places @Description Retrieves a list of famous places within a specified radius @Tags places @Accept json @Produce json @Param lat query int true "Latitude" @Param lon query int true "Longitude" @Param radius query int true "Radius in meters" @Success 200 {array} Place @Router /famous-places [get]

type ResponseData

type ResponseData struct {
	Features []Place `json:"features"`
}

Jump to

Keyboard shortcuts

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