Documentation ¶
Index ¶
- 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 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 HashPassword(password string) (string, error)
- func IsPasswordValid(mongoconn *mongo.Database, collection string, userdata User) bool
- func ReplaceOneDoc(mongoconn *mongo.Database, collection string, filter bson.M, userdata User) interface{}
- func SetConnection(MONGOCONNSTRINGENV, dbname string) *mongo.Database
- type Credential
- type GeoJson
- type GeoJsonLineString
- type GeoJsonPolygon
- type Geometry
- type GeometryLineString
- type GeometryPoint
- type GeometryPolygon
- type Product
- type Properties
- type Response
- 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 CheckPasswordHash ¶
func CreateNewProduct ¶
func CreateNewUserRole ¶
func DeleteUser ¶
func GCFCreateHandler ¶
func GCFCreateProduct ¶
func GCFDeleteHandler ¶
func GCFFindUserByID ¶
func GCFFindUserByName ¶
func GCFGetAllProduct ¶
product
func GCFHandler ¶
func GCFLoginTest ¶
func GCFPostHandler ¶
func GCFReturnStruct ¶
func GCFUpdateHandler ¶
func GFCPostHandlerUser ¶
func HashPassword ¶
func IsPasswordValid ¶
func ReplaceOneDoc ¶
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 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.