Documentation ¶
Index ¶
- Variables
- func CheckUserValid(id int, email string) (bool, error)
- func Follow(followerID, followeeID int) error
- func GetCommentByIDAndPost(id int, postID int) (*model.Comment, error)
- func GetCommentsForPost(id int) ([]*model.Comment, error)
- func GetFolloweeByIDAndUser(id int, userID int) (*model.User, error)
- func GetFolloweesForUser(id int) ([]*model.User, error)
- func GetFollowerByIDAndUser(id int, userID int) (*model.User, error)
- func GetFollowersForUser(id int) ([]*model.User, error)
- func GetPostByID(id int) (*model.Post, error)
- func GetPostByIDAndUser(id, userID int) (*model.Post, error)
- func GetPostsForUser(userID int) ([]*model.Post, error)
- func GetUserByID(id int) (*model.User, error)
- func Init()
- func InsertComment(comment *model.Comment) error
- func InsertPost(post *model.Post) error
- func InsertUser(user *model.User) error
- func Login(email string, pw string) (bool, error)
- func PraisePost(postID int) error
- func RemoveCommentByID(id int) error
- func RemovePostByID(id int) error
- func RemoveUserByID(id int) error
- func UnPraisePost(postID int) error
- func Unfollow(followerID, followeeID int) error
- func UpdatePost(postID int, title, body string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *gorm.DB
DB db
Functions ¶
func GetCommentByIDAndPost ¶
GetCommentByIDAndPost db
func GetCommentsForPost ¶
GetCommentsForPost db
func GetFolloweeByIDAndUser ¶
GetFolloweeByIDAndUser db: get the people who follow you
func GetFolloweesForUser ¶
GetFolloweesForUser db
func GetFollowerByIDAndUser ¶
GetFollowerByIDAndUser db
func GetFollowersForUser ¶
GetFollowersForUser db: get the people who you follow
func GetPostByIDAndUser ¶
GetPostByIDAndUser db
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.