Documentation
¶
Index ¶
- Constants
- type SessionDAO
- func (m *SessionDAO) Connect()
- func (m *SessionDAO) DeleteById(id string) error
- func (m *SessionDAO) FindAll() ([]models.ResReview, error)
- func (m *SessionDAO) FindAllClasses() ([]models.Class, error)
- func (m *SessionDAO) FindById(id string) (models.Review, error)
- func (m *SessionDAO) FindClassByClassID(classId string) (models.Class, error)
- func (m *SessionDAO) FindReviewsByClassID(classId string, page string, offset string) ([]models.ResReview, error)
- func (m *SessionDAO) Insert(review models.Review) error
- func (m *SessionDAO) InsertClass(class models.Class) error
- func (m *SessionDAO) InsertReport(report models.Report) error
- func (m *SessionDAO) LastReviews(page string, offset string) ([]models.ResReview, error)
- func (m *SessionDAO) UpdateBooById(id string, newBoo uint64, updateAt time.Time) error
- func (m *SessionDAO) UpdateClapById(id string, newClap uint64, updateAt time.Time) error
- func (m *SessionDAO) UpdateNuberReviewByClassID(classId string, updateAt time.Time) error
- func (m *SessionDAO) UpdateReportById(id string, updateAt time.Time) error
- func (m *SessionDAO) UpdateStatsClassByCreated(classId string, newStats models.StatClass) error
- func (m *SessionDAO) UpdateStatsClassByDeleted(classId string, newStats models.StatClass) error
Constants ¶
View Source
const ( CREVIEWS = "reviews" CCLASSES = "classes" CREPORTS = "reported" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SessionDAO ¶
func (*SessionDAO) DeleteById ¶
func (m *SessionDAO) DeleteById(id string) error
Delete an existing review
func (*SessionDAO) FindAll ¶
func (m *SessionDAO) FindAll() ([]models.ResReview, error)
Find list of reviews: All of reviews
func (*SessionDAO) FindAllClasses ¶
func (m *SessionDAO) FindAllClasses() ([]models.Class, error)
Find All of list of classes
func (*SessionDAO) FindById ¶
func (m *SessionDAO) FindById(id string) (models.Review, error)
Find a review by its id
func (*SessionDAO) FindClassByClassID ¶
func (m *SessionDAO) FindClassByClassID(classId string) (models.Class, error)
Find class by class_id
func (*SessionDAO) FindReviewsByClassID ¶
func (m *SessionDAO) FindReviewsByClassID(classId string, page string, offset string) ([]models.ResReview, error)
Find reviews by class_id
func (*SessionDAO) Insert ¶
func (m *SessionDAO) Insert(review models.Review) error
Insert a review into database
func (*SessionDAO) InsertClass ¶
func (m *SessionDAO) InsertClass(class models.Class) error
Insert class to database
func (*SessionDAO) InsertReport ¶
func (m *SessionDAO) InsertReport(report models.Report) error
Insert report to database
func (*SessionDAO) LastReviews ¶
Find last reviews range with offset
func (*SessionDAO) UpdateBooById ¶
Update boo by id
func (*SessionDAO) UpdateClapById ¶
Update clap by id
func (*SessionDAO) UpdateNuberReviewByClassID ¶
func (m *SessionDAO) UpdateNuberReviewByClassID(classId string, updateAt time.Time) error
Update number of review
func (*SessionDAO) UpdateReportById ¶
func (m *SessionDAO) UpdateReportById(id string, updateAt time.Time) error
Update reported
func (*SessionDAO) UpdateStatsClassByCreated ¶
func (m *SessionDAO) UpdateStatsClassByCreated(classId string, newStats models.StatClass) error
Update stats on class by class_id
func (*SessionDAO) UpdateStatsClassByDeleted ¶
func (m *SessionDAO) UpdateStatsClassByDeleted(classId string, newStats models.StatClass) error
Update stats on class by class_id
Click to show internal directories.
Click to hide internal directories.