modul

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 13 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, collectionname string) string

func GCFPostHandler

func GCFPostHandler(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 GetTicketFromID

func GetTicketFromID(db *mongo.Database, col string, id primitive.ObjectID) (ticket model.Ticket)

func GetTicketList

func GetTicketList(db *mongo.Database, col string) (ticketlist model.TicketList)

func GetUserFromUsername

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

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 InsertTicket

func InsertTicket(db *mongo.Database, col string, ticket model.Ticket) (insertedID primitive.ObjectID, err error)

ticket

func InsertUser

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

user

func IsPasswordValid

func IsPasswordValid(mongoconn *mongo.Database, collection string, userdata model.User) bool

func SetConnection

func SetConnection(MONGOCONNSTRINGENV, dbname string) *mongo.Database

Types

This section is empty.

Jump to

Keyboard shortcuts

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