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, username, 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 GetOneReport(PublicKey, MongoEnv, dbname, colname string, r *http.Request) string
- func HashPassword(password string) (string, error)
- func InsertDataReport(MongoConn *mongo.Database, colname string, rpt Report) (InsertedID interface{}, err error)
- func InsertOneDoc(db *mongo.Database, collection string, doc interface{}) (insertedID interface{})
- func InsertReport(MongoEnv, dbname, colname, PublicKey string, r *http.Request) string
- 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 CompareNipp ¶ added in v0.0.51
func DecodeGetRole ¶ added in v0.0.51
func DecodeGetRoleandUser ¶ added in v0.0.51
func DecodeGetUser ¶ added in v0.0.51
func DeleteReport ¶ added in v0.0.44
func DeleteReportData ¶ added in v0.0.56
func DeleteUser ¶ added in v0.0.38
func DeleteUserforAdmin ¶ added in v0.0.51
func EncodeWithRole ¶ added in v0.0.51
func GCFReturnStruct ¶
func GetAllReport ¶ added in v0.0.56
func GetDataUserForAdmin ¶ added in v0.0.51
func GetOneReport ¶ added in v0.0.56
func HashPassword ¶
func InsertDataReport ¶ added in v0.0.53
func InsertOneDoc ¶ added in v0.0.51
func InsertReport ¶ added in v0.0.56
func InsertUserdata ¶ added in v0.0.51
func PasswordValidator ¶ added in v0.0.51
func ResetPassword ¶ added in v0.0.51
func SetConnection ¶
func TokenEncoder ¶ added in v0.0.51
func UpdatePassword ¶ added in v0.0.51
Types ¶
type Area ¶ added in v0.0.53
type Credential ¶
type Location ¶ added in v0.0.58
type Payload ¶ added in v0.0.38
type Report ¶ added in v0.0.44
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"` }
func GetAllReportData ¶ added in v0.0.56
type RequestReport ¶ added in v0.0.53
type RequestReport struct {
Reportid string `json:"reportid"`
}
type Response ¶ added in v0.0.38
type Response struct {
Token string `json:"token,omitempty" bson:"token,omitempty"`
}
type ResponseBack ¶ added in v0.0.53
type ResponseDataUser ¶ added in v0.0.51
type ResponseEncode ¶ added in v0.0.51
type ResponseReport ¶ added in v0.0.53
type ResponseReportBanyak ¶ added in v0.0.53
type TypeDangerousActions ¶ added in v0.0.53
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"` }
func GetAllUser ¶ added in v0.0.51
Click to show internal directories.
Click to hide internal directories.