Documentation
¶
Index ¶
- func CheckPasswordHash(password, hash string) bool
- func CompareHashPass(password, hash string) bool
- func CompareNipp(MongoConn *mongo.Database, Colname, nipp 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 GCFReturnStruct(DataStuct any) string
- func HashPassword(password string) (string, error)
- func InsertOneDoc(db *mongo.Database, collection string, doc interface{}) (insertedID interface{})
- func InsertUserdata(MongoConn *mongo.Database, ...) (InsertedID interface{})
- func PasswordValidator(MongoConn *mongo.Database, colname string, userdata User) bool
- func Register(Mongoenv, dbname string, r *http.Request) string
- func SetConnection(MONGOCONNSTRINGENV, dbname string) *mongo.Database
- func TokenEncoder(username, privatekey string) string
- type Cred
- type Credential
- type Payload
- type Properties
- type Report
- type ReqUsers
- type Response
- type ResponseDataUser
- type ResponseEncode
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
func CompareHashPass ¶
func DecodeGetRole ¶
func DecodeGetRoleandUser ¶
func DecodeGetUser ¶
func EncodeWithRole ¶
func GCFReturnStruct ¶
func HashPassword ¶
func InsertOneDoc ¶
func InsertUserdata ¶
func PasswordValidator ¶
func SetConnection ¶
func TokenEncoder ¶
Types ¶
type Credential ¶
type Payload ¶
type Properties ¶
type Properties struct {
Name string `json:"name" bson:"name"`
}
type Report ¶
type Report struct {
ID primitive.ObjectID `bson:"_id,omitempty" `
Reportid string `json:"reportid" bson:"reportid"`
Date string `json:"date" bson:"date"`
Supervisorid int `json:"supervisorid" bson:"supervisorid"`
SupervisorName string `json:"supervisorname" bson:"supervisorname"`
SupervisorPosition string `json:"supervisorposition" bson:"supervisorposition"`
IncidentLocation string `json:"incidentlocation" bson:"incidentlocation"`
Description string `json:"description" bson:"description"`
ObservationPhoto string `json:"observationphoto" bson:"observationphoto"`
PeopleReactions string `json:"peoplereactions" bson:"peoplereactions"`
PPE string `json:"ppe" bson:"ppe"`
PersonPosition string `json:"personposition" bson:"personposition"`
Equipment string `json:"equipment" bson:"equipment"`
WorkProcedure string `json:"workprocedure" bson:"workprocedure"`
Area string `json:"area" bson:"area"`
ImmediateAction string `json:"immediateaction" bson:"immediateaction"`
ImprovementPhoto string `json:"improvementphoto" bson:"improvementphoto"`
CorrectiveAction string `json:"correctiveaction" bson:"correctiveaction"`
}
type Response ¶
type Response struct {
Token string `json:"token,omitempty" bson:"token,omitempty"`
}
type ResponseDataUser ¶
type ResponseEncode ¶
type User ¶
type User struct {
Nipp string `json:"nipp" bson:"nipp"`
Nama string `json:"nama" bson:"nama"`
Jabatan string `json:"jabatan" bson:"jabatan"`
Divisi string `json:"divisi" bson:"divisi"`
Bidang string `json:"bidang" bson:"bidang"`
Password string `json:"password" bson:"password"`
Role string `json:"role,omitempty" bson:"role,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.