backendgcp

package module
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: MIT Imports: 12 Imported by: 0

README

backendgcp

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteDataGeojson added in v0.0.7

func DeleteDataGeojson(Mongoenv, dbname string, ctx context.Context, val LonLatProperties) (DeletedId interface{})

func GCFDeleteDataGeojson added in v0.0.7

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

func GCFPostCoordinate

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

func GCFUpdateNameGeojson added in v0.0.7

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

func GCHandlerFunc

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

func GetConnectionMongo

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

func InsertDataGeojson added in v0.0.5

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

func IsExist added in v0.0.9

func IsExist(Tokenstr, PublicKey string) bool

func Login added in v0.0.9

func Login(Privatekey, MongoEnv, dbname, Colname string, r *http.Request) string

func ReturnStringStruct

func ReturnStringStruct(Data any) string

func UpdateDataGeojson added in v0.0.8

func UpdateDataGeojson(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

func GetCoordinateNear added in v0.0.10

func GetCoordinateNear(MongoConn *mongo.Database, colname string, coordinate []float64) (result []GeoJson, err error)

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"`
}

type RegisterStruct added in v0.0.9

type RegisterStruct struct {
	Username string `json:"username" bson:"username"`
	Password string `json:"password" bson:"password"`
}

Jump to

Keyboard shortcuts

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