module

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MongoString string = os.Getenv("MONGOSTRING")

Functions

func DeleteDocsByID

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

func Encode

func Encode(id string, privateKey string) (string, error)

func GCFPostHandler

func GCFPostHandler(PASETOPRIVATEKEYENV, collectionname string, r *http.Request) string

func GCFPostHandlerSignUp

func GCFPostHandlerSignUp(collectionname string, r *http.Request) string

func GCFReturnStruct

func GCFReturnStruct(DataStuct any) string

func GenerateKey

func GenerateKey() (privateKey, publicKey string)

func GetAllDocs

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

func GetLowonganFromID

func GetLowonganFromID(_id primitive.ObjectID) (doc model.Lowongan, err error)

func GetUserFromEmail

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

func GetUserFromID

func GetUserFromID(_id primitive.ObjectID) (doc model.User, err error)

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) (email string, err error)

func MongoConnect

func MongoConnect() *mongo.Database

func SignUp

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

func UpdateOneDoc

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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