Versions in this module Expand all Collapse all v1 v1.54.2 Apr 26, 2021 Changes in this version + type Storage interface + CheckAndUpdatePost func(post *sgtmpb.Post) error + CreatePost func(post *sgtmpb.Post) error + CreateUser func(dbUser *sgtmpb.User) (*sgtmpb.User, error) + GetCalendarHeatMap func(authorID int64) ([]int64, error) + GetLastActivities func(moulID int64) ([]*sgtmpb.Post, error) + GetLastUsersList func(limit int) ([]*sgtmpb.User, error) + GetNumberOfDraftPosts func() (int64, error) + GetNumberOfPostsByKind func() ([]*sgtmpb.PostByKind, error) + GetNumberOfUsers func() (int64, error) + GetPostBySlugOrID func(postSlug string) (*sgtmpb.Post, error) + GetPostComments func(postID int64) ([]*sgtmpb.Post, error) + GetPostList func(limit int) ([]*sgtmpb.Post, error) + GetPostListByUserID func(userID int64, limit int) ([]*sgtmpb.Post, int64, error) + GetTotalDuration func() (int64, error) + GetTrackByCID func(cid string) (*sgtmpb.Post, error) + GetTrackBySCID func(scid uint64) (*sgtmpb.Post, error) + GetUploadsByWeek func() ([]*sgtmpb.UploadsByWeek, error) + GetUserByID func(userID int64) (*sgtmpb.User, error) + GetUserBySlug func(slug string) (*sgtmpb.User, error) + GetUserRecentPost func(userID int64) (*sgtmpb.User, error) + UpdatePost func(post *sgtmpb.Post, updates interface{}) error + UpdateUser func(user *sgtmpb.User, updates interface{}) error + func NewStorage(db *gorm.DB) Storage