model

package
v0.0.0-...-a110408 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CollectionInfoDB

type CollectionInfoDB struct {
	CollectionInfo *ogc.CollectionInfo
	// contains filtered or unexported fields
}

type DB

type DB struct {
	// contains filtered or unexported fields
}

DB holds the DB connection

func NewDB

func NewDB(dbname, user, pass string, sslMode bool) *DB

NewDB instantiates the DB struct using the injected config

func (*DB) AddCollection

func (db *DB) AddCollection(coll *CollectionInfoDB) error

func (*DB) AllCollectionInfos

func (db *DB) AllCollectionInfos() []*CollectionInfoDB

func (*DB) CreateCollectionTable

func (d *DB) CreateCollectionTable(collectionName string, features []*ogc.Feature) error

creates a feature table based

func (*DB) DeleteItem

func (d *DB) DeleteItem(collectionId string, itemId string) error

Delete a feature

func (*DB) FindCollection

func (db *DB) FindCollection(collName string) *CollectionInfoDB

func (*DB) GetFeatures

func (d *DB) GetFeatures(request ogc.GetFeatureRequest) ([]*ogc.Feature, error)

gets features based on query

func (*DB) GetItem

func (d *DB) GetItem(collectionId string, itemId string) (*ogc.FeatureCollection, error)

Get Item by Id

func (*DB) InsertFeature

func (d *DB) InsertFeature(collectionName string, features []*ogc.Feature) (bool, error)

func (*DB) Start

func (d *DB) Start() error

Start makes the db connection active

func (*DB) Stop

func (d *DB) Stop(err error)

Stop tears down the db instance

Jump to

Keyboard shortcuts

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