Documentation ¶
Index ¶
- func DeleteComment(ctx *gin.Context, DB db.Database, userID string, off *controllers.Offering)
- func GetComment(ctx *gin.Context, DB db.Database, userID string, off *controllers.Offering)
- func GetCommentRating(ctx *gin.Context, DB db.Database, userID string, ...)
- func GetSubjectGrade(ctx *gin.Context, DB db.Database, userID string, sub *controllers.Subject)
- func GetSubjectReview(ctx *gin.Context, DB db.Database, userID string, sub *controllers.Subject)
- func GetSubjectVerification(ctx *gin.Context, DB db.Database, userID string, sub *controllers.Subject)
- func PublishComment(ctx *gin.Context, DB db.Database, userID string, off *controllers.Offering, ...)
- func RateComment(ctx *gin.Context, DB db.Database, userID string, ...)
- func ReportComment(ctx *gin.Context, DB db.Database, userID string, ...)
- func UpdateSubjectReview(ctx *gin.Context, DB db.Database, userID string, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteComment ¶
DeleteComment deletes a comment made by the given user
It deletes not only the comment associated with the offering, but also the replica in user comments
func GetComment ¶
GetComment retrieves the comment associated with an offering made by a given user
func GetCommentRating ¶
func GetCommentRating( ctx *gin.Context, DB db.Database, userID string, comment *controllers.CommentRating, )
GetCommentRating retrieves the rating made for a comment by a given user
func GetSubjectGrade ¶
GetSubjectGrade retrieves the grade a user has in the given subject
GetSubjectGrade is the model implementation for /server/controller/private/user.GetSubjectGrade
func GetSubjectReview ¶
GetSubjectReview retrieves the review made for a subject by an user
GetSubjectReview is the model implementation for /server/controller/private/user.GetSubjectReview
func GetSubjectVerification ¶ added in v1.6.0
func GetSubjectVerification(ctx *gin.Context, DB db.Database, userID string, sub *controllers.Subject)
GetSubjectVerification retrieves the verification status of a subject for a user
GetSubjectVerification is the model implementation for /server/controller/private/user.GetSubjectVerification
func PublishComment ¶
func PublishComment( ctx *gin.Context, DB db.Database, userID string, off *controllers.Offering, comment *controllers.Comment, )
PublishComment publishes a comment and its associated reaction made by a given user
func RateComment ¶
func RateComment( ctx *gin.Context, DB db.Database, userID string, comment *controllers.CommentRating, body *controllers.CommentRateBody, )
RateComment takes a user's rating and applies it to a given comment
func ReportComment ¶
func ReportComment( ctx *gin.Context, DB db.Database, userID string, comment *controllers.CommentRating, body *controllers.CommentReportBody, )
ReportComment takes a user's report and applies it to a given comment
func UpdateSubjectReview ¶
func UpdateSubjectReview(ctx *gin.Context, DB db.Database, userID string, review *controllers.SubjectReview)
UpdateSubjectReview updates the review made for a subject given by an user
UpdateSubjectReview is the model implementation for /server/controller/private/user.UpdateSubjectReview
Types ¶
This section is empty.