modul

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

func GCFHandler

func GCFHandler(MONGOCONNSTRINGENV, dbname, col string, username string) string

func GCFHandlerLogIn added in v0.0.9

func GCFHandlerLogIn(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFHandlerRegister added in v0.0.9

func GCFHandlerRegister(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFReturnStruct

func GCFReturnStruct(DataStuct any) string

func GetAllDocs

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

func GetAllUser

func GetAllUser(db *mongo.Database, col string) (userlist []model.User)

func GetTodoFromID

func GetTodoFromID(db *mongo.Database, col string, id primitive.ObjectID) (todo model.Todo)

func GetTodoList

func GetTodoList(db *mongo.Database, col string) (todolist model.TodoList)

func GetUserFromEmail added in v0.0.9

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

func GetUserFromID added in v0.0.9

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

func GetUserFromUsername

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

func HashPassword

func HashPassword(password string) (string, error)

func InsertOneDoc

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

func InsertTodo

func InsertTodo(db *mongo.Database, col string, todo model.Todo) (insertedID primitive.ObjectID, err error)

todo

func LogIn added in v0.0.9

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

func MongoConnect added in v0.0.9

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

func Register added in v0.0.9

func Register(db *mongo.Database, col string, userdata model.User) error

validasi

Types

This section is empty.

Jump to

Keyboard shortcuts

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