Documentation ¶
Index ¶
- func CompareHashPass(password, hash string) bool
- func CompareUsername(MongoConn *mongo.Database, Colname, username string) bool
- func DecodeGetRole(PublicKey, tokenStr string) (pay string, err error)
- func DecodeGetRoleandUser(PublicKey, tokenStr string) (pay string, use string)
- func DecodeGetUser(PublicKey, tokenStr string) (pay string, err error)
- func EncodeWithRole(role, username, privatekey string) (string, error)
- func GCFPasetoTokenStr(PrivateKey, MongoEnv, dbname, collectionname string, r *http.Request) string
- func HashPass(password string) (string, error)
- func HashPasswordGCF(r *http.Request) string
- func InsertOneDoc(db *mongo.Database, collection string, doc interface{}) (insertedID interface{})
- func InsertReportData(conn *mongo.Database, colname string, report *Report) error
- func InsertUserdata(MongoConn *mongo.Database, username, role, password string) (InsertedID interface{})
- func MasukkanDataUserGCF(Mongoenv, dbname string, r *http.Request) string
- func MongoCreateConnection(MongoString, dbname string) *mongo.Database
- func PasswordValidator(MongoConn *mongo.Database, colname string, userdata User) bool
- func RetrieveDataUserGCF(PublicKey, MongoEnv, dbname, colname string, r *http.Request) string
- func ReturnStringStruct(Data any) string
- func TokenEncoder(username, privatekey string) string
- type Credential
- type Payload
- type Report
- type Response
- type ResponseDataUser
- type ResponseEncode
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareHashPass ¶
func CompareUsername ¶
func DecodeGetRole ¶
func DecodeGetRoleandUser ¶
func DecodeGetUser ¶
func EncodeWithRole ¶
func GCFPasetoTokenStr ¶
func HashPasswordGCF ¶
func InsertOneDoc ¶
func InsertReportData ¶ added in v0.0.3
func InsertUserdata ¶
func MasukkanDataUserGCF ¶
func MongoCreateConnection ¶
func PasswordValidator ¶
func RetrieveDataUserGCF ¶
func ReturnStringStruct ¶
func TokenEncoder ¶
Types ¶
type Credential ¶
type Payload ¶
type Response ¶
type Response struct {
Token string `json:"token,omitempty" bson:"token,omitempty"`
}
type ResponseDataUser ¶
type ResponseEncode ¶
Click to show internal directories.
Click to hide internal directories.