module

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMenuHandler added in v0.1.2

func AddMenuHandler(s *module.MenuService) http.HandlerFunc

AddMenuHandler handles adding a new menu

func ArchiveMenuHandler added in v0.1.2

func ArchiveMenuHandler(s *module.MenuService) http.HandlerFunc

ArchiveMenuHandler handles moving a menu to the archive

func ChatPredict added in v0.1.2

func ChatPredict(w http.ResponseWriter, r *http.Request)

func ChatPredictRegex added in v0.1.2

func ChatPredictRegex(w http.ResponseWriter, r *http.Request)

func Decode

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

func Decode1 added in v0.1.3

func Decode1(secret, token string) (model.Payload, error)

func Encode

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

func Encode1 added in v0.1.3

func Encode1(id, role, secret string) (string, error)

func ForgotPassword added in v0.1.2

func ForgotPassword(db *mongo.Database, request model.ForgotPasswordRequest) error

<--- Forgot Password ---> GCFHandlerForgotPassword handles forgot password requests

func GCFHandlerForgotPassword added in v0.1.2

func GCFHandlerForgotPassword(MONGOSTRING, dbname string, r *http.Request) string

GCFHandlerForgotPassword handles the forgot password request

func GCFHandlerSignIn added in v0.1.2

func GCFHandlerSignIn(PASETOPRIVATEKEYENV, MONGOSTRING, dbname string, r *http.Request) string

<--- Login --->

func GCFHandlerSignUp added in v0.1.2

func GCFHandlerSignUp(MONGOSTRING, dbname string, r *http.Request) string

GCFHandlerSignUpPengguna handles signup for Google Cloud Function

func GCFHandlerSignUp2 added in v0.1.2

func GCFHandlerSignUp2(MONGOSTRING, dbname string, r *http.Request) string

GCFHandlerSignUpPengguna handles signup for Google Cloud Function

func GCFReturnStruct added in v0.1.2

func GCFReturnStruct(DataStuct any) string

return struct

func GenerateKey added in v0.1.2

func GenerateKey() (privateKey, publicKey string)

func GetUserFromEmail added in v0.0.8

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

get user from email

func GetUserLogin added in v0.0.8

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

get user login

func HomeGaysdisal added in v0.0.8

func HomeGaysdisal(w http.ResponseWriter, r *http.Request)
func Menu(collection *mongo.Collection) *model.MenuService

Newmodel.MenuService returns a new model.MenuService

func NotFound added in v0.0.8

func NotFound(respw http.ResponseWriter, req *http.Request)

NotFound handles 404 errors

func RenameMenuHandler added in v0.1.2

func RenameMenuHandler(s *module.MenuService) http.HandlerFunc

/ RenameMenuHandler handles renaming a menu

func SignIn added in v0.1.2

func SignIn(db *mongo.Database, insertedDoc model.User) (user model.User, err error)

func SignUp added in v0.1.2

func SignUp(db *mongo.Database, insertedDoc model.Pengguna) error

signup

func SignUp2 added in v0.1.2

func SignUp2(db *mongo.Database, insertedDoc model.Pengguna) error

SignUp handles the logic for signing up a user

Types

This section is empty.

Jump to

Keyboard shortcuts

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