gobd

package module
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash added in v0.0.4

func CheckPasswordHash(password, hash string) bool

func DeleteDataGeojson added in v0.0.5

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

func GCFDeleteDataGeojson added in v0.0.5

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

func GCFPostCoordinate added in v0.0.2

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

func GCFPostHandler added in v0.0.6

func GCFPostHandler(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFUpdateNameGeojson added in v0.0.5

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

func GCHandlerFunc added in v0.0.2

func GCHandlerFunc(Mongostring, dbname, colname string) string

func GetConnectionMongo added in v0.0.2

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

func HashPassword added in v0.0.4

func HashPassword(password string) (string, error)

func InsertDataLonlat added in v0.0.2

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

func InsertUser added in v0.0.4

func InsertUser(db *mongo.Database, collection string, userdata User) string

func IsPasswordValid added in v0.0.6

func IsPasswordValid(mongoconn *mongo.Database, collection string, userdata User) bool

func ReturnStringStruct

func ReturnStringStruct(Data any) string

func UpdateDataGeojson added in v0.0.5

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

Types

type Credential

type Credential struct {
	Status  bool   `json:"status" bson:"status"`
	Token   string `json:"token,omitempty" bson:"token,omitempty"`
	Message string `json:"message,omitempty" bson:"message,omitempty"`
}

type Credents added in v0.0.2

type Credents struct {
	Status  string `json:"status" bson:"status"`
	Token   string `json:"token,omitempty" bson:"token,omitempty"`
	Message string `json:"message" bson:"message"`
}

type GeoJson added in v0.0.2

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

func GetAllData added in v0.0.2

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

type GeoJsonLineString added in v0.0.2

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

type GeoJsonPolygon added in v0.0.2

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

type Geometry added in v0.0.2

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

type GeometryLineString added in v0.0.2

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

type GeometryPoint added in v0.0.2

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

type GeometryPolygon added in v0.0.2

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

type LonLatProperties added in v0.0.2

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 added in v0.0.2

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

type User

type User 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