Documentation
¶
Index ¶
- func AmbilSemuaUser(publickeykatalogfilm, mongoenvkatalogfilm, dbname, collname string, ...) string
- func Authorization(publickeykatalogfilm, mongoenvkatalogfilm, dbname, collname string, ...) string
- func CheckPasswordHash(password, hash string) bool
- func DecodeGetName(publickey string, tokenstring string) string
- func DecodeGetNomor(publickey string, tokenstring string) string
- func DecodeGetRole(publickey string, tokenstring string) string
- func DecodeGetUsername(publickey string, tokenstring string) string
- func DeleteProductOnlineCourse(mconn *mongo.Database, collname string, data ProductOnlineCourse) interface{}
- func DeleteUser(mconn *mongo.Database, collname string, userdata User) interface{}
- func EditProductOnlineCourse(mconn *mongo.Database, collname string, data ProductOnlineCourse) interface{}
- func EditUser(mconn *mongo.Database, collname string, datauser User) interface{}
- func Encode(name, username, role, nomor, privatekey string) (string, error)
- func ForgotPassword(mconn *mongo.Database, collname string, userdata User) interface{}
- func GenerateKey() (privatekey, publickey string)
- func GenerateRandomNumber() string
- func HapusUser(publickeykatalogfilm, mongoenvkatalogfilm, dbname, collname string, ...) string
- func HashPassword(password string) (string, error)
- func HashPasswordd(password string) (string, error)
- func InsertProductOnlineCourse(mconn *mongo.Database, collname string, data ProductOnlineCourse) interface{}
- func InsertUser(mconn *mongo.Database, collname string, datauser User) interface{}
- func IsPasswordValid(mconn *mongo.Database, collname string, userdata User) bool
- func Login(privatekeykatalogfilm, mongoenvkatalogfilm, dbname, collname string, ...) string
- func Registrasi(mongoenvkatalogfilm, dbname, collname string, r *http.Request) string
- func ReturnStruct(DataStuct any) string
- func SetConnection(mongoenvkatalogfilm, dbname string) *mongo.Database
- func UnHashPassowrd(password string) string
- func UpdatePassword(publickeykatalogfilm, mongoenvkatalogfilm, dbname, collname string, ...) string
- func UpdateUser(mongoenvkatalogfilm, dbname, collname string, r *http.Request) string
- func UsernameExists(mongoenvkatalogfilm, dbname string, userdata User) bool
- type CredentialUser
- type Payload
- type Pesan
- type ProductOnlineCourse
- type Response
- type User
- type UserNew
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AmbilSemuaUser ¶
func Authorization ¶
func CheckPasswordHash ¶
func DecodeGetName ¶
func DecodeGetNomor ¶
func DecodeGetRole ¶
func DecodeGetUsername ¶
func DeleteProductOnlineCourse ¶
func DeleteProductOnlineCourse(mconn *mongo.Database, collname string, data ProductOnlineCourse) interface{}
func DeleteUser ¶
func EditProductOnlineCourse ¶
func EditProductOnlineCourse(mconn *mongo.Database, collname string, data ProductOnlineCourse) interface{}
func ForgotPassword ¶
func GenerateKey ¶
func GenerateKey() (privatekey, publickey string)
func HashPassword ¶
func HashPasswordd ¶
func InsertProductOnlineCourse ¶
func InsertProductOnlineCourse(mconn *mongo.Database, collname string, data ProductOnlineCourse) interface{}
func InsertUser ¶
func IsPasswordValid ¶
func Registrasi ¶
func ReturnStruct ¶
func SetConnection ¶
func UnHashPassowrd ¶
func UpdatePassword ¶
func UpdateUser ¶
func UsernameExists ¶
Types ¶
type CredentialUser ¶
type CredentialUser struct {
Status bool `json:"status" bson:"status"`
Data struct {
Name string `json:"name" bson:"name"`
Username string `json:"username" bson:"username"`
Role string `json:"role" bson:"role"`
Nomor string `json:"nomor" bson:"nomor"`
} `json:"data" bson:"data"`
Message string `json:"message,omitempty" bson:"message,omitempty"`
}
type Payload ¶
type Pesan ¶
type Pesan struct {
Status bool `json:"status" bson:"status"`
Message string `json:"message" bson:"message"`
Data interface{} `json:"data,omitempty" bson:"data,omitempty"`
Role string `json:"role,omitempty" bson:"role,omitempty"`
Token string `json:"token,omitempty" bson:"token,omitempty"`
Nomor string `json:"nomor,omitempty" bson:"nomor,omitempty"`
}
type ProductOnlineCourse ¶
type ProductOnlineCourse struct {
ID string `json:"id" bson:"id"`
Name string `json:"name" bson:"name"`
Description string `json:"description" bson:"description"`
List string `json:"list" bson:"list"`
Price int `json:"price" bson:"price"`
Authorization string `json:"authorization" bson:"authorization"`
}
func FindProductOnlineCourse ¶
func FindProductOnlineCourse(mconn *mongo.Database, collname string, data ProductOnlineCourse) ProductOnlineCourse
func GetAllProductOnlineCourse ¶
func GetAllProductOnlineCourse(mconn *mongo.Database, collname string) []ProductOnlineCourse
Click to show internal directories.
Click to hide internal directories.