gis4backend

package module
v0.0.0-...-8c4eff2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: MIT Imports: 9 Imported by: 0

README

gis4backend

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteDatajson

func DeleteDatajson(MongoConn *mongo.Database, colname string, name string) (*mongo.DeleteResult, error)

func GCFDeleteDataGeojson

func GCFDeleteDataGeojson(Mongostring, dbname, colname string, r *http.Request) string

func GCFPostCoordinate

func GCFPostCoordinate(Mongostring, dbname, colname string, r *http.Request) string

func GCFUpdateNameGeojson

func GCFUpdateNameGeojson(Mongostring, dbname, colname string, r *http.Request) string

func GCHandlerFunc

func GCHandlerFunc(Mongostring, dbname, colname string) string

func GetConnectionMongo

func GetConnectionMongo(MongoString, dbname string) *mongo.Database

func InsertDatajson

func InsertDatajson(MongoConn *mongo.Database, colname string, coordinate []float64, name, volume, tipe string) (InsertedID interface{})

func ReturnStringStruct

func ReturnStringStruct(Data any) string

func UpdateDatajson

func UpdateDatajson(MongoConn *mongo.Database, colname, name, newVolume, newTipe string) error

Types

type Credents

type Credents struct {
	Status  string `json:"status" bson:"status"`
	Message string `json:"message" bson:"message"`
}

type GeoJson

type GeoJson struct {
	Type       string     `json:"type" bson:"type"`
	Properties Properties `json:"properties" bson:"properties"`
	Geometry   Geometry   `json:"geometry" bson:"geometry"`
}

func GetAllData

func GetAllData(MongoConnect *mongo.Database, colname string) []GeoJson

type GeoJsonLineString

type GeoJsonLineString struct {
	Type       string             `json:"type" bson:"type"`
	Properties Properties         `json:"properties" bson:"properties"`
	Geometry   GeometryLineString `json:"geometry" bson:"geometry"`
}

type GeoJsonPolygon

type GeoJsonPolygon struct {
	Type       string          `json:"type" bson:"type"`
	Properties Properties      `json:"properties" bson:"properties"`
	Geometry   GeometryPolygon `json:"geometry" bson:"geometry"`
}

type Geometry

type Geometry struct {
	Coordinates interface{} `json:"coordinates" bson:"coordinates"`
	Type        string      `json:"type" bson:"type"`
}

type GeometryLineString

type GeometryLineString struct {
	Coordinates [][]float64 `json:"coordinates" bson:"coordinates"`
	Type        string      `json:"type" bson:"type"`
}

type GeometryPoint

type GeometryPoint struct {
	Coordinates []float64 `json:"coordinates" bson:"coordinates"`
	Type        string    `json:"type" bson:"type"`
}

type GeometryPolygon

type GeometryPolygon struct {
	Coordinates [][][]float64 `json:"coordinates" bson:"coordinates"`
	Type        string        `json:"type" bson:"type"`
}

type LonLatProperties

type LonLatProperties struct {
	Type        string    `json:"type" bson:"type"`
	Name        string    `json:"name" bson:"name"`
	Volume      string    `json:"volume" bson:"volume"`
	Coordinates []float64 `json:"coordinates" bson:"coordinates"`
}

type Properties

type Properties struct {
	Name string `json:"name" bson:"name"`
}

Jump to

Keyboard shortcuts

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