controllers

package
v0.0.0-...-6247311 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildSortString

func BuildSortString(searchString string, search models.Search) string

buildSearchString takes a pointer to a Search struct and returns a string that is the ORDER BY clause for a SQL query.

func Conformance

func Conformance(c *fiber.Ctx) error

func CreateCollection

func CreateCollection(c *fiber.Ctx) error

CreateCollection godoc @Summary Create a STAC collection @Description Create a collection with a unique ID @Tags Collections @ID post-collection @Accept json @Produce json @Param collection body models.Collection true "STAC Collection json" @Router /collections [post]

func CreateESCollection

func CreateESCollection(c *fiber.Ctx) error

func CreateItem

func CreateItem(c *fiber.Ctx) error

CreateItem godoc @Summary Create a STAC item @Description Create an item with an ID @Tags Items @ID post-item @Accept json @Produce json @Param collectionId path string true "Collection ID" @Param item body models.Item true "STAC Item json" @Router /collections/{collectionId}/items [post]

func DeleteCollection

func DeleteCollection(c *fiber.Ctx) error

DeleteCollection godoc @Summary Delete a Collection @Description Delete a collection by ID @Tags Collections @ID delete-collection-by-id @Accept json @Produce json @Param collectionId path string true "Collection ID" @Router /collections/{collectionId} [delete]

func DeleteESCollection

func DeleteESCollection(c *fiber.Ctx) error

func DeleteItem

func DeleteItem(c *fiber.Ctx) error

DeleteItem godoc @Summary Delete an Item @Description Delete an Item by ID is a specified collection @Tags Items @ID delete-item-by-id @Accept json @Produce json @Param itemId path string true "Item ID" @Param collectionId path string true "Collection ID" @Router /collections/{collectionId}/items/{itemId} [delete]

func ESCreateItem

func ESCreateItem(c *fiber.Ctx) error

func ESDeleteItem

func ESDeleteItem(c *fiber.Ctx) error

func ESGetItem

func ESGetItem(c *fiber.Ctx) error

func ESGetItemCollection

func ESGetItemCollection(c *fiber.Ctx) error

func ESItemExists

func ESItemExists(itemId string) (bool, error)

func ESUpdateItem

func ESUpdateItem(c *fiber.Ctx) error

func EditCollection

func EditCollection(c *fiber.Ctx) error

EditCollection godoc @Summary Edit a Collection @Description Edit a collection by ID @Tags Collections @ID edit-collection @Accept json @Produce json @Param collectionId path string true "Collection ID" @Param collection body models.Collection true "STAC Collection json" @Router /collections/{collectionId} [put] @Success 200 {object} models.Collection

func EditESCollection

func EditESCollection(c *fiber.Ctx) error

func EditItem

func EditItem(c *fiber.Ctx) error

EditItem godoc @Summary Edit an Item @Description Edit a stac item by ID @Tags Collections @ID edit-item @Accept json @Produce json @Param collectionId path string true "Collection ID" @Param itemId path string true "Item ID" @Param item body models.Item true "STAC Collection json" @Router /collections/{collectionId}/items/{itemId} [put] @Success 200 {object} models.Item

func GetCollection

func GetCollection(c *fiber.Ctx) error

GetCollection godoc @Summary Get a Collection @Description Get a collection by ID @Tags Collections @ID get-collection-by-id @Accept json @Produce json @Param collectionId path string true "Collection ID" @Router /collections/{collectionId} [get] @Success 200 {object} models.Collection

func GetCollections

func GetCollections(c *fiber.Ctx) error

GetCollections godoc @Summary Get all Collections @Description Get all Collections @Tags Collections @ID get-all-collections @Accept json @Produce json @Router /collections [get] @Success 200 {object} []models.Collection

func GetESCollection

func GetESCollection(c *fiber.Ctx) error

func GetESCollections

func GetESCollections(c *fiber.Ctx) error

func GetItem

func GetItem(c *fiber.Ctx) error

GetItem godoc @Summary Get an item @Description Get an item by its ID @Tags Items @ID get-item-by-id @Accept json @Produce json @Param itemId path string true "Item ID" @Param collectionId path string true "Collection ID" @Router /collections/{collectionId}/items/{itemId} [get] @Success 200 {object} models.Item

func GetItemCollection

func GetItemCollection(c *fiber.Ctx) error

GetItemCollection godoc @Summary Get all Items from a Collection @Description Get all Items with a Collection ID @Tags ItemCollection @ID get-item-collection @Accept json @Produce json @Param collectionId path string true "Collection ID" @Router /collections/{collectionId}/items [get] @Success 200 {object} models.ItemCollection

func GetSearch

func GetSearch(c *fiber.Ctx) error

GetSearch godoc @Summary GET Search request @Description Search for STAC items via the Search endpoint @Tags Search @ID get-search @Accept json @Produce json @Param bbox1, bbox2, bbox3, bbox4 path float true "Bbox" @Router /search [get]

func PostSearch

func PostSearch(c *fiber.Ctx) error

PostSearch godoc @Summary POST Search request @Description Search for STAC items via the Search endpoint @Tags Search @ID post-search @Accept json @Produce json @Param search body models.Search true "Search body json" @Router /search [post]

func Root

func Root(c *fiber.Ctx) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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