Documentation
¶
Index ¶
- func AuthenticateUserAndGenerateToken(privateKeyEnv string, MONGOCONNSTRINGENV *mongo.Database, collection string, ...) (string, error)
- func CheckPasswordHash(password, hash string) bool
- func Create2dsphere(mconn models.DBInfo2) (MONGOCONNSTRINGENV *mongo.Database)
- func CreateComment(MONGOCONNSTRINGENV *mongo.Database, collection string, commentdata Comment) interface{}
- func CreateContent(t *testing.T)
- func CreateNewBlog(MONGOCONNSTRINGENV *mongo.Database, collection string, blogdata Blog) interface{}
- func CreateNewContent(MONGOCONNSTRINGENV *mongo.Database, collection string, contentdata Content) interface{}
- func CreateNewProduct(MONGOCONNSTRINGENV *mongo.Database, collection string, productdata Product) interface{}
- func CreateNewUserRole(MONGOCONNSTRINGENV *mongo.Database, collection string, userdata User) interface{}
- func CreatetGeojsonPoint(publickey, MONGOCONNSTRINGENV, dbname, collname string, r *http.Request) string
- func DecodeGetRole(publickey string, tokenstring string) string
- func DecodeGetUsername(publickey string, tokenstring string) string
- func DeleteComment(MONGOCONNSTRINGENV *mongo.Database, collection string, commentdata Comment) interface{}
- func DeleteContent(MONGOCONNSTRINGENV *mongo.Database, collection string, contentdata Content) interface{}
- func DeleteGeojson(mMONGOCONNSTRINGENV *mongo.Database, collname string, userdata User) interface{}
- func DeleteLinestring(MONGOCONNSTRINGENV *mongo.Database, collection string, ...) interface{}
- func DeleteOneDoc(MONGOCONNSTRINGENV *mongo.Database, collection string, filter bson.M) (result *mongo.DeleteResult)
- func DeleteUser(MONGOCONNSTRINGENV *mongo.Database, collection string, userdata User) interface{}
- func Encode(username, role, privatekey string) (string, error)
- func GCFCreateLineStringgg(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFCreatePolygone(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFCreatePolygonee(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFCreatePostLineString(MONGOCONNSTRINGENV, dbname, collection string, r *http.Request) string
- func GCFCreatePostLineStringg(MONGOCONNSTRINGENV, dbname, collection string, r *http.Request) string
- func GCFCreteCommnet(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFDeleteLineString(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFDeletedCommnet(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFGetAllComment(MONGOCONNSTRINGENV, dbname, collectionname string) string
- func GCFHandler(MONGOCONNSTRINGENV, dbname, collectionname string) string
- func GCFLoginAfterCreatee(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFLoginAfterCreateee(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFLoginAfterCreateeee(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFReturnStruct(DataStuct any) string
- func GCFUpdateLinestring(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFlineStingCreate(MONGOCONNSTRINGENV, dbname, collection string, r *http.Request) string
- func GCFlineStingCreatea(MONGOCONNSTRINGENV, dbname, collection string, r *http.Request) string
- func GFCUpadatedCommnet(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GenerateKey() (privatekey, publickey string)
- func GeojsonNameString(geojson []FullGeoJson) (result string)
- func GetAllDoc[T any](MONGOCONNSTRINGENV *mongo.Database, collection string) (doc T)
- func GetBoxDoc[T any](MONGOCONNSTRINGENV *mongo.Database, collname, locfield string, ...) (result []T, err error)
- func GetCenterDoc[T any](MONGOCONNSTRINGENV *mongo.Database, collname, locfield string, ...) (result []T, err error)
- func GetCenterSphereDoc[T any](MONGOCONNSTRINGENV *mongo.Database, collname, locfield string, ...) (result []T, err error)
- func GetGeoIntersectsDoc[T any](MONGOCONNSTRINGENV *mongo.Database, collname string, locfield string, ...) (result []T, err error)
- func GetGeoWithinDoc[T any](MONGOCONNSTRINGENV *mongo.Database, collname, locfield string, ...) (result []T, err error)
- func GetNearDoc[T any](MONGOCONNSTRINGENV *mongo.Database, collname, locfield string, ...) (result []T, err error)
- func GetNearSphereDoc[T any](MONGOCONNSTRINGENV *mongo.Database, collname, locfield string, ...) (result []T, err error)
- func HashPassword(password string) (string, error)
- func InsertOneDoc(db *mongo.Database, collection string, doc interface{}) (insertedID interface{})
- func InsertUserdata(MONGOCONNSTRINGENV *mongo.Database, username, role, password string) (InsertedID interface{})
- func IsAuthorized(username string, mconn *mongo.Client, collectionname string) bool
- func IsPasswordValid(MONGOCONNSTRINGENV *mongo.Database, collection string, userdata User) bool
- func LoginHandler(token, privatekey, MONGOCONNSTRINGENV, dbname, collname string, ...) string
- func MembuatGeojsonPolygon(publickey, MONGOCONNSTRINGENV, dbname, collname string, r *http.Request) string
- func MembuatGeojsonPolyline(publickey, MONGOCONNSTRINGENV, dbname, collname string, r *http.Request) string
- func Otorisasi(publickey, MONGOCONNSTRINGENV, dbname, collname string, r *http.Request) string
- func PostBox(publickey, MONGOCONNSTRINGENV, dbname, collname string, r *http.Request) string
- func PostCenter(publickey, MONGOCONNSTRINGENV, dbname, collname string, r *http.Request) string
- func PostCenterSphere(publickey, MONGOCONNSTRINGENV, dbname, collname string, r *http.Request) string
- func PostGeoIntersects(publickey, MONGOCONNSTRINGENV, dbname, collname string, r *http.Request) string
- func PostGeoWithin(publickey, MONGOCONNSTRINGENV, dbname, collname string, r *http.Request) string
- func PostLineString(MONGOCONNSTRINGENV *mongo.Database, collection string, ...) interface{}
- func PostLinestring(MONGOCONNSTRINGENV *mongo.Database, collection string, ...) interface{}
- func PostLinestring1(MONGOCONNSTRINGENV *mongo.Database, collection string, ...) interface{}
- func PostNear(publickey, MONGOCONNSTRINGENV, dbname, collname string, r *http.Request) string
- func PostNearSphere(publickey, MONGOCONNSTRINGENV, dbname, collname string, r *http.Request) string
- func PostPoint(MONGOCONNSTRINGENV *mongo.Database, collection string, pointdata GeoJsonPoint) interface{}
- func PostPolygon(MONGOCONNSTRINGENV *mongo.Database, collection string, ...) interface{}
- func PostPolygone(MONGOCONNSTRINGENV *mongo.Database, collection string, ...) interface{}
- func ReplaceContent(MONGOCONNSTRINGENV *mongo.Database, collection string, filter bson.M, ...) interface{}
- func ReplaceOneDoc(MONGOCONNSTRINGENV *mongo.Database, collection string, filter bson.M, ...) interface{}
- func SetConnection(MONGOCONNSTRINGENVSTRINGENV, dbname string) *mongo.Database
- func SetConnection2dsphere(MONGOCONNSTRINGENV, dbname, collname string) *mongo.Database
- func TestAllProduct(t *testing.T)
- func TestCreateNewUserRole(t *testing.T)
- func TestDeleteUser(t *testing.T)
- func TestGFCPostHandlerUser(t *testing.T)
- func TestGeneratePasswordHash(t *testing.T)
- func TestGeneratePrivateKeyPaseto(t *testing.T)
- func TestHashFunction(t *testing.T)
- func TestIsPasswordValid(t *testing.T)
- func TestProduct(t *testing.T)
- func UpdatedComment(MONGOCONNSTRINGENV *mongo.Database, collection string, filter bson.M, ...) interface{}
- func UpdatedLinestring(MONGOCONNSTRINGENV *mongo.Database, collection string, filter bson.M, ...) interface{}
- type About
- type BeriPesan
- type Blog
- type Category
- type Comment
- type Contack
- type Content
- type Credential
- type DBInfo2
- type Event
- type EventGlobal
- type FullGeoJson
- func Box(MONGOCONNSTRINGENV *mongo.Database, collname string, geospatial Geospatial) ([]FullGeoJson, error)
- func Center(MONGOCONNSTRINGENV *mongo.Database, collname string, geospatial Geospatial) ([]FullGeoJson, error)
- func CenterSphere(MONGOCONNSTRINGENV *mongo.Database, collname string, geospatial Geospatial) ([]FullGeoJson, error)
- func GeoIntersects(MONGOCONNSTRINGENV *mongo.Database, collname string, geospatial Geospatial) ([]FullGeoJson, error)
- func GeoWithin(MONGOCONNSTRINGENV *mongo.Database, collname string, geospatial Geospatial) ([]FullGeoJson, error)
- func Near(MONGOCONNSTRINGENV *mongo.Database, collname string, geospatial Geospatial) ([]FullGeoJson, error)
- func NearSphere(MONGOCONNSTRINGENV *mongo.Database, collname string, geospatial Geospatial) ([]FullGeoJson, error)
- type Gallery
- type GeoJson
- type GeoJsonLineString
- type GeoJsonPoint
- type GeoJsonPolygon
- type Geometry
- type GeometryLineString
- type GeometryPoint
- type GeometryPolygon
- type Geospatial
- type Iklan
- type Payload
- type Point
- type Polygon
- type Polyline
- type Product
- type Properties
- type Response
- type Share
- type Tags
- type User
- func FindUser(MONGOCONNSTRINGENV *mongo.Database, collection string, userdata User) User
- func FindUserByUsername(MONGOCONNSTRINGENV *mongo.Database, collection string, username string) (User, error)
- func FindUserUser(MONGOCONNSTRINGENV *mongo.Database, collection string, userdata User) User
- func GetAllUser(MONGOCONNSTRINGENV *mongo.Database, collection string) []User
- func GetNameAndPassowrd(MONGOCONNSTRINGENV *mongo.Database, collection string) []User
- type Userkredensial
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
func Create2dsphere ¶ added in v1.0.7
func CreateComment ¶
func CreateContent ¶
func CreateNewBlog ¶
func CreateNewContent ¶
func CreateNewContent(MONGOCONNSTRINGENV *mongo.Database, collection string, contentdata Content) interface{}
content
func CreateNewProduct ¶
func CreateNewUserRole ¶
func CreateNewUserRole(MONGOCONNSTRINGENV *mongo.Database, collection string, userdata User) interface{}
func GetAllUser(MONGOCONNSTRINGENV *mongo.Database, collection string) []User {
user := atdb.GetAllDoc[[]User](MONGOCONNSTRINGENV, collection)
return user
}
func CreatetGeojsonPoint ¶ added in v1.0.7
func DecodeGetRole ¶ added in v1.0.7
func DecodeGetUsername ¶ added in v1.0.7
func DeleteComment ¶
func DeleteContent ¶
func DeleteGeojson ¶ added in v1.0.7
func DeleteLinestring ¶
func DeleteLinestring(MONGOCONNSTRINGENV *mongo.Database, collection string, linestringdata GeoJsonLineString) interface{}
func DeleteOneDoc ¶ added in v1.0.7
func DeleteUser ¶
func GCFCreateLineStringgg ¶
func GCFCreatePolygone ¶
func GCFCreatePolygonee ¶
func GCFCreatePostLineString ¶
func GCFCreteCommnet ¶
func GCFDeleteLineString ¶
func GCFDeletedCommnet ¶
func GCFGetAllComment ¶
func GCFHandler ¶
func GCFLoginAfterCreatee ¶
func GCFLoginAfterCreateee ¶
func GCFLoginAfterCreateeee ¶
func GCFReturnStruct ¶
func GCFUpdateLinestring ¶
func GCFlineStingCreate ¶
func GCFlineStingCreatea ¶
func GFCUpadatedCommnet ¶
func GenerateKey ¶ added in v1.0.7
func GenerateKey() (privatekey, publickey string)
func GeojsonNameString ¶ added in v1.1.4
func GeojsonNameString(geojson []FullGeoJson) (result string)
func GetCenterDoc ¶ added in v1.0.7
func GetCenterSphereDoc ¶ added in v1.0.7
func GetGeoIntersectsDoc ¶ added in v1.0.7
func GetGeoWithinDoc ¶ added in v1.0.7
func GetNearDoc ¶ added in v1.0.7
func GetNearSphereDoc ¶ added in v1.0.7
func HashPassword ¶
func InsertOneDoc ¶
func InsertUserdata ¶
func IsAuthorized ¶
func IsPasswordValid ¶
func LoginHandler ¶ added in v1.0.7
func MembuatGeojsonPolygon ¶ added in v1.0.7
func MembuatGeojsonPolyline ¶ added in v1.0.7
func PostCenter ¶ added in v1.0.7
func PostCenterSphere ¶ added in v1.0.7
func PostGeoIntersects ¶ added in v1.0.7
func PostGeoWithin ¶ added in v1.0.7
func PostLineString ¶
func PostLineString(MONGOCONNSTRINGENV *mongo.Database, collection string, commentdata GeoJsonLineString) interface{}
func PostLinestring ¶
func PostLinestring(MONGOCONNSTRINGENV *mongo.Database, collection string, linestringdata GeoJsonLineString) interface{}
func PostLinestring1 ¶ added in v1.0.7
func PostLinestring1(MONGOCONNSTRINGENV *mongo.Database, collection string, linestringdata GeoJsonLineString) interface{}
func PostNearSphere ¶ added in v1.0.7
func PostPoint ¶
func PostPoint(MONGOCONNSTRINGENV *mongo.Database, collection string, pointdata GeoJsonPoint) interface{}
func PostPolygon ¶ added in v1.0.7
func PostPolygon(MONGOCONNSTRINGENV *mongo.Database, collection string, polygondata GeoJsonPolygon) interface{}
func PostPolygone ¶
func PostPolygone(MONGOCONNSTRINGENV *mongo.Database, collection string, polygonedata GeoJsonPolygon) interface{}
func ReplaceContent ¶
func ReplaceOneDoc ¶
func SetConnection ¶
func SetConnection2dsphere ¶ added in v1.0.7
func TestAllProduct ¶
func TestCreateNewUserRole ¶
func TestDeleteUser ¶
func TestGFCPostHandlerUser ¶
func TestHashFunction ¶
func TestIsPasswordValid ¶
func TestProduct ¶
func UpdatedComment ¶
func UpdatedLinestring ¶
Types ¶
type Blog ¶
type Blog struct {
ID int `json:"id" bson:"id"`
Title string `json:"title" bson:"title"`
Tanggal string `json:"tanggal" bson:"tanggal"`
Description string `json:"judul" bson:"judul"`
Content []Content `json:"content" bson:"content"`
}
func GetAllBlogAll ¶
type Comment ¶
type Content ¶
type Content struct {
ID int `json:"id" bson:"id" `
Content string `json:"content" bson:"content"`
Image string `json:"image" bson:"image"`
Description string `json:"description" bson:"description"`
}
func FindContentAllId ¶
type Credential ¶
type Event ¶
type Event struct {
ID int `json:"id" bson:"id"`
Title string `json:"title" bson:"title"`
Description string `json:"description" bson:"description"`
Tanggal string `json:"tanggal" bson:"tanggal"`
Image string `json:"image" bson:"image"`
Harga int `json:"harga" bson:"harga"`
LinkYoutube string `json:"linkyoutube" bson:"linkyoutube"`
}
type EventGlobal ¶
type FullGeoJson ¶ added in v1.0.7
type FullGeoJson struct {
ID primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
Type string `json:"type" bson:"type"`
Properties Properties `json:"properties" bson:"properties"`
Geometry Geometry `json:"geometry" bson:"geometry"`
}
func Box ¶
func Box(MONGOCONNSTRINGENV *mongo.Database, collname string, geospatial Geospatial) ([]FullGeoJson, error)
func Center ¶
func Center(MONGOCONNSTRINGENV *mongo.Database, collname string, geospatial Geospatial) ([]FullGeoJson, error)
func CenterSphere ¶ added in v1.0.7
func CenterSphere(MONGOCONNSTRINGENV *mongo.Database, collname string, geospatial Geospatial) ([]FullGeoJson, error)
func GeoIntersects ¶
func GeoIntersects(MONGOCONNSTRINGENV *mongo.Database, collname string, geospatial Geospatial) ([]FullGeoJson, error)
func GeoWithin ¶
func GeoWithin(MONGOCONNSTRINGENV *mongo.Database, collname string, geospatial Geospatial) ([]FullGeoJson, error)
func Near ¶
func Near(MONGOCONNSTRINGENV *mongo.Database, collname string, geospatial Geospatial) ([]FullGeoJson, error)
func NearSphere ¶
func NearSphere(MONGOCONNSTRINGENV *mongo.Database, collname string, geospatial Geospatial) ([]FullGeoJson, error)
type GeoJson ¶
type GeoJson struct {
Type string `json:"type" bson:"type"`
Properties Properties `json:"properties" bson:"properties"`
Geometry Geometry `json:"geometry" bson:"geometry"`
}
func AmbilDataGeojson ¶ added in v1.0.7
func GetAllBangunan ¶ added in v1.0.7
type GeoJsonLineString ¶
type GeoJsonLineString struct {
Type string `json:"type" bson:"type"`
Properties Properties `json:"properties" bson:"properties"`
Geometry struct {
Coordinates [][]float64 `json:"coordinates" bson:"coordinates"`
Type string `json:"type" bson:"type"`
} `json:"geometry" bson:"geometry"`
}
func FindNearestRoad ¶
func FindNearestRoad(mconn *mongo.Database, collectionname string, coordinates []float64) GeoJsonLineString
func FindRoute ¶
func FindRoute(mconn *mongo.Database, collectionname string, startGeometry, endGeometry GeometryLineString) []GeoJsonLineString
Fungsi untuk mencari jalur dari jalan awal ke jalan akhir Fungsi untuk mencari jalur dari jalan awal ke jalan akhir
func GetByCoordinate ¶
func GetByCoordinate(MONGOCONNSTRINGENV *mongo.Database, collection string, linestringdata GeoJsonLineString) GeoJsonLineString
type GeoJsonPoint ¶ added in v1.0.7
type GeoJsonPoint struct {
Type string `json:"type" bson:"type"`
Properties Properties `json:"properties" bson:"properties"`
Geometry struct {
Coordinates []float64 `json:"coordinates" bson:"coordinates"`
Type string `json:"type" bson:"type"`
} `json:"geometry" bson:"geometry"`
}
type GeoJsonPolygon ¶
type GeoJsonPolygon struct {
Type string `json:"type" bson:"type"`
Properties Properties `json:"properties" bson:"properties"`
Geometry struct {
Coordinates [][][]float64 `json:"coordinates" bson:"coordinates"`
Type string `json:"type,omitempty" bson:"type,omitempty"`
} `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 Geospatial ¶ added in v1.1.4
type Geospatial struct {
Type string `json:"type" bson:"type"`
Coordinates interface{} `json:"coordinates" bson:"coordinates"`
Max float64 `json:"max,omitempty" bson:"max,omitempty"`
Min float64 `json:"min,omitempty" bson:"min,omitempty"`
Radius float64 `json:"radius,omitempty" bson:"radius,omitempty"`
}
type Payload ¶ added in v1.0.7
type Polygon ¶
type Polygon struct {
Coordinates [][][]float64 `json:"coordinates" bson:"coordinates"`
}
type Polyline ¶ added in v1.0.7
type Polyline struct {
Coordinates [][]float64 `json:"coordinates" bson:"coordinates"`
}
type Product ¶
type Product struct {
ID primitive.ObjectID `bson:"_id,omitempty" `
Nomorid int `json:"nomorid" bson:"nomorid"`
Name string `json:"name" bson:"name"`
Description string `json:"description" bson:"description"`
Price int `json:"price" bson:"price"`
Stock int `json:"stock" bson:"stock"`
Size string `json:"size" bson:"size"`
Image string `json:"image" bson:"image"`
}
type Properties ¶
type Properties struct {
Name string `json:"name" bson:"name"`
}
type Response ¶
type Response struct {
Status bool `json:"status" bson:"status"`
Message string `json:"message" bson:"message"`
Data interface{} `json:"data" bson:"data"`
}
func CreateResponse ¶
type User ¶
type User struct {
No_whatsapp string `json:"no_whatsapp,omitempty" bson:"no_whatsapp"`
Username string `json:"username" bson:"username"`
Password string `json:"password,omitempty" bson:"password"`
Role string `json:"role,omitempty" bson:"role,omitempty"`
}
func FindUserByUsername ¶
func FindUserUser ¶
type Userkredensial ¶ added in v1.0.7
Source Files
¶
Click to show internal directories.
Click to hide internal directories.