Documentation
¶
Index ¶
- func GetLogger() (logger *logrus.Logger)
- func IsEmpty(object interface{}) bool
- type AboutService
- type Attribute
- type Attributes
- type Attribution
- type BoundingBox
- type Catalog
- type ConfigurationService
- type CoverageStore
- type CoverageStoreRequestBody
- type CoverageStoresService
- type DataLinks
- type Datastore
- type DatastoreConnection
- type DatastoreConnectionParams
- type DatastoreDetails
- type DatastoreService
- type Entry
- type FeatureType
- type FeatureTypeService
- type FeatureTypes
- type FeatureTypesRequestBody
- type FeatureTypesResponseBody
- type GeoServer
- func (g *GeoServer) CreateCoverageStore(workspaceName string, coverageStore CoverageStore) (created bool, err error)
- func (g *GeoServer) CreateDatastore(datastoreConnection DatastoreConnection, workspaceName string) (created bool, err error)
- func (g *GeoServer) CreateLayerGroup(workspaceName string, layerGroup *LayerGroup) (created bool, err error)
- func (g *GeoServer) CreateStyle(workspaceName string, styleName string) (created bool, err error)
- func (g *GeoServer) CreateWorkspace(workspaceName string) (created bool, err error)
- func (g *GeoServer) DatastoreExists(workspaceName string, datastoreName string, quietOnNotFound bool) (exists bool, err error)
- func (g *GeoServer) DeSerializeJSON(response []byte, structObj interface{}) (err error)
- func (g *GeoServer) DeleteCoverageStore(workspaceName string, coverageStore string, recurse bool) (deleted bool, err error)
- func (g *GeoServer) DeleteDatastore(workspaceName string, datastoreName string, recurse bool) (deleted bool, err error)
- func (g *GeoServer) DeleteFeatureType(workspaceName string, datastoreName string, featureTypeName string, ...) (deleted bool, err error)
- func (g *GeoServer) DeleteLayer(workspaceName string, layerName string, recurse bool) (deleted bool, err error)
- func (g *GeoServer) DeleteLayerGroup(workspaceName string, layerGroupName string) (deleted bool, err error)
- func (g *GeoServer) DeleteStyle(workspaceName string, styleName string, purge bool) (deleted bool, err error)
- func (g *GeoServer) DeleteWorkspace(workspaceName string, recurse bool) (deleted bool, err error)
- func (g *GeoServer) DoRequest(request HTTPRequest) (responseText []byte, statusCode int)
- func (g *GeoServer) GetCapabilities(workspaceName string) (cap *wms.Capabilities, err error)
- func (g *GeoServer) GetCoverageStore(workspaceName string, gridName string) (coverageStore *CoverageStore, err error)
- func (g *GeoServer) GetCoverageStores(workspaceName string) (coverageStores []*Resource, err error)
- func (g *GeoServer) GetDatastoreDetails(workspaceName string, datastoreName string) (datastore *Datastore, err error)
- func (g *GeoServer) GetDatastores(workspaceName string) (datastores []*Resource, err error)
- func (g *GeoServer) GetError(statusCode int, text []byte) (err error)
- func (g *GeoServer) GetFeatureType(workspaceName string, datastoreName string, featureTypeName string) (featureType *FeatureType, err error)
- func (g *GeoServer) GetFeatureTypes(workspaceName string, datastoreName string) (featureTypes []*Resource, err error)
- func (g *GeoServer) GetGeoserverRequest(targetURL string, method string, accept string, data io.Reader, ...) (request *http.Request)
- func (g *GeoServer) GetLayer(workspaceName string, layerName string) (layer *Layer, err error)
- func (g *GeoServer) GetLayerGroup(workspaceName string, layerGroupName string) (layerGroup *LayerGroup, err error)
- func (g *GeoServer) GetLayerGroups(workspaceName string) (layerGroups []*Resource, err error)
- func (g *GeoServer) GetLayers(workspaceName string) (layers []*Resource, err error)
- func (g *GeoServer) GetStyle(workspaceName string, styleName string) (style *Style, err error)
- func (g *GeoServer) GetStyles(workspaceName string) (styles []*Resource, err error)
- func (g *GeoServer) GetWorkspace(workspaceName string) (workspace Workspace, err error)
- func (g *GeoServer) GetWorkspaces() (workspaces []*Resource, err error)
- func (g *GeoServer) GetshpFiledsName(filename string) string
- func (g *GeoServer) IsRunning() (running bool, err error)
- func (g *GeoServer) LoadConfig(configFile string) (geoserver *GeoServer, err error)
- func (g *GeoServer) ParseURL(urlParts ...string) (parsedURL string)
- func (g *GeoServer) PublishPostgisLayer(workspaceName string, datastoreName string, publishName string, ...) (published bool, err error)
- func (g *GeoServer) ReloadConfigration() (success bool, err error)
- func (g *GeoServer) RestConfigrationCache() (success bool, err error)
- func (g *GeoServer) SerializeStruct(structObj interface{}) ([]byte, error)
- func (g *GeoServer) StyleExists(workspaceName string, styleName string) (exists bool, err error)
- func (g *GeoServer) UpdateCoverageStore(workspaceName string, coverageStore CoverageStore) (modified bool, err error)
- func (g *GeoServer) UpdateLayer(workspaceName string, layerName string, layer Layer) (modified bool, err error)
- func (g *GeoServer) UploadShapeFile(fileURI string, workspaceName string, datastoreName string) (uploaded bool, err error)
- func (g *GeoServer) UploadStyle(data io.Reader, workspaceName string, styleName string, overwrite bool) (success bool, err error)
- func (g *GeoServer) WorkspaceExists(workspaceName string) (exists bool, err error)
- type GroupPublishableItem
- type HTTPRequest
- type Keywords
- type LanguageVersion
- type LatLonBoundingBox
- type Layer
- type LayerGroup
- type LayerGroupKeywords
- type LayerGroupService
- type LayerGroupStyles
- type LayerRequestBody
- type LayerService
- type Metadata
- type MetadataLink
- type MetadataLinks
- type NativeBoundingBox
- type PublishPostgisLayerRequest
- type Publishables
- type PublishedGroupLayers
- type Resource
- type ResponseSRS
- type Style
- type StyleRequestBody
- type StyleService
- type Styles
- type UtilsInterface
- type Workspace
- type WorkspaceRequestBody
- type WorkspaceService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AboutService ¶
type AboutService interface { //IsRunning check if geoserver is running return true and error if if error occure IsRunning() (running bool, err error) }
AboutService define all geoserver About operations
type Attribute ¶
type Attribute struct { Name string `json:"name,omitempty"` MinOccurs int16 `json:"minOccurs,omitempty"` MaxOccurs int16 `json:"maxOccurs,omitempty"` Nillable bool `json:"nillable,omitempty"` Binding string `json:"binding,omitempty"` Length int16 `json:"length,omitempty"` }
Attribute is geoserver FeatureType Attribute
type Attributes ¶
type Attributes struct {
Attribute []*Attribute `json:"attribute,omitempty"`
}
Attributes is the geoserver feature type attributes
type Attribution ¶
type Attribution struct { Title string `json:"title,omitempty"` Href string `json:"href,omitempty"` LogoURL string `json:"logoURL,omitempty"` LogoType string `json:"logoType,omitempty"` LogoWidth int `json:"logoWidth,omitempty"` LogoHeight int `json:"logoHeight,omitempty"` }
Attribution of resource
type BoundingBox ¶
type BoundingBox struct { Minx float64 `json:"minx,omitempty"` Maxx float64 `json:"maxx,omitempty"` Miny float64 `json:"miny,omitempty"` Maxy float64 `json:"maxy,omitempty"` }
BoundingBox is geoserver Bounding Box for FeatureType
type Catalog ¶
type Catalog interface { WorkspaceService DatastoreService StyleService AboutService LayerService LayerGroupService CoverageStoresService FeatureTypeService UtilsInterface }
Catalog is geoserver interface that define all operatoins
type ConfigurationService ¶
type ConfigurationService interface { RestConfigrationCache() (success bool, err error) ReloadConfigration() (success bool, err error) }
ConfigurationService define geoserver Configuration operations
type CoverageStore ¶
type CoverageStore struct { Name string `json:"name,omitempty"` URL string `json:"url,omitempty"` Description string `json:"description,omitempty"` Type string `json:"type,omitempty"` Enabled bool `json:"enabled,omitempty"` Workspace *Resource `json:"workspace,omitempty"` Default bool `json:"_default,omitempty"` Coverages string `json:"coverages,omitempty"` }
CoverageStore geoserver coverage store
type CoverageStoreRequestBody ¶
type CoverageStoreRequestBody struct {
CoverageStore *CoverageStore `json:"coverageStore,omitempty"`
}
CoverageStoreRequestBody geoserver coverage store to send to api
type CoverageStoresService ¶
type CoverageStoresService interface { GetCoverageStores(workspaceName string) (coverageStores []*Resource, err error) GetCoverageStore(workspaceName string, gridName string) (coverageStore *CoverageStore, err error) CreateCoverageStore(workspaceName string, coverageStore CoverageStore) (created bool, err error) UpdateCoverageStore(workspaceName string, coverageStore CoverageStore) (modified bool, err error) DeleteCoverageStore(workspaceName string, coverageStore string, recurse bool) (deleted bool, err error) }
CoverageStoresService define all geoserver CoverageStores operations
type DataLinks ¶
type DataLinks struct {
DataLink []*MetadataLink `json:"org.geoserver.catalog.impl.DataLinkInfoImpl,omitempty"`
}
DataLinks is the geoserver FeatureType Datalinks
type Datastore ¶
type Datastore struct { Name string `json:"name,omitempty"` Href string `json:"href,omitempty"` Type string `json:"type,omitempty"` Enabled bool `json:"enabled,omitempty"` Workspace *Workspace `json:"workspace,omitempty"` Default bool `json:"_default,omitempty"` FeatureTypes string `json:"featureTypes,omitempty"` ConnectionParameters DatastoreConnectionParams `json:"connectionParameters,omitempty"` }
Datastore holds geoserver store information
type DatastoreConnection ¶
type DatastoreConnection struct { Name string Host string Port int DBName string DBUser string DBPass string Type string }
DatastoreConnection holds parameters to create new datastore in geoserver
func (*DatastoreConnection) GetDatastoreObj ¶
func (connection *DatastoreConnection) GetDatastoreObj() (datastore Datastore)
GetDatastoreObj return datastore Object to send to geoserver rest
type DatastoreConnectionParams ¶
type DatastoreConnectionParams struct {
Entry []*Entry `json:"entry,omitempty"`
}
DatastoreConnectionParams in datastore json
type DatastoreDetails ¶
type DatastoreDetails struct {
Datastore *Datastore `json:"dataStore"`
}
DatastoreDetails this struct to send and accept json data from/to geoserver
type DatastoreService ¶
type DatastoreService interface { // DatastoreExists checks if a datastore exists in a workspace else return error DatastoreExists(workspaceName string, datastoreName string, quietOnNotFound bool) (exists bool, err error) // GetDatastores return datastores in a workspace else return error GetDatastores(workspaceName string) (datastores []*Resource, err error) // GetDatastoreDetails get specific datastore from geoserver else return error GetDatastoreDetails(workspaceName string, datastoreName string) (datastore *Datastore, err error) //CreateDatastore create a datastore under provided workspace CreateDatastore(datastoreConnection DatastoreConnection, workspaceName string) (created bool, err error) // DeleteDatastore deletes a datastore from geoserver else return error DeleteDatastore(workspaceName string, datastoreName string, recurse bool) (deleted bool, err error) }
DatastoreService define all geoserver datastore operations
type Entry ¶
Entry is geoserver Entry
func NativeCRSAsEntry ¶
func NativeCRSAsEntry(in interface{}) []Entry
NativeCRSAsEntry get CRS to Entry
type FeatureType ¶
type FeatureType struct { Name string `json:"name,omitempty"` NativeName string `json:"nativeName,omitempty"` Namespace *Resource `json:"namespace,omitempty"` Title string `json:"title,omitempty"` Abstract string `json:"abstract,omitempty"` Keywords *Keywords `json:"keywords,omitempty"` Metadatalinks *MetadataLinks `json:"metadatalinks,omitempty"` DataLinks *DataLinks `json:"dataLinks,omitempty"` NativeCRS *interface{} `json:"nativeCRS,omitempty"` Srs string `json:"srs,omitempty"` Enabled bool `json:"enabled,omitempty"` NativeBoundingBox *NativeBoundingBox `json:"nativeBoundingBox,omitempty"` LatLonBoundingBox *LatLonBoundingBox `json:"latLonBoundingBox,omitempty"` ProjectionPolicy string `json:"projectionPolicy,omitempty"` Metadata *Metadata `json:"metadata,omitempty"` Store *Resource `json:"store,omitempty"` CqlFilter string `json:"cqlFilter,omitempty"` MaxFeatures int32 `json:"maxFeatures,omitempty"` NumDecimals float32 `json:"numDecimals,omitempty"` ResponseSRS *ResponseSRS `json:"responseSRS,omitempty"` CircularArcPresent bool `json:"circularArcPresent,omitempty"` OverridingServiceSRS bool `json:"overridingServiceSRS,omitempty"` SkipNumberMatched bool `json:"skipNumberMatched,omitempty"` LinearizationTolerance bool `json:"linearizationTolerance,omitempty"` Attributes *Attributes `json:"attributes,omitempty"` }
FeatureType is geoserver FeatureType
type FeatureTypeService ¶
type FeatureTypeService interface { GetFeatureTypes(workspaceName string, datastoreName string) (featureTypes []*Resource, err error) GetFeatureType(workspaceName string, datastoreName string, featureTypeName string) (featureType *FeatureType, err error) DeleteFeatureType(workspaceName string, datastoreName string, featureTypeName string, recurse bool) (deleted bool, err error) }
FeatureTypeService define all geoserver featuretype operations
type FeatureTypes ¶
type FeatureTypes struct {
FeatureType []*Resource `json:"featureType,omitempty"`
}
FeatureTypes holds a list of geoserver styles
type FeatureTypesRequestBody ¶
type FeatureTypesRequestBody struct {
FeatureType *FeatureType `json:"featureTypes,omitempty"`
}
FeatureTypesRequestBody is the api body
type FeatureTypesResponseBody ¶
type FeatureTypesResponseBody struct {
FeatureTypes *FeatureTypes `json:"featureTypes,omitempty"`
}
FeatureTypesResponseBody is the api body
type GeoServer ¶
type GeoServer struct { WorkspaceName string `yaml:"workspace"` ServerURL string `yaml:"geoserver_url"` Username string `yaml:"username"` Password string `yaml:"password"` // contains filtered or unexported fields }
GeoServer is the configuration Object
func GetCatalog ¶
GetCatalog return geoserver catalog instance, this fuction take geoserverURL('http://localhost:8080/geoserver/') , geoserver username, geoserver password return geoserver structObj
func (*GeoServer) CreateCoverageStore ¶
func (g *GeoServer) CreateCoverageStore(workspaceName string, coverageStore CoverageStore) (created bool, err error)
CreateCoverageStore create coverage store in geoserver and return created one else return error
func (*GeoServer) CreateDatastore ¶
func (g *GeoServer) CreateDatastore(datastoreConnection DatastoreConnection, workspaceName string) (created bool, err error)
CreateDatastore create a datastore under provided workspace
func (*GeoServer) CreateLayerGroup ¶
func (g *GeoServer) CreateLayerGroup(workspaceName string, layerGroup *LayerGroup) (created bool, err error)
CreateLayerGroup create specific LayerGroup in geoserver return created=true else created=false and the error, if workspace is "" the it will return geoserver public layer with ${layerName}
func (*GeoServer) CreateStyle ¶
CreateStyle create geoserver empty sld with name and filename is(${styleName.sld}), if workspace is "" will create geoserver public style
func (*GeoServer) CreateWorkspace ¶
CreateWorkspace creates a workspace and return if created or not else return error
func (*GeoServer) DatastoreExists ¶
func (g *GeoServer) DatastoreExists(workspaceName string, datastoreName string, quietOnNotFound bool) (exists bool, err error)
DatastoreExists checks if a datastore exists in a workspace else return error
func (*GeoServer) DeSerializeJSON ¶
DeSerializeJSON json struct to struct
func (*GeoServer) DeleteCoverageStore ¶
func (g *GeoServer) DeleteCoverageStore(workspaceName string, coverageStore string, recurse bool) (deleted bool, err error)
DeleteCoverageStore delete coverage store from geoserver else return error
func (*GeoServer) DeleteDatastore ¶
func (g *GeoServer) DeleteDatastore(workspaceName string, datastoreName string, recurse bool) (deleted bool, err error)
DeleteDatastore deletes a datastore from geoserver else return error
func (*GeoServer) DeleteFeatureType ¶
func (g *GeoServer) DeleteFeatureType(workspaceName string, datastoreName string, featureTypeName string, recurse bool) (deleted bool, err error)
DeleteFeatureType Delete FeatureType from geoserver given that workspaceName, datastoreName, featureTypeName if featuretype deleted successfully will return true and nil for err if error occurred will return false and error for err
func (*GeoServer) DeleteLayer ¶
func (g *GeoServer) DeleteLayer(workspaceName string, layerName string, recurse bool) (deleted bool, err error)
DeleteLayer delete geoserver layer and its reources else return error, if workspace is "" will delete public layer with name ${layerName} if exists
func (*GeoServer) DeleteLayerGroup ¶
func (g *GeoServer) DeleteLayerGroup(workspaceName string, layerGroupName string) (deleted bool, err error)
DeleteLayerGroup delete geoserver layergroup else return error, if workspace is "" will delete public layergroup with name ${layerGroupName} if exists
func (*GeoServer) DeleteStyle ¶
func (g *GeoServer) DeleteStyle(workspaceName string, styleName string, purge bool) (deleted bool, err error)
DeleteStyle delete geoserver style, if workspace is "" will delete geoserver public style , return err if error occurred
func (*GeoServer) DeleteWorkspace ¶
DeleteWorkspace delete geoserver workspace and its reources else return error
func (*GeoServer) DoRequest ¶
func (g *GeoServer) DoRequest(request HTTPRequest) (responseText []byte, statusCode int)
DoRequest Send request and return result and statusCode
func (*GeoServer) GetCapabilities ¶
func (g *GeoServer) GetCapabilities(workspaceName string) (cap *wms.Capabilities, err error)
GetCapabilities Retrieves metadata about the service, including supported operations and parameters, and a list of the available layers
func (*GeoServer) GetCoverageStore ¶
func (g *GeoServer) GetCoverageStore(workspaceName string, gridName string) (coverageStore *CoverageStore, err error)
GetCoverageStore return coverage store from a workspace, err is an error if error occurred else err is nil
func (*GeoServer) GetCoverageStores ¶
GetCoverageStores return all coverage store as resources, err is an error if error occurred else err is nil
func (*GeoServer) GetDatastoreDetails ¶
func (g *GeoServer) GetDatastoreDetails(workspaceName string, datastoreName string) (datastore *Datastore, err error)
GetDatastoreDetails get specific datastore from geoserver else return error
func (*GeoServer) GetDatastores ¶
GetDatastores return datastores in a workspace else return error
func (*GeoServer) GetFeatureType ¶
func (g *GeoServer) GetFeatureType(workspaceName string, datastoreName string, featureTypeName string) (featureType *FeatureType, err error)
GetFeatureType it return geoserver FeatureType and nil err if success else nil for fetureType error for err
func (*GeoServer) GetFeatureTypes ¶
func (g *GeoServer) GetFeatureTypes(workspaceName string, datastoreName string) (featureTypes []*Resource, err error)
GetFeatureTypes return all featureTypes in workspace and datastore if error occurred err will be return and nil for featrueTypes
func (*GeoServer) GetGeoserverRequest ¶
func (g *GeoServer) GetGeoserverRequest( targetURL string, method string, accept string, data io.Reader, contentType string) (request *http.Request)
GetGeoserverRequest creates a HTTP request with geoserver credintails and header
func (*GeoServer) GetLayer ¶
GetLayer get specific Layer in a workspace from geoserver else return error, if workspace is "" the it will return geoserver public layer with ${layerName}
func (*GeoServer) GetLayerGroup ¶
func (g *GeoServer) GetLayerGroup(workspaceName string, layerGroupName string) (layerGroup *LayerGroup, err error)
GetLayerGroup get specific LayerGroup in a workspace from geoserver else return error, if workspace is "" the it will return geoserver public layer with ${layerName}
func (*GeoServer) GetLayerGroups ¶
GetLayerGroups get all layergroups from workspace in geoserver else return error, if workspace is "" the it will return all public layers in geoserver
func (*GeoServer) GetLayers ¶
GetLayers get all layers from workspace in geoserver else return error, if workspace is "" the it will return all public layers in geoserver
func (*GeoServer) GetStyle ¶
GetStyle return specific of geoserver style, if workspace is "" will return non-workspce styles
func (*GeoServer) GetStyles ¶
GetStyles return list of geoserver styles and err if error occurred, if workspace is "" will return non-workspce styles
func (*GeoServer) GetWorkspace ¶
GetWorkspace get geoserver workspace else return error
func (*GeoServer) GetWorkspaces ¶
GetWorkspaces get geoserver workspaces else return error
func (*GeoServer) GetshpFiledsName ¶
GetshpFiledsName datastore name from shapefile name
func (*GeoServer) IsRunning ¶
IsRunning check if geoserver is running \n return true if geoserver running, and false if not runnging, err is an error if error occurredÎ
func (*GeoServer) LoadConfig ¶
LoadConfig load geoserver config from yaml file
func (*GeoServer) PublishPostgisLayer ¶
func (g *GeoServer) PublishPostgisLayer(workspaceName string, datastoreName string, publishName string, tableName string) (published bool, err error)
PublishPostgisLayer publish postgis table to geoserver
func (*GeoServer) ReloadConfigration ¶
ReloadConfigration Reloads the GeoServer catalog and configuration from disk. This operation is used in cases where an external tool has modified the on-disk configuration. This operation will also force GeoServer to drop any internal caches and reconnect to all data stores.
func (*GeoServer) RestConfigrationCache ¶
RestConfigrationCache Resets all store, raster, and schema caches. This operation is used to force GeoServer to drop all caches and store connections and reconnect to each of them the next time they are needed by a request. This is useful in case the stores themselves cache some information about the data structures they manage that may have changed in the meantime.
func (*GeoServer) SerializeStruct ¶
SerializeStruct convert struct to json
func (*GeoServer) StyleExists ¶
StyleExists return true if style exists in geoserver
func (*GeoServer) UpdateCoverageStore ¶
func (g *GeoServer) UpdateCoverageStore(workspaceName string, coverageStore CoverageStore) (modified bool, err error)
UpdateCoverageStore parital update coverage store in geoserver else return error
func (*GeoServer) UpdateLayer ¶
func (g *GeoServer) UpdateLayer(workspaceName string, layerName string, layer Layer) (modified bool, err error)
UpdateLayer partial update geoserver layer else return error, if workspace is "" the it will update public layer with name ${layerName} in geoserver
func (*GeoServer) UploadShapeFile ¶
func (g *GeoServer) UploadShapeFile(fileURI string, workspaceName string, datastoreName string) (uploaded bool, err error)
UploadShapeFile upload shapefile to geoserver
type GroupPublishableItem ¶
type GroupPublishableItem struct { Type string `json:"@type,omitempty" xml:"type"` Name string `json:"name,omitempty" xml:"name"` Href string `json:"href,omitempty" xml:"href"` }
GroupPublishableItem geoserver Group
type HTTPRequest ¶
type HTTPRequest struct { URL string Accept string Query map[string]string Data io.Reader DataType string Method string }
HTTPRequest is an http request object
type Keywords ¶
type Keywords struct {
String []string `json:"string,omitempty"`
}
Keywords is the geoserver Keywords
type LanguageVersion ¶
type LanguageVersion struct {
Version string `json:"version,omitempty"`
}
LanguageVersion style version
type LatLonBoundingBox ¶
type LatLonBoundingBox struct { BoundingBox Crs string `json:"crs,omitempty"` }
LatLonBoundingBox is geoserver LatLonBoundingBox for FeatureType
type Layer ¶
type Layer struct { Name string `json:"name,omitempty"` Path string `json:"path,omitempty"` Type string `json:"type,omitempty"` DefaultStyle *Resource `json:"defaultStyle,omitempty"` Styles *struct { Class string `json:"@class,omitempty"` Style []Resource `json:"style,omitempty"` } `json:"styles,omitempty"` Resource Resource `json:"resource,omitempty"` Queryable bool `json:"queryable,omitempty"` Opaque bool `json:"opaque,omitempty"` Attribution *Attribution `json:"attribution,omitempty"` }
Layer geoserver layers
type LayerGroup ¶
type LayerGroup struct { Name string `json:"name,omitempty" xml:"name"` Mode string `json:"mode,omitempty" xml:"mode"` Title string `json:"title,omitempty" xml:"title"` Workspace *Resource `json:"workspace,omitempty" xml:"workspace"` Publishables Publishables `json:"publishables,omitempty" xml:"publishables"` Styles LayerGroupStyles `json:"styles,omitempty" xml:"styles"` Bounds NativeBoundingBox `json:"bounds,omitempty" xml:"bounds"` MetadataLinks []*MetadataLink `json:"metadataLinks,omitempty" xml:"metadataLinks"` Keywords LayerGroupKeywords `json:"keywords,omitempty" xml:"keywords"` }
LayerGroup geoserver layergroup details
type LayerGroupKeywords ¶
type LayerGroupKeywords struct {
Keyword []*string `json:"keyword,omitempty"`
}
LayerGroupKeywords geoserver layergroups keywords
type LayerGroupService ¶
type LayerGroupService interface { GetLayerGroups(workspaceName string) (layerGroups []*Resource, err error) GetLayerGroup(workspaceName string, layerGroupName string) (layer *LayerGroup, err error) CreateLayerGroup(workspaceName string, layerGroup *LayerGroup) (created bool, err error) DeleteLayerGroup(workspaceName string, layerGroupName string) (deleted bool, err error) }
LayerGroupService define geoserver layergroup operations
type LayerGroupStyles ¶
type LayerGroupStyles struct {
Style []*Resource `json:"style,omitempty" xml:"style"`
}
LayerGroupStyles geoserver layergroup styles
type LayerRequestBody ¶
type LayerRequestBody struct {
Layer Layer `json:"layer,omitempty"`
}
LayerRequestBody api json
type LayerService ¶
type LayerService interface { //GetLayers get all layers from workspace in geoserver else return error GetLayers(workspaceName string) (layers []*Resource, err error) // GetshpFiledsName datastore name from shapefile name GetshpFiledsName(filename string) string // UploadShapeFile upload shapefile to geoserver UploadShapeFile(fileURI string, workspaceName string, datastoreName string) (uploaded bool, err error) //GetLayer get specific Layer from geoserver else return error GetLayer(workspaceName string, layerName string) (layer *Layer, err error) //UpdateLayer partial update geoserver layer else return error UpdateLayer(workspaceName string, layerName string, layer Layer) (modified bool, err error) //DeleteLayer delete geoserver layer and its reources else return error DeleteLayer(workspaceName string, layerName string, recurse bool) (deleted bool, err error) PublishPostgisLayer(workspaceName string, datastoreName string, publishName string, tableName string) (published bool, err error) }
LayerService define geoserver layers operations
type Metadata ¶
type Metadata struct {
Entry []*Entry `json:"entry,omitempty"`
}
Metadata is the geoserver Metadata
type MetadataLink ¶
type MetadataLink struct { Type string `json:"type,omitempty"` MetadataType string `json:"metadataType,omitempty"` Content string `json:"content,omitempty"` }
MetadataLink is geoserver metadata link
type MetadataLinks ¶
type MetadataLinks struct {
MetadataLink []*MetadataLink `json:"metadataLink,omitempty"`
}
MetadataLinks is the geoserver metadata links
type NativeBoundingBox ¶
type NativeBoundingBox struct { BoundingBox Crs *interface{} `json:"crs,omitempty"` }
NativeBoundingBox is geoserver NativeBoundingBox for FeatureType
type PublishPostgisLayerRequest ¶
type PublishPostgisLayerRequest struct {
FeatureType *FeatureType `json:"featureType,omitempty"`
}
PublishPostgisLayerRequest is the api body
type Publishables ¶
type Publishables struct {
Published PublishedGroupLayers `json:"published" xml:"published"`
}
Publishables Geoserver Published Layers
type PublishedGroupLayers ¶
type PublishedGroupLayers []*GroupPublishableItem
PublishedGroupLayers geoserver published layers
func (*PublishedGroupLayers) UnmarshalJSON ¶
func (u *PublishedGroupLayers) UnmarshalJSON(data []byte) error
UnmarshalJSON custom deserialization to handle published layers of group
type Resource ¶
type Resource struct { Class string `json:"@class,omitempty"` Name string `json:"name,omitempty"` Href string `json:"href,omitempty"` }
Resource geoserver resource
type ResponseSRS ¶
type ResponseSRS struct {
String []int `json:"string,omitempty"`
}
ResponseSRS is the geoserver ResponseSRS
type Style ¶
type Style struct { Name string `json:"name,omitempty"` Format string `json:"format,omitempty"` Filename string `json:"filename,omitempty"` LanguageVersion *LanguageVersion `json:"languageVersion,omitempty"` }
Style holds geoserver style
type StyleRequestBody ¶
type StyleRequestBody struct {
Style *Style `json:"style,omitempty"`
}
StyleRequestBody is the api body
type StyleService ¶
type StyleService interface { GetStyles(workspaceName string) (styles []*Resource, err error) CreateStyle(workspaceName string, styleName string) (created bool, err error) UploadStyle(data io.Reader, workspaceName string, styleName string, overwrite bool) (success bool, err error) DeleteStyle(workspaceName string, styleName string, purge bool) (deleted bool, err error) GetStyle(workspaceName string, styleName string) (style *Style, err error) StyleExists(workspaceName string, styleName string) (exists bool, err error) }
StyleService define all geoserver style operations
type Styles ¶
type Styles struct {
Style []Style `json:"styles,omitempty"`
}
Styles holds a list of geoserver styles
type UtilsInterface ¶
type UtilsInterface interface { DoRequest(request HTTPRequest) (responseText []byte, statusCode int) SerializeStruct(structObj interface{}) ([]byte, error) DeSerializeJSON(response []byte, structObj interface{}) (err error) ParseURL(urlParts ...string) (parsedURL string) }
UtilsInterface contians common function used to help you deal with data and geoserver api
type Workspace ¶
type Workspace struct { Name string `json:"name,omitempty"` Isolated bool `json:"isolated,omitempty"` DataStores string `json:"dataStores,omitempty"` CoverageStores string `json:"coverageStores,omitempty"` WmsStores string `json:"wmsStores,omitempty"` WmtsStores string `json:"wmtsStores,omitempty"` }
Workspace is the Workspace Object
type WorkspaceRequestBody ¶
type WorkspaceRequestBody struct {
Workspace *Workspace `json:"workspace,omitempty"`
}
WorkspaceRequestBody is the api body
type WorkspaceService ¶
type WorkspaceService interface { // WorkspaceExists check if workspace in geoserver or not else return error WorkspaceExists(workspaceName string) (exists bool, err error) // GetWorkspaces get geoserver workspaces else return error GetWorkspaces() (workspaces []*Resource, err error) // GetWorkspace get geoserver workspaces else return error GetWorkspace(workspaceName string) (workspace Workspace, err error) // CreateWorkspace creates a workspace else return error CreateWorkspace(workspaceName string) (created bool, err error) //DeleteWorkspace delete geoserver workspace and its reources else return error DeleteWorkspace(workspaceName string, recurse bool) (deleted bool, err error) }
WorkspaceService define all geoserver workspace operations