Documentation
¶
Index ¶
- type APIServices
- func (s *APIServices) BanUserByID(id int64, moderatorID int64, reason string, startTime time.Time, ...) *SvcError
- func (s *APIServices) BookmarkPostWithID(postID int64, userID int64) *SvcError
- func (s *APIServices) CreateComment(content string, authorID int64, postID null.Int, parentCommentID null.Int) (int64, *SvcError)
- func (s *APIServices) CreatePost(title string, content string, authorID int64, topic string, hub string, ...) (int64, *SvcError)
- func (s *APIServices) CreateTag(tag string, hub string) (int64, *SvcError)
- func (s *APIServices) CreateTopic(topic string, hub string) (int64, *SvcError)
- func (s *APIServices) FollowUserByID(followerID int64, followingID int64) *SvcError
- func (s *APIServices) GetCommentByID(commentID int64) (*domain.Comment, *SvcError)
- func (s *APIServices) GetPostByID(id int64) (*domain.Post, *SvcError)
- func (s *APIServices) GetPostInteractionsByUserID(id int64, userID int64) (bool, *null.Bool, *SvcError)
- func (s *APIServices) GetPostsByAuthorID(authorID int64) *SvcError
- func (s *APIServices) GetTagByID(id int64) (*domain.Tag, *SvcError)
- func (s *APIServices) GetTopicByID(id int64) (*domain.Topic, *SvcError)
- func (s *APIServices) GetUserBookmarks(id int64) ([]domain.Bookmark, *SvcError)
- func (s *APIServices) GetUserByID(id int64) (*domain.User, *SvcError)
- func (s *APIServices) GetUserFollowerCount(id int64) (int64, *SvcError)
- func (s *APIServices) GetUserFollowers(id int64) ([]domain.User, *SvcError)
- func (s *APIServices) GetUserFollowingCount(id int64) (int64, *SvcError)
- func (s *APIServices) GetUserFollowings(id int64) ([]domain.User, *SvcError)
- func (s *APIServices) GetUserIDByUsername(username string) (int64, *SvcError)
- func (s *APIServices) GetUserPostCount(id int64) (int64, *SvcError)
- func (s *APIServices) GetUserRating(id int64) (int64, *SvcError)
- func (s *APIServices) GetUserSubscriptions(id int64) ([]domain.Subscription, *SvcError)
- func (s *APIServices) Login(usernameOrEmail string, password string) (int64, string, *SvcError)
- func (s *APIServices) MarkCommentAsDeletedByID(commentID int64, postID int64, reasonForDeletion string, moderatorID int64) *SvcError
- func (s *APIServices) MarkPostAsDeletedByID(id int64, reasonForDeletion string, moderatorID int64) *SvcError
- func (s *APIServices) SearchComments(options *domain.SearchCommentsOptions) ([]domain.Comment, *SvcError)
- func (s *APIServices) SearchPosts(options *domain.SearchPostsOptions) ([]domain.Post, *SvcError)
- func (s *APIServices) SearchTags(options *domain.SearchTagsOptions) ([]domain.Tag, *SvcError)
- func (s *APIServices) SearchTopics(options *domain.SearchTopicsOptions) ([]domain.Topic, *SvcError)
- func (s *APIServices) SearchUsers(options *domain.SearchUsersOptions) ([]domain.User, *SvcError)
- func (s *APIServices) Signup(email string, username string, password string) (int64, string, *SvcError)
- func (s *APIServices) UnfollowUserByID(followerID int64, followingID int64) *SvcError
- func (s *APIServices) UpdateCommentByID(commentID int64, content string) *SvcError
- func (s *APIServices) UpdatePostByID(id int64, updatedPost *domain.Post) *SvcError
- func (s *APIServices) UpdateTopicByID(id int64, description string) *SvcError
- func (s *APIServices) UpdateUserByID(id int64, updatedUser *domain.User) *SvcError
- func (s *APIServices) ViewPost(id int64, userID int64) *SvcError
- func (s *APIServices) VoteComment(id int64, userID int64, up null.Bool) *SvcError
- func (s *APIServices) VotePost(id int64, userID int64, up null.Bool) *SvcError
- type SvcError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIServices ¶
type APIServices struct {
// contains filtered or unexported fields
}
func NewAPIServices ¶
func NewAPIServices(repo ports.Repository, cache ports.Cache) *APIServices
func (*APIServices) BanUserByID ¶
func (*APIServices) BookmarkPostWithID ¶
func (s *APIServices) BookmarkPostWithID(postID int64, userID int64) *SvcError
func (*APIServices) CreateComment ¶
func (s *APIServices) CreateComment(content string, authorID int64, postID null.Int, parentCommentID null.Int) (int64, *SvcError)
func (*APIServices) CreatePost ¶
func (*APIServices) CreateTag ¶
func (s *APIServices) CreateTag(tag string, hub string) (int64, *SvcError)
func (*APIServices) CreateTopic ¶
func (s *APIServices) CreateTopic(topic string, hub string) (int64, *SvcError)
func (*APIServices) FollowUserByID ¶
func (s *APIServices) FollowUserByID(followerID int64, followingID int64) *SvcError
func (*APIServices) GetCommentByID ¶
func (s *APIServices) GetCommentByID(commentID int64) (*domain.Comment, *SvcError)
func (*APIServices) GetPostByID ¶
func (s *APIServices) GetPostByID(id int64) (*domain.Post, *SvcError)
func (*APIServices) GetPostInteractionsByUserID ¶
func (s *APIServices) GetPostInteractionsByUserID(id int64, userID int64) (bool, *null.Bool, *SvcError)
func (*APIServices) GetPostsByAuthorID ¶
func (s *APIServices) GetPostsByAuthorID(authorID int64) *SvcError
func (*APIServices) GetTagByID ¶
func (s *APIServices) GetTagByID(id int64) (*domain.Tag, *SvcError)
func (*APIServices) GetTopicByID ¶
func (s *APIServices) GetTopicByID(id int64) (*domain.Topic, *SvcError)
func (*APIServices) GetUserBookmarks ¶
func (s *APIServices) GetUserBookmarks(id int64) ([]domain.Bookmark, *SvcError)
func (*APIServices) GetUserByID ¶
func (s *APIServices) GetUserByID(id int64) (*domain.User, *SvcError)
func (*APIServices) GetUserFollowerCount ¶
func (s *APIServices) GetUserFollowerCount(id int64) (int64, *SvcError)
func (*APIServices) GetUserFollowers ¶
func (s *APIServices) GetUserFollowers(id int64) ([]domain.User, *SvcError)
func (*APIServices) GetUserFollowingCount ¶
func (s *APIServices) GetUserFollowingCount(id int64) (int64, *SvcError)
func (*APIServices) GetUserFollowings ¶
func (s *APIServices) GetUserFollowings(id int64) ([]domain.User, *SvcError)
func (*APIServices) GetUserIDByUsername ¶
func (s *APIServices) GetUserIDByUsername(username string) (int64, *SvcError)
func (*APIServices) GetUserPostCount ¶
func (s *APIServices) GetUserPostCount(id int64) (int64, *SvcError)
func (*APIServices) GetUserRating ¶
func (s *APIServices) GetUserRating(id int64) (int64, *SvcError)
func (*APIServices) GetUserSubscriptions ¶
func (s *APIServices) GetUserSubscriptions(id int64) ([]domain.Subscription, *SvcError)
func (*APIServices) MarkCommentAsDeletedByID ¶
func (*APIServices) MarkPostAsDeletedByID ¶
func (s *APIServices) MarkPostAsDeletedByID(id int64, reasonForDeletion string, moderatorID int64) *SvcError
func (*APIServices) SearchComments ¶
func (s *APIServices) SearchComments(options *domain.SearchCommentsOptions) ([]domain.Comment, *SvcError)
func (*APIServices) SearchPosts ¶
func (s *APIServices) SearchPosts(options *domain.SearchPostsOptions) ([]domain.Post, *SvcError)
func (*APIServices) SearchTags ¶
func (s *APIServices) SearchTags(options *domain.SearchTagsOptions) ([]domain.Tag, *SvcError)
func (*APIServices) SearchTopics ¶
func (s *APIServices) SearchTopics(options *domain.SearchTopicsOptions) ([]domain.Topic, *SvcError)
func (*APIServices) SearchUsers ¶
func (s *APIServices) SearchUsers(options *domain.SearchUsersOptions) ([]domain.User, *SvcError)
func (*APIServices) UnfollowUserByID ¶
func (s *APIServices) UnfollowUserByID(followerID int64, followingID int64) *SvcError
func (*APIServices) UpdateCommentByID ¶
func (s *APIServices) UpdateCommentByID(commentID int64, content string) *SvcError
func (*APIServices) UpdatePostByID ¶
func (s *APIServices) UpdatePostByID(id int64, updatedPost *domain.Post) *SvcError
func (*APIServices) UpdateTopicByID ¶
func (s *APIServices) UpdateTopicByID(id int64, description string) *SvcError
func (*APIServices) UpdateUserByID ¶
func (s *APIServices) UpdateUserByID(id int64, updatedUser *domain.User) *SvcError
func (*APIServices) VoteComment ¶
func (s *APIServices) VoteComment(id int64, userID int64, up null.Bool) *SvcError
Click to show internal directories.
Click to hide internal directories.