Documentation ¶
Index ¶
- func CheckLatitudeLongitude(db *mongo.Database, latitude, longitude string) bool
- func Decode(publicKey string, tokenstring string) (payload model.Payload, err error)
- func DeleteFishingspot(_id primitive.ObjectID, col string, db *mongo.Database) error
- func DeleteOneDoc(_id primitive.ObjectID, db *mongo.Database, col string) error
- func EditEmail(idparam primitive.ObjectID, db *mongo.Database, insertedDoc model.User) (bson.M, error)
- func EditPassword(idparam primitive.ObjectID, db *mongo.Database, ...) (bson.M, error)
- func EditProfile(idparam primitive.ObjectID, db *mongo.Database, r *http.Request) (bson.M, error)
- func Encode(id primitive.ObjectID, email, privateKey string) (string, error)
- func GCFReturnStruct(DataStuct any) string
- func GenerateKey() (privateKey, publicKey string)
- func GetAllDocs(db *mongo.Database, col string, docs interface{}) interface{}
- func GetAllFishingSpot(db *mongo.Database, col string) (docs []model.FishingSpot, err error)
- func GetFishingSpotById(db *mongo.Database, col string, idparam primitive.ObjectID) (doc model.FishingSpot, err error)
- func GetID(r *http.Request) string
- func GetUserFromEmail(email string, db *mongo.Database) (doc model.User, err error)
- func GetUserFromID(_id primitive.ObjectID, db *mongo.Database) (doc model.User, err error)
- func GetUserFromPhonenumber(phonenumber string, db *mongo.Database) (doc model.User, err error)
- func GetUserLogin(PASETOPUBLICKEYENV string, r *http.Request) (model.Payload, error)
- func InsertOneDoc(db *mongo.Database, col string, doc interface{}) (insertedID primitive.ObjectID, err error)
- func LogIn(db *mongo.Database, col string, insertedDoc model.User) (user model.User, err error)
- func MongoConnect(MongoString, dbname string) *mongo.Database
- func PostFishingSpot(db *mongo.Database, col string, r *http.Request) (bson.M, error)
- func PutFishingSpot(_id primitive.ObjectID, db *mongo.Database, col string, r *http.Request) (bson.M, error)
- func SignUp(db *mongo.Database, col string, insertedDoc model.User) (string, error)
- func UpdateOneDoc(id primitive.ObjectID, db *mongo.Database, col string, doc interface{}) (err error)
- func ValidatePhoneNumber(phoneNumber string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckLatitudeLongitude ¶
validate latitude longitude
func DeleteFishingspot ¶ added in v0.0.6
func EditPassword ¶
func EditProfile ¶
update-userProfile
func GenerateKey ¶
func GenerateKey() (privateKey, publicKey string)
func GetAllDocs ¶
crud
func GetAllFishingSpot ¶
func GetFishingSpotById ¶
func GetFishingSpotById(db *mongo.Database, col string, idparam primitive.ObjectID) (doc model.FishingSpot, err error)
get-fishingSpot
func GetUserFromEmail ¶
func GetUserFromID ¶
user get-user
func GetUserFromPhonenumber ¶
func GetUserLogin ¶
get user login
func InsertOneDoc ¶
func PostFishingSpot ¶
Fishing Spot post-fishingSpot
func PutFishingSpot ¶
func PutFishingSpot(_id primitive.ObjectID, db *mongo.Database, col string, r *http.Request) (bson.M, error)
put-fishingSpot
func UpdateOneDoc ¶
func ValidatePhoneNumber ¶
validate phonenumber
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.