Documentation
¶
Index ¶
- func CreateOTP() string
- func DeleteEmployee(Mongoenv, publickey, dbname, colname string, r *http.Request) string
- func DeleteEmployeeData(mongoconn *mongo.Database, colname, EmpId string) (deletedid interface{}, err error)
- func DeleteOTP(mcon *mongo.Database, colname, otp string) (deletedid *mongo.DeleteResult)
- func DeleteUser(Mongoconn *mongo.Database, colname, username string) (deleted interface{}, err error)
- func DeleteUserforAdmin(Mongoenv, publickey, dbname, colname string, r *http.Request) string
- func GetAllEmployee(PublicKey, Mongoenv, dbname, colname string, r *http.Request) string
- func GetCommitwithusername(MongoConn *mongo.Database, colname, username string) (dest []structure.Commits)
- func GetDataUserForAdmin(PublicKey, MongoEnv, dbname, colname string, r *http.Request) string
- func GetOneEmployee(PublicKey, MongoEnv, dbname string, r *http.Request) string
- func GetOtpExists(mongoconn *mongo.Database, colname, otp string) (exists bool)
- func GetSalaryAll(PublicKey, MongoEnv, dbname, colname string, r *http.Request) string
- func GetSalaryEmployee(PublicKey, MongoEnv, dbname, colname string, r *http.Request) string
- func GetWgebyMonth(MongoConn *mongo.Database, month, name string) bool
- func InsertDataEmployee(MongoConn *mongo.Database, colname string, emp Employee) (InsertedID interface{})
- func InsertEmployee(MongoEnv, dbname, colname, publickey string, r *http.Request) string
- func InsertOtp(MongoConn *mongo.Database, colname string, otp OTP) (InsertedID interface{})
- func InsertUserdata(MongoConn *mongo.Database, user Users) (InsertedID interface{})
- func InsertWageData(MongoConn *mongo.Database, wage WageCalc) (InsertedID interface{})
- func IsAdmin(Tokenstr, PublicKey string) bool
- func IsHR(TokenStr, Publickey string) bool
- func Login(Privatekey, MongoEnv, dbname, Colname string, r *http.Request) string
- func LoginAfterOTP(Privatekey, MongoEnv, dbname, Colname string, r *http.Request) string
- func LoginOTP(MongoEnv, dbname, Colname string, r *http.Request) string
- func MongoCreateConnection(MongoString, dbname string) *mongo.Database
- func RandStringBytes(n int) string
- func Register(Mongoenv, dbname string, r *http.Request) string
- func ResetPassword(MongoEnv, publickey, dbname, colname string, r *http.Request) string
- func UpdateDataEmployees(MongoEnv, dbname, publickey string, r *http.Request) string
- func UpdateEmployee(Mongoconn *mongo.Database, ctx context.Context, emp Employee) (UpdateId interface{}, err error)
- func UpdatePassword(mongoconn *mongo.Database, user pasproj.User) (Updatedid interface{})
- type Cred
- type Division
- type Employee
- type Logindata
- type OTP
- type OnlyOTP
- type ReqUsers
- type RequestEmployee
- type ResponseBack
- type ResponseEmployee
- type ResponseEmployeeBanyak
- type Responses
- type Salary
- type Updated
- type Users
- type WageCalc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteEmployee ¶ added in v0.1.1
Delete Data
func DeleteEmployeeData ¶ added in v0.1.1
func DeleteOTP ¶ added in v0.3.0
func DeleteOTP(mcon *mongo.Database, colname, otp string) (deletedid *mongo.DeleteResult)
func DeleteUser ¶ added in v0.0.15
func DeleteUserforAdmin ¶ added in v0.0.15
Delete User
func GetAllEmployee ¶ added in v0.1.0
GetAll
func GetCommitwithusername ¶ added in v0.3.9
func GetDataUserForAdmin ¶ added in v0.0.3
Get Data User
func GetOneEmployee ¶ added in v0.0.6
Get One
func GetOtpExists ¶ added in v0.3.0
func GetSalaryAll ¶ added in v0.4.2
func GetSalaryEmployee ¶ added in v0.3.9
func GetWgebyMonth ¶ added in v0.3.9
func InsertDataEmployee ¶ added in v0.0.6
func InsertEmployee ¶ added in v0.0.6
Insert data
func InsertUserdata ¶ added in v0.2.0
func InsertWageData ¶ added in v0.3.9
func LoginAfterOTP ¶ added in v0.3.0
func MongoCreateConnection ¶ added in v0.2.0
func RandStringBytes ¶ added in v0.2.0
func ResetPassword ¶ added in v0.0.16
Reset Password
func UpdateDataEmployees ¶ added in v0.0.6
Update data
func UpdateEmployee ¶ added in v0.0.6
Types ¶
type Employee ¶ added in v0.0.6
type Employee struct { EmployeeId string `json:"employeeid" bson:"employeeid,omitempty"` Name string `json:"name" bson:"name,omitempty"` Username string `json:"username" bson:"username"` Email string `json:"email" bson:"email,omitempty"` Phone string `json:"phone" bson:"phone,omitempty"` Division Division `json:"division" bson:"division,omitempty"` Salary Salary `json:"salary" bson:"salary"` }
func GetAllEmployeeData ¶ added in v0.1.0
type OTP ¶ added in v0.2.0
type OnlyOTP ¶ added in v0.3.0
type OnlyOTP struct {
OTPCode string `bson:"otp-code" json:"otp-code"`
}
type RequestEmployee ¶ added in v0.1.1
type RequestEmployee struct {
EmployeeId string `json:"employeeid"`
}
type ResponseBack ¶
type ResponseEmployee ¶ added in v0.0.6
type ResponseEmployeeBanyak ¶ added in v0.1.0
type Responses ¶ added in v0.2.0
type Responses struct {
Response string `bson:"response" json:"response"`
}
type Users ¶ added in v0.2.0
type WageCalc ¶ added in v0.3.8
type WageCalc struct { EmployeeName string `bson:"employeeName" json:"employeeName"` JumlahCommit float64 `bson:"jumlahCommit" json:"jumlahCommit"` BasicSalary float64 `bson:"basicSalary" json:"basicSalary"` HonorDivision float64 `bson:"honorDivision" json:"honorDivision"` InsentifCommits float64 `json:"insentifCommits" bson:"insentifCommits"` GrossSalary float64 `bson:"jumlahKotor" json:"jumlahKotor"` Tax float64 `json:"tax" bson:"tax"` NettSalary float64 `bson:"nettSalary" json:"nettSalary"` Month string `json:"month" bson:"month"` }
Click to show internal directories.
Click to hide internal directories.