Documentation ¶
Index ¶
Constants ¶
const ( ConfigKeyHost = "host" ConfigKeyPort = "port" ConfigKeyDB = "database" ConfigKeyUser = "user" ConfigKeyPassword = "password" ConfigKeyMaxConn = "max_connection" ConfigKeySRID = "srid" ConfigKeyLayers = "layers" ConfigKeyLayerName = "name" ConfigKeyTablename = "tablename" ConfigKeySQL = "sql" ConfigKeyFields = "fields" ConfigKeyGeomField = "geometry_fieldname" ConfigKeyGeomIDField = "id_fieldname" )
const BBOX = "!BBOX!"
DEFAULT sql for get geometries,
const DefaultMaxConn = 5
const DefaultPort = 5432
const DefaultSRID = tegola.WebMercator
const Name = "postgis"
Variables ¶
This section is empty.
Functions ¶
func NewProvider ¶
NewProvider Setups and returns a new postgis provide or an error; if something is wrong. The function will validate that the config object looks good before trying to create a driver. This means that the Provider expects the following fields to exists in the provided map[string]interface{} map. host string — the host to connect to. port uint16 — the port to connect on. database string — the database name user string — the user name password string — the Password max_connections *uint8 // Default is 5 if nil, 0 means no max. layers map[string]struct{ — This is map of layers keyed by the layer name.
tablename string || sql string — This is the sql to use or the tablename to use with the default query. fields []string — This is a list, if this is nil or empty we will get all fields. geometry_fieldname string — This is the field name of the geometry, if it's an empty string or nil, it will defaults to 'geom'. id_fieldname string — This is the field name for the id property, if it's an empty string or nil, it will defaults to 'gid'. }
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider provides the postgis data provider.