Documentation ¶
Index ¶
- func CheckPasswordHash(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 DeleteReport(Mongoenv, publickey, dbname, colname string, r *http.Request) string
- func DeleteReportData(mongoconn *mongo.Database, colname, Repid string) (deletedid interface{}, err error)
- func DeleteUser(Mongoconn *mongo.Database, colname, nipp string) (deleted interface{}, err error)
- func DeleteUserforAdmin(Mongoenv, publickey, dbname, colname string, r *http.Request) string
- func EncodeWithRole(role, nipp, privatekey string) (string, error)
- func GCFReturnStruct(DataStuct any) string
- func GetAllReport(PublicKey, Mongoenv, dbname, colname string, r *http.Request) string
- func GetDataUserForAdmin(PublicKey, MongoEnv, dbname, colname string, r *http.Request) string
- func GetDataUserForAdmin2(PublicKey, MongoEnv, dbname, colname string, r *http.Request) string
- func GetOneReport(PublicKey, MongoEnv, dbname, colname string, r *http.Request) string
- func HashPassword(password string) (string, error)
- func InsertDataReport(Publickey, MongoEnv, dbname, colname string, r *http.Request) string
- func InsertOneDoc(db *mongo.Database, collection string, doc interface{}) (insertedID interface{})
- func InsertReport(MongoConn *mongo.Database, colname string, rpt Report) (InsertedID interface{})
- func InsertUserdata(MongoConn *mongo.Database, ...) (InsertedID interface{})
- func IsAdmin(Tokenstr, PublicKey string) bool
- func IsUser(TokenStr, Publickey string) bool
- func Login(Privatekey, MongoEnv, dbname, Colname string, r *http.Request) string
- func PasswordValidator(MongoConn *mongo.Database, colname string, userdata User) bool
- func Register(Mongoenv, dbname string, r *http.Request) string
- func ResetPassword(MongoEnv, publickey, dbname, colname string, r *http.Request) string
- func SetConnection(MongoString, dbname string) *mongo.Database
- func TokenEncoder(username, privatekey string) string
- func UpdatePassword(mongoconn *mongo.Database, user User) (Updatedid interface{})
- func UpdateReport(Mongoconn *mongo.Database, ctx context.Context, emp Report) (UpdateId interface{}, err error)
- type Area
- type Cred
- type Credential
- type Location
- type Payload
- type Report
- type ReqUsers
- type RequestReport
- type Response
- type ResponseBack
- type ResponseDataUser
- type ResponseEncode
- type ResponseReport
- type ResponseReportBanyak
- type TypeDangerousActions
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
func DecodeGetRole ¶
func DecodeGetRoleandUser ¶
func DecodeGetUser ¶
func DeleteReport ¶
func DeleteReportData ¶
func DeleteUser ¶
func DeleteUserforAdmin ¶
func EncodeWithRole ¶
func GCFReturnStruct ¶
func GetAllReport ¶
func GetDataUserForAdmin ¶
func GetDataUserForAdmin2 ¶ added in v1.0.3
func GetOneReport ¶
func HashPassword ¶
func InsertDataReport ¶
func InsertOneDoc ¶
func InsertReport ¶
func InsertUserdata ¶
func PasswordValidator ¶
func ResetPassword ¶
func SetConnection ¶
func TokenEncoder ¶
func UpdatePassword ¶
Types ¶
type Area ¶
type Credential ¶
type Location ¶
type Payload ¶
type Report ¶
type Report struct { Reportid string `json:"reportid" bson:"reportid"` Date string `json:"date" bson:"date"` User User `json:"user" bson:"user,omitempty"` Location Location `json:"location" bson:"location"` Description string `json:"description" bson:"description"` ObservationPhoto string `json:"observationPhoto" bson:"observationPhoto"` TypeDangerousActions []TypeDangerousActions `json:"typeDangerousActions" bson:"typeDangerousActions,omitempty"` Area Area `json:"area" bson:"area"` ImmediateAction string `json:"immediateAction" bson:"immediateAction"` ImprovementPhoto string `json:"improvementPhoto" bson:"improvementPhoto"` CorrectiveAction string `json:"correctiveAction" bson:"correctiveAction"` }
type RequestReport ¶
type RequestReport struct {
Reportid string `json:"reportid"`
}
type Response ¶
type Response struct {
Token string `json:"token,omitempty" bson:"token,omitempty"`
}
type ResponseBack ¶
type ResponseDataUser ¶
type ResponseEncode ¶
type ResponseReport ¶
type ResponseReportBanyak ¶
type TypeDangerousActions ¶
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.