modul

package
v0.3.233 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Responsed model.Credential
	Response  model.TodoResponse
	Response2 model.TodoClearResponse
	Response3 model.LogTodoResponse
)

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 CheckCategory added in v0.3.22

func CheckCategory(db *mongo.Database, col string, category string) (bool, 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) (bool, error)

func DeleteUser added in v0.1.5

func DeleteUser(db *mongo.Database, col string, userdata model.User) (bool, 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 GCFHandlerGetAllTodoList added in v0.2.909

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

todo

func GCFHandlerGetAllUser added in v0.2.6

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

for admin user

func GCFHandlerGetCategory added in v0.3.22

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

func GCFHandlerGetIsDone added in v0.3.22

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

func GCFHandlerGetLogTodo added in v0.3.22

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

log for user

func GCFHandlerGetLogTodoList added in v0.3.22

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

log todo not used yet

func GCFHandlerGetTodo added in v0.2.5

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

func GCFHandlerGetTodoByCategory added in v0.3.22

func GCFHandlerGetTodoByCategory(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

todo

func GCFHandlerGetUserByID added in v0.2.903

func GCFHandlerGetUserByID(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

for user user not used yet

func GCFHandlerGetUserFromToken added in v0.2.903

func GCFHandlerGetUserFromToken(PASETOPUBLICKEY, 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 GCFHandlerIsDone added in v0.3.22

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

isDone

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)

user

func GetCategory added in v0.3.22

func GetCategory(db *mongo.Database, col string) (category []model.Categories, err error)

func GetLogAllUser added in v0.3.22

func GetLogAllUser(db *mongo.Database, col string) (log []model.LogUser, err error)

not used yet

func GetLogTodoFromUID added in v0.3.22

func GetLogTodoFromUID(db *mongo.Database, col, userid string) (log []model.LogTodo, err error)

func GetLogTodoList added in v0.3.22

func GetLogTodoList(db *mongo.Database, col string) (log []model.LogTodo, err error)

get log

func GetLogUserFromUID added in v0.3.22

func GetLogUserFromUID(db *mongo.Database, col, userid string) (log []model.LogUser, err error)

not used yet

func GetTodoDone added in v0.3.22

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

func GetTodoFromCategory added in v0.3.22

func GetTodoFromCategory(db *mongo.Database, col string, category string) (todo []model.Todo, 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 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 GetUserFromRole added in v0.3.22

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

admin

func GetUserFromToken added in v0.2.903

func GetUserFromToken(db *mongo.Database, col string, uid string) (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 InsertCategory added in v0.3.22

func InsertCategory(db *mongo.Database, col string, categoryDoc model.Categories) (insertedID primitive.ObjectID, err error)

category

func InsertOneDoc

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

func InsertTodo

func InsertTodo(db *mongo.Database, col, uid string, r *http.Request) (todo model.Todo, 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 LogTodo added in v0.3.22

func LogTodo(db *mongo.Database, col string, todoID primitive.ObjectID, originalTodo model.Todo, updatedTodo model.Todo) error

log

func LogUser added in v0.3.22

func LogUser(db *mongo.Database, col string, id primitive.ObjectID, originalUser model.User, updatedUser model.User) 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 SaveFileToGithub added in v0.3.22

func SaveFileToGithub(usernameGhp, emailGhp, repoGhp, path string, r *http.Request) (string, error)

func SendWhatsAppConfirmation added in v0.3.22

func SendWhatsAppConfirmation(message, phonenumber string) error

func TodoClear added in v0.3.22

func TodoClear(db *mongo.Database, col string, done model.TodoClear) (bool, error)

isDone

func UpdateTodo added in v0.2.5

func UpdateTodo(db *mongo.Database, col string, _id primitive.ObjectID, r *http.Request) (model.Todo, bool, error)

update todo with log

func UpdateUser added in v0.1.6

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

update user with log

func ValidatePhoneNumber added in v0.3.22

func ValidatePhoneNumber(phoneNumber string) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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