Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage interface { // user storage GetUserByID(userID int64) (*sgtmpb.User, error) GetLastUsersList(limit int) ([]*sgtmpb.User, error) CreateUser(dbUser *sgtmpb.User) (*sgtmpb.User, error) GetUserBySlug(slug string) (*sgtmpb.User, error) UpdateUser(user *sgtmpb.User, updates interface{}) error GetUserRecentPost(userID int64) (*sgtmpb.User, error) // post storage GetPostList(limit int) ([]*sgtmpb.Post, error) GetTrackByCID(cid string) (*sgtmpb.Post, error) GetTrackBySCID(scid uint64) (*sgtmpb.Post, error) GetLastActivities(moulID int64) ([]*sgtmpb.Post, error) CreatePost(post *sgtmpb.Post) error GetPostBySlugOrID(postSlug string) (*sgtmpb.Post, error) GetPostComments(postID int64) ([]*sgtmpb.Post, error) UpdatePost(post *sgtmpb.Post, updates interface{}) error GetPostListByUserID(userID int64, limit int) ([]*sgtmpb.Post, int64, error) CheckAndUpdatePost(post *sgtmpb.Post) error // counts GetUploadsByWeek() ([]*sgtmpb.UploadsByWeek, error) GetNumberOfDraftPosts() (int64, error) GetNumberOfUsers() (int64, error) GetNumberOfPostsByKind() ([]*sgtmpb.PostByKind, error) GetTotalDuration() (int64, error) GetCalendarHeatMap(authorID int64) ([]int64, error) }
func NewStorage ¶
Click to show internal directories.
Click to hide internal directories.