Versions in this module Expand all Collapse all v1 v1.0.0 Feb 2, 2024 Changes in this version + func AmbilDataGeojson(mongoenv, dbname, collname string, r *http.Request) string + func AmbilSemuaUser(publickey, mongoenv, dbname, collname string, r *http.Request) string + func Authorization(publickey, mongoenv, dbname, collname string, r *http.Request) string + func Box(mconn *mongo.Database, collname string, coordinates Polyline) string + func Center(mconn *mongo.Database, collname string, coordinates Point) string + func CenterSphere(mconn *mongo.Database, collname string, coordinates Point) string + func CheckPasswordHash(password, hash string) bool + func Create2dsphere(mconn DBInfo) (db *mongo.Database) + func DecodeGetName(publickey string, tokenstring string) string + func DecodeGetRole(publickey string, tokenstring string) string + func DecodeGetUsername(publickey string, tokenstring string) string + func DeleteDoc(db *mongo.Database, collection string, filter bson.M) (result *mongo.DeleteResult) + func DeleteGeojson(mconn *mongo.Database, collname string, userdata User) interface + func DeleteOneDoc(db *mongo.Database, collection string, filter bson.M) (result *mongo.DeleteResult) + func DeleteUser(mconn *mongo.Database, collname string, userdata User) interface + func DocExists[T any](db *mongo.Database, collname string, filter bson.M, doc T) (result bool) + func EditUser(publickey, mongoenv, dbname, collname string, r *http.Request) string + func Encode(name, username, role, privatekey string) (string, error) + func GenerateKey() (privatekey, publickey string) + func GeoIntersects(mconn *mongo.Database, collname string, coordinates Point) string + func GeoWithin(mconn *mongo.Database, collname string, coordinates Polygon) string + func GetAllDistinctDoc(db *mongo.Database, filter bson.M, fieldname, collection string) (doc []any) + func GetAllDocByFilter[T any](db *mongo.Database, collection string, filter bson.M) (doc T) + func GetAllDoc[T any](db *mongo.Database, collection string) (doc T) + func GetBoxDoc(db *mongo.Database, collname string, coordinates Polyline) (result string) + func GetCenterDoc(db *mongo.Database, collname string, coordinates Point) (result string) + func GetCenterSphereDoc(db *mongo.Database, collname string, coordinates Point) (result string) + func GetGeoIntersectsDoc(db *mongo.Database, collname string, coordinates Point) (result string) + func GetGeoWithinDoc(db *mongo.Database, collname string, coordinates Polygon) (result string) + func GetNearDoc(db *mongo.Database, collname string, coordinates Point) (result string) + func GetNearSphereDoc(db *mongo.Database, collname string, coordinates Point) (result string) + func GetOneDoc[T any](db *mongo.Database, collection string, filter bson.M) (doc T) + func GetOneLatestDoc[T any](db *mongo.Database, collection string, filter bson.M) (doc T, err error) + func GetRandomDoc[T any](db *mongo.Database, collection string, size uint) (result []T, err error) + func HapusUser(publickey, mongoenv, dbname, collname string, r *http.Request) string + func HashPassword(password string) (string, error) + func InsertOneDoc(db *mongo.Database, collection string, doc interface{}) (insertedID interface{}) + func InsertUser(mongoenv *mongo.Database, collname string, datauser User) interface + func IsPasswordValid(mconn *mongo.Database, collname string, userdata User) bool + func Login(privatekey, mongoenv, dbname, collname string, r *http.Request) string + func MembuatGeojsonPoint(publickey, mongoenv, dbname, collname string, r *http.Request) string + func MembuatGeojsonPolygon(publickey, mongoenv, dbname, collname string, r *http.Request) string + func MembuatGeojsonPolyline(publickey, mongoenv, dbname, collname string, r *http.Request) string + func MongoConnect(mconn DBInfo) (db *mongo.Database) + func Near(mconn *mongo.Database, collname string, coordinates Point) string + func NearSphere(mconn *mongo.Database, collname string, coordinates Point) string + func PostBox(mongoenv, dbname, collname string, r *http.Request) string + func PostCenter(mongoenv, dbname, collname string, r *http.Request) string + func PostGeoIntersects(mongoenv, dbname, collname string, r *http.Request) string + func PostGeoWithin(mongoenv, dbname, collname string, r *http.Request) string + func PostLinestring(mconn *mongo.Database, collection string, linestringdata GeoJsonLineString) interface + func PostNear(mongoenv, dbname, collname string, r *http.Request) string + func PostNearSphere(mongoenv, dbname, collname string, r *http.Request) string + func PostPoint(mconn *mongo.Database, collection string, pointdata GeoJsonPoint) interface + func PostPolygon(mconn *mongo.Database, collection string, polygondata GeoJsonPolygon) interface + func Registrasi(publickey, mongoenv, dbname, collname string, r *http.Request) string + func ReplaceOneDoc(db *mongo.Database, collection string, filter bson.M, doc interface{}) (updatereseult *mongo.UpdateResult) + func ReturnStruct(DataStuct any) string + func SetConnection(mongoenv, dbname string) *mongo.Database + func SetConnection2dsphere(mongoenv, dbname, collname string) *mongo.Database + func UpdateUser(mconn *mongo.Database, collname string, datauser User) interface + func UsernameExists(mconn *mongo.Database, collname string, userdata User) bool + type CredentialUser struct + Data struct{ ... } + Message string + Status bool + type DBInfo struct + CollectionName string + DBName string + DBString string + type FullGeoJson struct + Geometry Geometry + ID primitive.ObjectID + Properties Properties + Type string + type GeoJson struct + Geometry Geometry + Properties Properties + Type string + func GetAllBangunan(mconn *mongo.Database, collname string) []GeoJson + type GeoJsonLineString struct + Geometry struct{ ... } + Properties Properties + Type string + type GeoJsonPoint struct + Geometry struct{ ... } + Properties Properties + Type string + type GeoJsonPolygon struct + Geometry struct{ ... } + Properties Properties + Type string + type Geometry struct + Coordinates interface{} + Type string + type LongLat struct + Latitude float64 + Longitude float64 + type Payload struct + Exp time.Time + Iat time.Time + Name string + Nbf time.Time + Role string + Username string + func Decode(publickey, tokenstr string) (payload Payload, err error) + type Pesan struct + Data interface{} + Message string + Status bool + Token string + type Point struct + Coordinates []float64 + Max int64 + Min int64 + Radius int64 + type Polygon struct + Coordinates [][][]float64 + type Polyline struct + Coordinates [][]float64 + type Properties struct + Name string + type User struct + Name string + Password string + Role string + Username string + func FindUser(mconn *mongo.Database, collname string, userdata User) User + func GetAllUser(mconn *mongo.Database, collname string) []User