Documentation ¶
Index ¶
- type BoardRepository
- func (r *BoardRepository) CreateBoard(board view.BoardCreate) error
- func (r *BoardRepository) GetBoardByID(boardID, currentUserID uint) (view.BoardView, error)
- func (r *BoardRepository) GetBoardsByCategoryID(categoryID, currentUserID uint) ([]view.BoardView, error)
- func (r *BoardRepository) GetBoardsByUserID(userID uint) ([]view.BoardView, error)
- type CategoryRepository
- type CommentRepository
- func (r *CommentRepository) CreateComment(comment view.CommentCreate) (uint, error)
- func (r *CommentRepository) DeleteComment(commentID uint) error
- func (r *CommentRepository) GetCommentAuthorID(commentID uint) (uint, error)
- func (r *CommentRepository) GetCommentsByPost(postID, currentUserID uint) ([]view.CommentPreview, error)
- func (r *CommentRepository) GetCommentsByUser(currentUserID uint) ([]view.CommentPreview, error)
- func (r *CommentRepository) UpdateComment(comment view.CommentUpdate) error
- type FileRepository
- type NotificationRepository
- func (r *NotificationRepository) CreateNewPostNotifications(notification view.NotificationCreate, currentUserID uint) error
- func (r *NotificationRepository) DeleteNotification(notificationID, currentUserID uint) error
- func (r *NotificationRepository) DeleteNotificationByPost(postID, currentUserID uint) error
- func (r *NotificationRepository) GetNotificationByUser(userID uint) ([]view.NotificationPreview, error)
- type PostRepository
- func (r *PostRepository) CreatePost(post view.PostCreate) (uint, error)
- func (r *PostRepository) DeletePost(postID uint) error
- func (r *PostRepository) GetAllPosts(currentUserID uint) ([]view.PostPreview, error)
- func (r *PostRepository) GetPostAuthorID(postID uint) (uint, error)
- func (r *PostRepository) GetPostByID(postID, currentUserID uint) (view.PostView, error)
- func (r *PostRepository) GetPostsByBoard(boardID uint, currentUserID uint) ([]view.PostPreview, error)
- func (r *PostRepository) GetPostsBySusbcriptions(currentUserID uint) ([]view.PostPreview, error)
- func (r *PostRepository) GetPostsByUser(userID uint) ([]view.PostPreview, error)
- func (r *PostRepository) UpdatePost(post view.PostUpdate) error
- type ReactionRepository
- type SubscriptionRepository
- type UserRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoardRepository ¶
type BoardRepository struct {
// contains filtered or unexported fields
}
func BoardRepositoryInit ¶
func BoardRepositoryInit(db *gorm.DB) *BoardRepository
func (*BoardRepository) CreateBoard ¶
func (r *BoardRepository) CreateBoard(board view.BoardCreate) error
func (*BoardRepository) GetBoardByID ¶
func (r *BoardRepository) GetBoardByID(boardID, currentUserID uint) (view.BoardView, error)
func (*BoardRepository) GetBoardsByCategoryID ¶
func (r *BoardRepository) GetBoardsByCategoryID(categoryID, currentUserID uint) ([]view.BoardView, error)
func (*BoardRepository) GetBoardsByUserID ¶
func (r *BoardRepository) GetBoardsByUserID(userID uint) ([]view.BoardView, error)
type CategoryRepository ¶
type CategoryRepository struct {
// contains filtered or unexported fields
}
func CategoryRepositoryInit ¶
func CategoryRepositoryInit(db *gorm.DB) *CategoryRepository
func (*CategoryRepository) GetAllCategories ¶
func (r *CategoryRepository) GetAllCategories() ([]view.Category, error)
type CommentRepository ¶
type CommentRepository struct {
// contains filtered or unexported fields
}
func CommentRepositoryInit ¶
func CommentRepositoryInit(db *gorm.DB) *CommentRepository
func (*CommentRepository) CreateComment ¶
func (r *CommentRepository) CreateComment(comment view.CommentCreate) (uint, error)
func (*CommentRepository) DeleteComment ¶
func (r *CommentRepository) DeleteComment(commentID uint) error
func (*CommentRepository) GetCommentAuthorID ¶
func (r *CommentRepository) GetCommentAuthorID(commentID uint) (uint, error)
func (*CommentRepository) GetCommentsByPost ¶
func (r *CommentRepository) GetCommentsByPost(postID, currentUserID uint) ([]view.CommentPreview, error)
func (*CommentRepository) GetCommentsByUser ¶
func (r *CommentRepository) GetCommentsByUser(currentUserID uint) ([]view.CommentPreview, error)
func (*CommentRepository) UpdateComment ¶
func (r *CommentRepository) UpdateComment(comment view.CommentUpdate) error
type FileRepository ¶
type FileRepository struct {
// contains filtered or unexported fields
}
func FileRepositoryInit ¶
func FileRepositoryInit(db *gorm.DB) *FileRepository
func (*FileRepository) CreateFile ¶
func (r *FileRepository) CreateFile(file view.File) error
type NotificationRepository ¶
type NotificationRepository struct {
// contains filtered or unexported fields
}
func NotificationRepositoryInit ¶
func NotificationRepositoryInit(db *gorm.DB) *NotificationRepository
func (*NotificationRepository) CreateNewPostNotifications ¶
func (r *NotificationRepository) CreateNewPostNotifications(notification view.NotificationCreate, currentUserID uint) error
func (*NotificationRepository) DeleteNotification ¶
func (r *NotificationRepository) DeleteNotification(notificationID, currentUserID uint) error
func (*NotificationRepository) DeleteNotificationByPost ¶
func (r *NotificationRepository) DeleteNotificationByPost(postID, currentUserID uint) error
func (*NotificationRepository) GetNotificationByUser ¶
func (r *NotificationRepository) GetNotificationByUser(userID uint) ([]view.NotificationPreview, error)
type PostRepository ¶
type PostRepository struct {
// contains filtered or unexported fields
}
func PostRepositoryInit ¶
func PostRepositoryInit(db *gorm.DB) *PostRepository
func (*PostRepository) CreatePost ¶
func (r *PostRepository) CreatePost(post view.PostCreate) (uint, error)
func (*PostRepository) DeletePost ¶
func (r *PostRepository) DeletePost(postID uint) error
func (*PostRepository) GetAllPosts ¶
func (r *PostRepository) GetAllPosts(currentUserID uint) ([]view.PostPreview, error)
func (*PostRepository) GetPostAuthorID ¶
func (r *PostRepository) GetPostAuthorID(postID uint) (uint, error)
func (*PostRepository) GetPostByID ¶
func (r *PostRepository) GetPostByID(postID, currentUserID uint) (view.PostView, error)
func (*PostRepository) GetPostsByBoard ¶
func (r *PostRepository) GetPostsByBoard(boardID uint, currentUserID uint) ([]view.PostPreview, error)
func (*PostRepository) GetPostsBySusbcriptions ¶
func (r *PostRepository) GetPostsBySusbcriptions(currentUserID uint) ([]view.PostPreview, error)
func (*PostRepository) GetPostsByUser ¶
func (r *PostRepository) GetPostsByUser(userID uint) ([]view.PostPreview, error)
func (*PostRepository) UpdatePost ¶
func (r *PostRepository) UpdatePost(post view.PostUpdate) error
type ReactionRepository ¶
type ReactionRepository struct {
// contains filtered or unexported fields
}
func ReactionRepositoryInit ¶
func ReactionRepositoryInit(db *gorm.DB) *ReactionRepository
func (*ReactionRepository) ReactionComment ¶
func (r *ReactionRepository) ReactionComment(reaction view.ReactionComment, authorID uint) error
func (*ReactionRepository) ReactionPost ¶
func (r *ReactionRepository) ReactionPost(reaction view.ReactionPost, authorID uint) error
type SubscriptionRepository ¶
type SubscriptionRepository struct {
// contains filtered or unexported fields
}
func SubscriptionRepositoryInit ¶
func SubscriptionRepositoryInit(db *gorm.DB) *SubscriptionRepository
func (*SubscriptionRepository) Subscribe ¶
func (r *SubscriptionRepository) Subscribe(boardID, currentUserID uint) error
func (*SubscriptionRepository) Unsubscribe ¶
func (r *SubscriptionRepository) Unsubscribe(boardID, currentUserID uint) error
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
func UserRepositoryInit ¶
func UserRepositoryInit(db *gorm.DB) *UserRepository
func (*UserRepository) GetUserProfile ¶
func (r *UserRepository) GetUserProfile(id uint) (view.UserProfile, error)
func (*UserRepository) RegisterUser ¶
func (r *UserRepository) RegisterUser(user view.UserCreate) error
Click to show internal directories.
Click to hide internal directories.