model

package
v0.0.0-...-53c618d Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: MIT Imports: 13 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, host string, port string) *DB

NewDB instantiates the DB struct using the injected config

func (*DB) AddCollection

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

func (*DB) AllCollectionInfos

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

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, error)

func (*DB) GetFeatures

func (d *DB) GetFeatures(collectionName string, bbox *ogc.Bbox, filterAttrs map[string]string, limit int, dateStart *time.Time, dateEnd *time.Time) ([]*ogc.Feature, error)

GetFeatures get features

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) ([]string, error)

func (*DB) RemoveCollection

func (db *DB) RemoveCollection(collName string) (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