Documentation
¶
Index ¶
- Constants
- func DBMigrate(db *gorm.DB) *gorm.DB
- type Board
- type BoardRepository
- type Category
- type CategoryRepository
- type Comment
- type CommentRepository
- type File
- type FileRepository
- type Notification
- type NotificationRepository
- type NotificationType
- type Post
- type PostRepository
- type Reaction
- type ReactionRepository
- type ReactionType
- type Role
- type Subscription
- type SubscriptionRepository
- type User
- type UserRepository
Constants ¶
View Source
const ( NewPost = iota NewComment NewCommentReply )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BoardRepository ¶
type CategoryRepository ¶
type CommentRepository ¶
type CommentRepository interface { CreateComment(comment view.CommentCreate) (uint, error) GetCommentsByPost(commentID, currentUserID uint) ([]view.CommentPreview, error) UpdateComment(post view.CommentUpdate) error GetCommentAuthorID(postID uint) (uint, error) DeleteComment(commentID uint) error GetCommentsByUser(currentUserID uint) ([]view.CommentPreview, error) }
type FileRepository ¶
type Notification ¶
type NotificationRepository ¶
type NotificationRepository interface { CreateNewPostNotifications(notificatioin view.NotificationCreate, currentUserID uint) error GetNotificationByUser(userID uint) ([]view.NotificationPreview, error) DeleteNotification(notificationID, currentUserID uint) error DeleteNotificationByPost(postID, currentUserID uint) error }
type NotificationType ¶
type NotificationType uint
func (NotificationType) String ¶
func (n NotificationType) String() string
type PostRepository ¶
type PostRepository interface { CreatePost(post view.PostCreate) (uint, error) GetAllPosts(currentUserID uint) ([]view.PostPreview, error) GetPostByID(postID, currentUserID uint) (view.PostView, error) GetPostsByBoard(boardID, currentUserID uint) ([]view.PostPreview, error) GetPostsBySusbcriptions(currentUserID uint) ([]view.PostPreview, error) GetPostsByUser(userID uint) ([]view.PostPreview, error) UpdatePost(post view.PostUpdate) error GetPostAuthorID(postID uint) (uint, error) DeletePost(postID uint) error }
type ReactionRepository ¶
type ReactionRepository interface { ReactionPost(reaction view.ReactionPost, authorID uint) error ReactionComment(reaction view.ReactionComment, authorID uint) error }
type Subscription ¶
type SubscriptionRepository ¶
type UserRepository ¶
Click to show internal directories.
Click to hide internal directories.