Documentation
¶
Index ¶
- func Box(mongoconn *mongo.Database, long1 float64, lat1 float64, long2 float64, ...) (namalokasi string)
- func Center(mongoconn *mongo.Database, long float64, lat float64, radius float64) (namalokasi string)
- func CenterSphere(mongoconn *mongo.Database, long float64, lat float64, radius float64) (namalokasi string)
- func DeleteDoc(db *mongo.Database, collection string, filter bson.M) (result *mongo.DeleteResult)
- func DeleteOneDoc(db *mongo.Database, collection string, filter bson.M) (result *mongo.DeleteResult)
- func GeoIntersects(mongoconn *mongo.Database, long float64, lat float64) (namalokasi string)
- func GeoWithin(mongoconn *mongo.Database, coordinates [][][]float64) (namalokasi string)
- func GeometryFix(mongoconn *mongo.Database, coordinates [][][]float64) (namalokasi string)
- func GetAllDistinctDoc(db *mongo.Database, filter bson.M, fieldname, collection string) (doc []any)
- func GetAllDoc[T any](db *mongo.Database, collection string) (doc T)
- 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 InsertOneDoc(db *mongo.Database, collection string, doc interface{}) (insertedID interface{})
- func Json(DataStuct any) string
- func MaxDistance(mongoconn *mongo.Database, long float64, lat float64, maxdistance float64) (namalokasi string)
- func MinDistance(mongoconn *mongo.Database, long float64, lat float64, mindistance float64) (namalokasi string)
- func Near(mongoconn *mongo.Database, long float64, lat float64) (namalokasi string)
- func NearSpehere(mongoconn *mongo.Database, long float64, lat float64) (namalokasi string)
- func Polygon(mongoconn *mongo.Database, coordinates [][][]float64) (namalokasi string)
- func PostGeoIntersects(mongoenv, dbname string, r *http.Request) string
- func PostGeoWithin(mongoenv, dbname string, r *http.Request) string
- func PostNear(mongoenv, dbname 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(mongostring, dbname string) *mongo.Database
- func SetConnection2dsphereTest(mongoenv, dbname string) *mongo.Database
- func SetConnection2dsphereTestGeo(mongoenv, dbname string) *mongo.Database
- func SetConnection2dsphereTestPoint(mongoenv, dbname string) *mongo.Database
- type Credential
- type GeoBorder
- type GeoJson
- type GeoJsonLineString
- type GeoJsonPolygon
- type Geometry
- type GeometryLineString
- type GeometryPoint
- type GeometryPolygon
- type Geometryy
- type LocationData
- type Lokasi
- type Lokasii
- type LongLat
- type Name
- type Namee
- type Pesan
- type Properties
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CenterSphere ¶
func DeleteOneDoc ¶
func GeoIntersects ¶
func GeometryFix ¶
func GetAllDistinctDoc ¶
func GetOneLatestDoc ¶
func GetRandomDoc ¶
func InsertOneDoc ¶
func MaxDistance ¶
func MinDistance ¶
func NearSpehere ¶
func ReplaceOneDoc ¶
func ReturnStruct ¶
func SetConnection ¶
Types ¶
type Credential ¶
type GeoJson ¶
type GeoJson struct { Type string `json:"type" bson:"type"` Properties Properties `json:"properties" bson:"properties"` Geometry Geometry `json:"geometry" bson:"geometry"` }
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 GeometryPoint ¶
type GeometryPolygon ¶
type LocationData ¶
type Properties ¶
type Properties struct {
Name string `json:"name" bson:"name"`
}
Click to show internal directories.
Click to hide internal directories.