Provides functionality to manage Layer Groups in GeoServer via the REST API.
All functions require a GeoserverConfig.Connection as their first argument.
Summary
Functions
Adds a layer with an optional style to a GeoServer layer group.
Creates a new layer group in GeoServer.
Deletes a layer group from GeoServer by name.
Lists all layer groups available in GeoServer.
Removes a layer from a GeoServer layer group.
Updates an existing layer group.
Functions
Adds a layer with an optional style to a GeoServer layer group.
Fetches the current group state and appends the new layer before updating.
Returns
{:ok, body}on success{:error, reason}on failure
Creates a new layer group in GeoServer.
Accepts either an XML string or a JSON map as the body.
Returns
{:ok, body}on success (2xx){:error, {:http_error, status, body}}on failure{:error, {:request_failed, reason}}on transport error
Deletes a layer group from GeoServer by name.
Returns
{:ok, name}on success{:error, {:http_error, status, body}}on failure{:error, {:request_failed, reason}}on transport error
Lists all layer groups available in GeoServer.
Returns
{:ok, [group]}on success{:error, {:http_error, status, body}}on non-200 response{:error, {:request_failed, reason}}on transport error
Removes a layer from a GeoServer layer group.
Fetches the current group state and filters out the named layer before updating.
Returns
{:ok, body}on success{:error, :layer_not_found}if the layer is not in the group{:error, reason}on other failure
Updates an existing layer group.
Accepts either an XML string or a JSON map as the body.
Returns
{:ok, body}on success{:error, {:http_error, status, body}}on failure{:error, {:request_failed, reason}}on transport error