Documentation
¶
Index ¶
- func AmbilDataGeojson(mongoenv, dbname, collname string) string
- func AmbilDataGeojsonToken(mongoenv, dbname, collname string, r *http.Request) string
- func CheckPasswordHash(password, hash string) bool
- func CreateNewProduct(mongoconn *mongo.Database, collection string, productdata Product) interface{}
- func CreateNewUserRole(mongoconn *mongo.Database, collection string, userdata User) interface{}
- func CreateUserAndAddedToeken(PASETOPRIVATEKEYENV string, mongoconn *mongo.Database, collection string, ...) interface{}
- func DeleteUser(mongoconn *mongo.Database, collection string, userdata User) interface{}
- func GCFCreateHandler(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFCreateHandlerTokenPaseto(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, ...) string
- func GCFCreatePostLineString(MONGOCONNSTRINGENV, dbname, collection string, r *http.Request) string
- func GCFCreatePostLineStringg(MONGOCONNSTRINGENV, dbname, collection string, r *http.Request) string
- func GCFCreateProduct(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFDeleteHandler(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFFindUserByID(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFFindUserByName(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFGetAllProduct(MONGOCONNSTRINGENV, dbname, collectionname string) string
- func GCFHandler(MONGOCONNSTRINGENV, dbname, collectionname string) string
- func GCFLoginTest(username, password, MONGOCONNSTRINGENV, dbname, collectionname string) bool
- func GCFPostHandler(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, ...) string
- func GCFReturnStruct(DataStuct any) string
- func GCFUpdateHandler(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GFCPostHandlerUser(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GeoIntersects(mongoconn *mongo.Database, long float64, lat float64) (namalokasi string)
- func HashPassword(password string) (string, error)
- func InsertDataUserGCF(Mongoenv, dbname string, r *http.Request) string
- func InsertOneDoc(db *mongo.Database, collection string, doc interface{}) (insertedID interface{})
- func InsertUserdata(MongoConn *mongo.Database, username, role, password string) (InsertedID interface{})
- func IsPasswordValid(mongoconn *mongo.Database, collection string, userdata User) bool
- func MemasukkanKoordinat(MongoConn *mongo.Database, colname string, coordinate []float64, ...) (InsertedID interface{})
- func MembuatGeojsonPoint(mongoenv, dbname, collname string, r *http.Request) string
- func MembuatGeojsonPointToken(mongoenv, dbname, collname string, r *http.Request) string
- func MembuatGeojsonPolygon(mongoenv, dbname, collname string, r *http.Request) string
- func MembuatGeojsonPolygonToken(mongoenv, dbname, collname string, r *http.Request) string
- func MembuatGeojsonPolyline(mongoenv, dbname, collname string, r *http.Request) string
- func MembuatGeojsonPolylineToken(mongoenv, dbname, collname string, r *http.Request) string
- func PostGeoIntersects(mongoenv, dbname string, r *http.Request) string
- func PostLinestring(mongoconn *mongo.Database, collection string, linestringdata GeoJsonLineString) interface{}
- func PostPoint(mongoconn *mongo.Database, collection string, pointdata GeoJsonPoint) interface{}
- func PostPolygon(mongoconn *mongo.Database, collection string, polygondata GeoJsonPolygon) interface{}
- func PostStructWithToken[T any](tokenkey string, tokenvalue string, structname interface{}, urltarget string) (result T, errormessage string)
- func ReplaceOneDoc(mongoconn *mongo.Database, collection string, filter bson.M, userdata User) interface{}
- func ReturnStruct(DataStuct any) string
- func SetConnection(mongoenv, dbname string) *mongo.Database
- func SetConnectionTest(mongoenv, dbname string) *mongo.Database
- type Coordinate
- type Credential
- type GeoJson
- type GeoJsonLineString
- type GeoJsonPoint
- type GeoJsonPolygon
- type Geometry
- type GeometryLineString
- type GeometryPoint
- type GeometryPolygon
- type Lokasi
- type LongLat
- type Name
- type Pesan
- type PostToken
- type Product
- type Properties
- type Response
- type Token
- type User
- func FindUser(mongoconn *mongo.Database, collection string, userdata User) User
- func FindUserUser(mongoconn *mongo.Database, collection string, userdata User) User
- func GetAllUser(mongoconn *mongo.Database, collection string) []User
- func GetNameAndPassowrd(mongoconn *mongo.Database, collection string) []User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AmbilDataGeojson ¶
func AmbilDataGeojsonToken ¶
func CheckPasswordHash ¶
func CreateNewProduct ¶
func CreateNewUserRole ¶
func DeleteUser ¶
func GCFCreateHandler ¶
func GCFCreatePostLineString ¶
func GCFCreateProduct ¶
func GCFDeleteHandler ¶
func GCFFindUserByID ¶
func GCFFindUserByName ¶
func GCFGetAllProduct ¶
product
func GCFHandler ¶
func GCFLoginTest ¶
func GCFPostHandler ¶
func GCFReturnStruct ¶
func GCFUpdateHandler ¶
func GFCPostHandlerUser ¶
func GeoIntersects ¶
func HashPassword ¶
func InsertOneDoc ¶
func InsertUserdata ¶
func IsPasswordValid ¶
func MemasukkanKoordinat ¶
func MembuatGeojsonPoint ¶
func MembuatGeojsonPolygon ¶
func MembuatGeojsonPolyline ¶
func PostLinestring ¶
func PostLinestring(mongoconn *mongo.Database, collection string, linestringdata GeoJsonLineString) interface{}
func PostPoint ¶
func PostPoint(mongoconn *mongo.Database, collection string, pointdata GeoJsonPoint) interface{}
func PostPolygon ¶
func PostPolygon(mongoconn *mongo.Database, collection string, polygondata GeoJsonPolygon) interface{}
func PostStructWithToken ¶
func ReplaceOneDoc ¶
func ReturnStruct ¶
func SetConnection ¶
func SetConnectionTest ¶
Types ¶
type Coordinate ¶
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 GeoJsonPoint ¶
type GeoJsonPoint struct { Type string `json:"type" bson:"type"` Properties Properties `json:"properties" bson:"properties"` Geometry GeometryPoint `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 Product ¶
type Product struct { 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 User ¶
type User struct { Username string `json:"username" bson:"username"` Password string `json:"password" bson:"password"` Role string `json:"role,omitempty" bson:"role,omitempty"` Token string `json:"token,omitempty" bson:"token,omitempty"` Private string `json:"private,omitempty" bson:"private,omitempty"` Publick string `json:"publick,omitempty" bson:"publick,omitempty"` }
func FindUserUser ¶
Click to show internal directories.
Click to hide internal directories.