modul

package
v0.2.828 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Responsed model.Credential
	Response  model.TodoResponse
)

Functions

func ChangePassword added in v0.1.5

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

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

func DeleteTodo added in v0.2.5

func DeleteTodo(db *mongo.Database, col string, _id primitive.ObjectID) (status bool, err error)

func DeleteUser added in v0.1.5

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

func GCFHandlerChangePassword added in v0.1.5

func GCFHandlerChangePassword(PASETOPUBLICKEY, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFHandlerDeleteTodo added in v0.2.5

func GCFHandlerDeleteTodo(PASETOPUBLICKEY, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFHandlerDeleteUser added in v0.1.5

func GCFHandlerDeleteUser(PASETOPUBLICKEY, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFHandlerGetAllUser added in v0.2.6

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

user

func GCFHandlerGetTodo added in v0.2.5

func GCFHandlerGetTodo(PASETOPUBLICKEY, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFHandlerGetTodoListByUser added in v0.2.81

func GCFHandlerGetTodoListByUser(PASETOPUBLICKEY, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFHandlerGetUserByUsername added in v0.2.7

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

func GCFHandlerInsertTodo added in v0.2.5

func GCFHandlerInsertTodo(PASETOPUBLICKEY, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) 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(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFHandlerUpdateTodo added in v0.2.5

func GCFHandlerUpdateTodo(PASETOPUBLICKEY, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFHandlerUpdateUser added in v0.1.6

func GCFHandlerUpdateUser(PASETOPUBLICKEY, MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string

func GCFReturnStruct

func GCFReturnStruct(DataStuct any) string

func GenerateUID added in v0.2.809

func GenerateUID(len int) (string, error)

func GetAllUser

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

func GetTodoFromID

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

func GetTodoFromToken added in v0.2.827

func GetTodoFromToken(db *mongo.Database, col string, uid string) (todo []model.Todo, err error)

func GetTodoFromUsername added in v0.2.8

func GetTodoFromUsername(db *mongo.Database, col string, username string) (todo []model.Todo, err error)

func GetTodoList

func GetTodoList(db *mongo.Database, col string) (todo []model.Todo, err error)

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, todoDoc model.Todo, uid string) (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(MONGOCONNSTRINGENV, dbname string) *mongo.Database

func Register added in v0.0.9

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

func UpdateTodo added in v0.2.5

func UpdateTodo(db *mongo.Database, col string, todo model.Todo) (todos model.Todo, status bool, err error)

func UpdateUser added in v0.1.6

func UpdateUser(db *mongo.Database, col string, userdata model.User) (user model.User, status bool, 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