gcfbackend1214005

package module
v0.2.2 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

gcfbackend1214005

GeoGis NPM 1214005 Library Package

go get -u all
go mod tidy
git tag                                 #check current version
git tag v0.0.1                          #set tag version
git push origin --tags                  #push tag version to repo
go list -m github.com/raffzhm/gcfbackend1214005@v0.0.1   #publish to pkg dev, replace ORG/URL with your repo URL

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash added in v0.0.5

func CheckPasswordHash(password, hash string) bool

func DeleteDataGeojson added in v0.1.1

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

func GCFDelDataGeo added in v0.1.1

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

func GCFHandler added in v0.0.5

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

func GCFPostCoordinateLonLat added in v0.0.6

func GCFPostCoordinateLonLat(MONGOCONNSTRINGENV, Mongostring, dbname, collectionname string, r *http.Request) string

func GCFPostCoordinateLonLat2 added in v0.2.1

func GCFPostCoordinateLonLat2(MONGOCONNSTRINGENV, Mongostring, dbname, collectionname string, r *http.Request) string

func GCFPostHandler added in v0.0.5

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

func GCFReturnStruct added in v0.0.5

func GCFReturnStruct(DataStuct any) string

func GCFUpdateGeo added in v0.1.1

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

func HashPassword added in v0.0.5

func HashPassword(password string) (string, error)

func InsertDataLonlat

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

func InsertUserdata added in v0.0.8

func InsertUserdata(MongoConn *mongo.Database, username, password string) (InsertedID interface{})

func IsExist added in v0.1.2

func IsExist(Tokenstr, PublicKey string) bool

func IsPasswordValid added in v0.0.5

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

func SetConnection added in v0.0.5

func SetConnection(MONGOCONNSTRINGENV, dbname string) *mongo.Database

func SignInGCF added in v0.0.9

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

func SignUpGCF added in v0.0.8

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

func UpdateDataGeojson added in v0.1.1

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

Types

type CoorLonLatProperties

type CoorLonLatProperties 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 Credential added in v0.0.5

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 GeoJson

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

func GetAllBangunanLineString added in v0.0.5

func GetAllBangunanLineString(mongoconn *mongo.Database, collection 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 Properties

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

type RegistUser added in v0.1.0

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

type User added in v0.0.5

type User struct {
	Username string `json:"username" bson:"username"`
	Password string `json:"password" bson:"password"`
	Role     string `json:"role,omitempty" bson:"role,omitempty"`
}

Jump to

Keyboard shortcuts

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