Documentation
¶
Index ¶
- func AuthenticateUserAndGenerateToken(privateKeyEnv string, mongoconn *mongo.Database, collection string, ...) (string, error)
- func CheckPasswordHash(password, hash string) bool
- func CreateLogin(mongoconn *mongo.Database, collection string, userdata User) interface{}
- func CreateNewUserRole(mongoconn *mongo.Database, collection string, userdata User) interface{}
- func CreateUser(mongoconn *mongo.Database, collection string, userdata User) interface{}
- func CreateUserAndAddToken(privateKeyEnv string, mongoconn *mongo.Database, collection string, ...) error
- func CreateUserAndAddedToeken(PASETOPRIVATEKEYENV string, mongoconn *mongo.Database, collection string, ...) interface{}
- func DeleteUser(mongoconn *mongo.Database, collection string, userdata User) interface{}
- func GCFCreateAccountAndToken(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, ...) string
- 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 GCFCreateTokenAndSaveToDB(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, ...) (string, error)
- func GCFCreteRegister(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 GCFHandler(MONGOCONNSTRINGENV, dbname, collectionname string) string
- func GCFLoginAfterCreate(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) 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 GCFLoginAfterCreater(MONGOCONNSTRINGENV, dbname, collectionname, privateKeyEnv string, ...) (string, error)
- 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 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 PostLineString(mongoconn *mongo.Database, collection string, commentdata GeoJsonLineString) interface{}
- func PostLinestring(mongoconn *mongo.Database, collection string, linestringdata GeoJsonLineString) interface{}
- 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 Properties
- type Response
- type User
- func FindUser(mongoconn *mongo.Database, collection string, userdata User) User
- func FindUserByUsername(mongoconn *mongo.Database, collection string, username string) (User, error)
- 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 AuthenticateUserAndGenerateToken ¶ added in v1.0.9
func CheckPasswordHash ¶
func CreateLogin ¶ added in v1.0.9
create login using Private
func CreateNewUserRole ¶ added in v1.0.8
func GetAllUser(mongoconn *mongo.Database, collection string) []User { user := atdb.GetAllDoc[[]User](mongoconn, collection) return user }
func CreateUser ¶ added in v1.0.9
func CreateUserAndAddToken ¶ added in v1.0.9
func CreateUserAndAddedToeken ¶ added in v1.0.8
func DeleteUser ¶ added in v1.0.8
func GCFCreateAccountAndToken ¶ added in v1.0.9
func GCFCreateHandler ¶ added in v1.0.8
func GCFCreateHandlerTokenPaseto ¶ added in v1.0.8
func GCFCreatePostLineString ¶ added in v1.0.8
func GCFCreatePostLineStringg ¶ added in v1.0.8
func GCFCreateTokenAndSaveToDB ¶ added in v1.0.9
func GCFCreteRegister ¶ added in v1.0.9
func GCFDeleteHandler ¶ added in v1.0.8
func GCFFindUserByID ¶ added in v1.0.8
func GCFFindUserByName ¶ added in v1.0.8
func GCFHandler ¶
func GCFLoginAfterCreate ¶ added in v1.0.9
func GCFLoginAfterCreatee ¶ added in v1.0.9
func GCFLoginAfterCreateee ¶ added in v1.0.9
func GCFLoginAfterCreateeee ¶ added in v1.0.9
func GCFLoginAfterCreater ¶ added in v1.0.9
func GCFLoginTest ¶ added in v1.0.8
func GCFPostHandler ¶
func GCFReturnStruct ¶
func GCFUpdateHandler ¶ added in v1.0.8
func GFCPostHandlerUser ¶ added in v1.0.8
func HashPassword ¶
func InsertDataUserGCF ¶ added in v1.0.8
func InsertOneDoc ¶ added in v1.0.8
func InsertUserdata ¶ added in v1.0.8
func IsPasswordValid ¶
func PostLineString ¶ added in v1.0.9
func PostLineString(mongoconn *mongo.Database, collection string, commentdata GeoJsonLineString) interface{}
func PostLinestring ¶ added in v1.0.8
func PostLinestring(mongoconn *mongo.Database, collection string, linestringdata GeoJsonLineString) interface{}
func ReplaceOneDoc ¶ added in v1.0.8
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"` }
func GetByCoordinate ¶ added in v1.0.8
func GetByCoordinate(mongoconn *mongo.Database, collection string, linestringdata GeoJsonLineString) GeoJsonLineString
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 Properties ¶
type Properties struct {
Name string `json:"name" bson:"name"`
}
type Response ¶ added in v1.0.8
type Response struct { Status bool `json:"status" bson:"status"` Message string `json:"message" bson:"message"` Data interface{} `json:"data" bson:"data"` }
func CreateResponse ¶ added in v1.0.9
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 FindUserByUsername ¶ added in v1.0.9
func FindUserUser ¶ added in v1.0.8
func GetAllUser ¶ added in v1.0.8
Click to show internal directories.
Click to hide internal directories.