Documentation
¶
Index ¶
- func AddedBlog(publickeykatalogfilm, mongoenvkatalogfilm, dbname, collname string, ...) string
- func AddedComment(mongoenvkatalogfilm, dbname, collname string, r *http.Request) string
- func AddedQuestionAndAnswer(publickeykatalogfilm, mongoenvkatalogfilm, dbname, collname string, ...) string
- func AddedQuestionAnswerAndVidieo(publickeykatalogfilm, mongoenvkatalogfilm, dbname, collname string, ...) string
- func AmbilSemuaUser(publickeykatalogfilm, mongoenvkatalogfilm, dbname, collname string, ...) string
- func Authorization(publickeykatalogfilm, mongoenvkatalogfilm, dbname, collname string, ...) string
- func CekAnswer(mongoenvkatalogfilm, dbname, collname string, r *http.Request) string
- func CekAnswerVidio(mongoenvkatalogfilm, dbname, collname string, r *http.Request) string
- func CheckPasswordHash(password, hash string) bool
- func CheckUserAccess(mconn *mongo.Database, username string, contentID int) 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 DeleteAnswer(publickeykatalogfilm, mongoenvkatalogfilm, dbname, collname string, ...) string
- func DeleteAnswerVidio(publickeykatalogfilm, mongoenvkatalogfilm, dbname, collname string, ...) string
- func DeleteAnswerdb(mconn *mongo.Database, collname string, dataquestion QuestionAndAnswer) interface{}
- func DeleteAnswerdbVidio(mconn *mongo.Database, collname string, dataquestion VidioQuestion) interface{}
- func DeleteBlog(mconn *mongo.Database, collname string, datablog Blog) interface{}
- func DeleteComment(mconn *mongo.Database, collname string, datacomment Comment) interface{}
- func DeleteContent(mconn *mongo.Database, collname string, datacontent Content) interface{}
- func DeleteUser(mconn *mongo.Database, collname string, userdata User) interface{}
- func DeletedBlog(publickeykatalogfilm, mongoenvkatalogfilm, dbname, collname string, ...) string
- func DeletedCertificate(mconn *mongo.Database, collname string, datacertificate Certificate) interface{}
- func DeletedComment(mongoenvkatalogfilm, dbname, collname string, r *http.Request) string
- func EditUser(mconn *mongo.Database, collname string, datauser User) interface{}
- func Encode(name, username, role, nomor, privatekey string) (string, error)
- func FindBlog(mongoenvkatalogfilm, dbname, collname string, r *http.Request) string
- func FindComment(mongoenvkatalogfilm, dbname, collname string, r *http.Request) string
- func GenerateCertificate(username string, correctCount int, totalQuestions int, nomorRandom string) string
- func GenerateKey() (privatekey, publickey string)
- func GenerateRandomNumber() string
- func GetFindAll(mongoenvkatalogfilm, dbname, collname string, r *http.Request) string
- func GetFindAllVideo(mongoenvkatalogfilm, dbname, collname string, r *http.Request) string
- func GetQuestionAndAnswer(mongoenvkatalogfilm, dbname, collname string, r *http.Request) string
- func GetVideoWithAccessCheck(publickeykatalogfilm, mongoenvkatalogfilm, dbname, collname string, ...) string
- func GrantAccess(mongoenvkatalogfilm, dbname, collname string, r *http.Request) string
- func HapusUser(mongoenvkatalogfilm, dbname, collname string, r *http.Request) string
- func HashPassword(password string) (string, error)
- func HashPasswordd(password string) (string, error)
- func InsertAccessControl(mconn *mongo.Database, collname string, access AccessControl) error
- func InsertBlog(mconn *mongo.Database, collname string, datablog Blog) interface{}
- func InsertCertificate(mconn *mongo.Database, collname string, datacertificate Certificate) interface{}
- func InsertComment(mconn *mongo.Database, collname string, datacomment Comment) interface{}
- func InsertContent(mconn *mongo.Database, collname string, datacontent Content) interface{}
- func InsertQuestionAndAnswer(mconn *mongo.Database, collname string, dataquestion QuestionAndAnswer) interface{}
- func InsertQuestionAndAnswerVidieo(mconn *mongo.Database, collname string, dataquestion VidioQuestion) 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 UpdateBlog(publickeykatalogfilm, mongoenvkatalogfilm, dbname, collname string, ...) string
- func UpdateComment(mongoenvkatalogfilm, dbname, collname string, r *http.Request) string
- func UpdatePassword(mongoenvkatalogfilm, dbname, collname string, r *http.Request) string
- func UpdateUser(mongoenvkatalogfilm, dbname, collname string, r *http.Request) string
- func UpdatedAnswer(publickeykatalogfilm, mongoenvkatalogfilm, dbname, collname string, ...) string
- func UpdatedAnswerVidio(publickeykatalogfilm, mongoenvkatalogfilm, dbname, collname string, ...) string
- func UpdatedAnswerdb(mconn *mongo.Database, collname string, dataquestion QuestionAndAnswer) interface{}
- func UpdatedAnswerdbVidio(mconn *mongo.Database, collname string, dataquestion VidioQuestion) interface{}
- func UpdatedBlog(mconn *mongo.Database, collname string, datablog Blog) interface{}
- func UpdatedComment(mconn *mongo.Database, collname string, datacomment Comment) interface{}
- func UpdatedContent(mconn *mongo.Database, collname string, datacontent Content) interface{}
- func UsernameExists(mongoenvkatalogfilm, dbname string, userdata User) bool
- type AccessControl
- type Blog
- type Certificate
- type Comment
- type Content
- type CredentialUser
- type Payload
- type Pesan
- type PesanAnswer
- type QuestionAndAnswer
- type QuestionDetail
- type Response
- type User
- type VidioQuestion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddedComment ¶ added in v0.0.10
commment
func AddedQuestionAndAnswer ¶ added in v0.0.6
func AddedQuestionAnswerAndVidieo ¶ added in v1.1.6
func AddedQuestionAnswerAndVidieo(publickeykatalogfilm, mongoenvkatalogfilm, dbname, collname string, r *http.Request) string
find answerd and video
func AmbilSemuaUser ¶
func Authorization ¶
func CekAnswerVidio ¶ added in v1.1.27
func CheckPasswordHash ¶
func CheckUserAccess ¶ added in v1.1.13
func DecodeGetName ¶
func DecodeGetNomor ¶
func DecodeGetRole ¶
func DecodeGetUsername ¶
func DeleteAnswer ¶ added in v0.0.6
func DeleteAnswerVidio ¶ added in v1.1.34
func DeleteAnswerdb ¶ added in v0.0.6
func DeleteAnswerdb(mconn *mongo.Database, collname string, dataquestion QuestionAndAnswer) interface{}
func DeleteAnswerdbVidio ¶ added in v1.1.33
func DeleteAnswerdbVidio(mconn *mongo.Database, collname string, dataquestion VidioQuestion) interface{}
func DeleteBlog ¶
func DeleteComment ¶ added in v0.0.10
func DeleteContent ¶ added in v0.0.8
func DeleteUser ¶
func DeletedBlog ¶
func DeletedCertificate ¶
func DeletedCertificate(mconn *mongo.Database, collname string, datacertificate Certificate) interface{}
func DeletedComment ¶ added in v0.0.10
func FindComment ¶ added in v0.0.10
func GenerateCertificate ¶ added in v1.1.23
func GenerateKey ¶
func GenerateKey() (privatekey, publickey string)
func GetFindAll ¶ added in v0.0.6
func GetFindAllVideo ¶ added in v1.1.32
func GetQuestionAndAnswer ¶ added in v0.0.6
func GetVideoWithAccessCheck ¶ added in v1.1.13
func GrantAccess ¶ added in v1.1.13
func HashPassword ¶
func HashPasswordd ¶
func InsertAccessControl ¶ added in v1.1.13
func InsertAccessControl(mconn *mongo.Database, collname string, access AccessControl) error
func InsertBlog ¶
func InsertCertificate ¶
func InsertCertificate(mconn *mongo.Database, collname string, datacertificate Certificate) interface{}
func InsertComment ¶ added in v0.0.10
func InsertContent ¶ added in v0.0.8
func InsertQuestionAndAnswer ¶ added in v0.0.6
func InsertQuestionAndAnswer(mconn *mongo.Database, collname string, dataquestion QuestionAndAnswer) interface{}
func InsertQuestionAndAnswerVidieo ¶ added in v1.1.6
func InsertQuestionAndAnswerVidieo(mconn *mongo.Database, collname string, dataquestion VidioQuestion) interface{}
func InsertUser ¶
func IsPasswordValid ¶
func Registrasi ¶
func ReturnStruct ¶
func SetConnection ¶
func UnHashPassowrd ¶
func UpdateBlog ¶
func UpdateComment ¶ added in v0.0.10
func UpdatePassword ¶
func UpdateUser ¶
func UpdatedAnswer ¶ added in v0.0.6
func UpdatedAnswerVidio ¶ added in v1.1.33
func UpdatedAnswerdb ¶ added in v0.0.6
func UpdatedAnswerdb(mconn *mongo.Database, collname string, dataquestion QuestionAndAnswer) interface{}
func UpdatedAnswerdbVidio ¶ added in v1.1.33
func UpdatedAnswerdbVidio(mconn *mongo.Database, collname string, dataquestion VidioQuestion) interface{}
func UpdatedBlog ¶
func UpdatedComment ¶ added in v0.0.10
func UpdatedContent ¶ added in v0.0.8
func UsernameExists ¶
Types ¶
type AccessControl ¶ added in v1.1.13
type Blog ¶
type Blog struct { ID int `json:"id" bson:"id"` Content string `json:"content_one" bson:"content_one"` Content_two string `json:"content_two" bson:"content_two"` Image string `json:"image" bson:"image"` Title string `json:"title" bson:"title"` Title_two string `json:"title_two" bson:"title_two"` Description string `json:"description" bson:"description"` Description_twoo string `json:"description_two" bson:"description_two"` Description_three string `json:"description_3" bson:"description_3"` Status bool `json:"status" bson:"status"` }
type Certificate ¶
type Certificate struct { Nama string `json:"nama" bson:"nama"` Nomorcertificate string `json:"nomorcertificate" bson:"nomorcertificate"` Tanggal string `json:"tanggal" bson:"tanggal"` Expired string `json:"expired" bson:"expired"` Jurusan string `json:"jurusan" bson:"jurusan"` Status bool `json:"status" bson:"status"` Nomor string `json:"nomor" bson:"nomor"` Ttd string `json:"ttd" bson:"ttd"` }
func FindallCertificate ¶
func FindallCertificate(mconn *mongo.Database, collname string) []Certificate
find all sertificate
type Comment ¶ added in v0.0.8
type Content ¶ added in v0.0.8
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 PesanAnswer ¶ added in v1.1.20
type PesanAnswer struct { Status bool `json:"status"` Message string `json:"message"` CorrectCount int `json:"correct_count"` IncorrectCount int `json:"incorrect_count"` Details []QuestionDetail `json:"details"` UserDetails User `json:"user_details,omitempty"` Certificate string `json:"certificate,omitempty"` Nomor string `json:"nomor,omitempty"` }
type QuestionAndAnswer ¶ added in v0.0.6
type QuestionAndAnswer struct { ID int `json:"id" bson:"id"` Question string `json:"question" bson:"question"` Answers []string `json:"answers" bson:"answers"` CorrectAnswer string `json:"correct_answer" bson:"correct_answer"` Status bool `json:"status" bson:"status"` Username string `json:"username"` }
func CheckAnswerdb ¶ added in v0.0.6
func CheckAnswerdb(mconn *mongo.Database, collname string, dataquestion QuestionAndAnswer) QuestionAndAnswer
func FindallQuestionAndAnswer ¶ added in v0.0.6
func FindallQuestionAndAnswer(mconn *mongo.Database, collname string) []QuestionAndAnswer
type QuestionDetail ¶ added in v1.1.20
type Response ¶
type Response struct { Status bool `json:"status" bson:"status"` Message string `json:"message" bson:"message"` Data interface{} `json:"data" bson:"data"` }
func CreateResponse ¶
type User ¶
type User struct { Name string `json:"name" bson:"name"` Username string `json:"username" bson:"username"` Password string `json:"password" bson:"password"` Role string `json:"role" bson:"role"` Nomor string `json:"nomor" bson:"nomor"` Ispaid bool `json:"ispaid" bson:"ispaid"` // Indicates whether the user has paid Hasaccess bool `json:"hasaccess" bson:"hasaccess"` // Indicates whether access has been granted by admin }
type VidioQuestion ¶ added in v1.1.6
type VidioQuestion struct { ID int `json:"id" bson:"id"` Question string `json:"question" bson:"question"` Answers []string `json:"answers" bson:"answers"` CorrectAnswer string `json:"correct_answer" bson:"correct_answer"` Status bool `json:"status" bson:"status"` Video []string `json:"video" bson:"video"` ContentID []int `json:"content_id" bson:"content_id"` // Added to link with AccessControl Username string `json:"username"` Nomor string `json:"nomor" bson:"nomor"` }
func CheckAnswerdbVidio ¶ added in v1.1.27
func CheckAnswerdbVidio(mconn *mongo.Database, collname string, dataquestion VidioQuestion) VidioQuestion
func FindVideoByID ¶ added in v1.1.13
func FindallQuestionAndAnswerVideo ¶ added in v1.1.32
func FindallQuestionAndAnswerVideo(mconn *mongo.Database, collname string) []VidioQuestion
Click to show internal directories.
Click to hide internal directories.