be_manja

package
v0.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckLatitudeLongitude

func CheckLatitudeLongitude(db *mongo.Database, latitude, longitude string) bool

validate latitude longitude

func Decode

func Decode(publicKey string, tokenstring string) (payload model.Payload, err error)

func DeleteFishingspot added in v0.0.6

func DeleteFishingspot(_id primitive.ObjectID, col string, db *mongo.Database) error

func DeleteOneDoc

func DeleteOneDoc(_id primitive.ObjectID, db *mongo.Database, col string) error

func EditEmail

func EditEmail(idparam primitive.ObjectID, db *mongo.Database, insertedDoc model.User) (bson.M, error)

func EditPassword

func EditPassword(idparam primitive.ObjectID, db *mongo.Database, insertedDoc model.UpdatePassword) (bson.M, error)

func EditProfile

func EditProfile(idparam primitive.ObjectID, db *mongo.Database, r *http.Request) (bson.M, error)

update-userProfile

func Encode

func Encode(id primitive.ObjectID, email, privateKey string) (string, error)

func GCFReturnStruct

func GCFReturnStruct(DataStuct any) string

return struct

func GenerateKey

func GenerateKey() (privateKey, publicKey string)

func GetAllDocs

func GetAllDocs(db *mongo.Database, col string, docs interface{}) interface{}

crud

func GetAllFishingSpot

func GetAllFishingSpot(db *mongo.Database, col string) (docs []model.FishingSpot, err error)

func GetFishingSpotById

func GetFishingSpotById(db *mongo.Database, col string, idparam primitive.ObjectID) (doc model.FishingSpot, err error)

get-fishingSpot

func GetID

func GetID(r *http.Request) string

get id

func GetUserFromEmail

func GetUserFromEmail(email string, db *mongo.Database) (doc model.User, err error)

func GetUserFromID

func GetUserFromID(_id primitive.ObjectID, db *mongo.Database) (doc model.User, err error)

user get-user

func GetUserFromPhonenumber

func GetUserFromPhonenumber(phonenumber string, db *mongo.Database) (doc model.User, err error)

func GetUserLogin

func GetUserLogin(PASETOPUBLICKEYENV string, r *http.Request) (model.Payload, error)

get user login

func InsertOneDoc

func InsertOneDoc(db *mongo.Database, col string, doc interface{}) (insertedID primitive.ObjectID, err error)

func LogIn

func LogIn(db *mongo.Database, col string, insertedDoc model.User) (user model.User, err error)

user Sign In

func MongoConnect

func MongoConnect(MongoString, dbname string) *mongo.Database

mongo

func PostFishingSpot

func PostFishingSpot(db *mongo.Database, col string, r *http.Request) (bson.M, error)

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 SignUp

func SignUp(db *mongo.Database, col string, insertedDoc model.User) (string, error)

user Sign Up

func UpdateOneDoc

func UpdateOneDoc(id primitive.ObjectID, db *mongo.Database, col string, doc interface{}) (err error)

func ValidatePhoneNumber

func ValidatePhoneNumber(phoneNumber string) (bool, error)

validate phonenumber

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL