Provides functions to manage GeoServer datastores via its REST API.
Supports listing, creating, updating, and deleting datastores within a specific
GeoServer workspace. All functions require a GeoserverConfig.Connection as their
first argument.
Supported datastore types
"postgis"— PostgreSQL/PostGIS"geopkg"— GeoPackage file"shapefile"— Shapefile"wfs"— Web Feature Service
Summary
Functions
Creates a new datastore in the specified workspace.
Deletes a datastore from the given workspace.
Lists all datastores in the given workspace.
Updates an existing datastore's configuration.
Functions
Creates a new datastore in the specified workspace.
Returns
{:ok, name}on success{:error, reason}on failure
Deletes a datastore from the given workspace.
Returns
{:ok, datastore_name}on success{:error, {:http_error, status, body}}on failure{:error, {:request_failed, message}}on transport error
Lists all datastores in the given workspace.
GeoServer returns a single map when there is only one datastore; this function normalises that to always return a list.
Returns
{:ok, [datastore]}on success{:error, {:http_error, status, body}}on non-200 response{:error, exception}on transport error
Updates an existing datastore's configuration.
Returns
{:ok, datastore_name}on success{:error, {:http_error, status, body}}on failure{:error, {:request_failed, message}}on transport error