Documentation
¶
Index ¶
- type MinioClient
- type PostService
- func (postService *PostService) CreateCacheUser(ctx context.Context, userID int, username, name string) error
- func (postService *PostService) CreatePost(ctx context.Context, post *models.Post) (*models.Post, error)
- func (postService *PostService) DecreaseLikeCount(ctx context.Context, postID int) error
- func (postService *PostService) DeletePost(ctx context.Context, postID int) error
- func (postService *PostService) GenerateUploadURL(ctx context.Context, filename, contentType string, userID int) (string, map[string]string, error)
- func (postService *PostService) GetUserPosts(ctx context.Context, UserID, limit int64, cursor string) (*dto.PaginatedResponse, error)
- func (postService *PostService) IncreaseLikeCount(ctx context.Context, postID int) error
- func (postService *PostService) ListPosts(ctx context.Context) ([]models.Post, error)
- func (postService *PostService) UpdatePost(ctx context.Context, postID int, title, content, image string) (*models.Post, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MinioClient ¶
type PostService ¶
type PostService struct {
// contains filtered or unexported fields
}
func NewPostService ¶
func NewPostService(repository core.PostRepository, kafka kafkaClient, minioClient MinioClient, cleanup *cleanup.CleanUpService) *PostService
func (*PostService) CreateCacheUser ¶
func (*PostService) CreatePost ¶
func (*PostService) DecreaseLikeCount ¶
func (postService *PostService) DecreaseLikeCount(ctx context.Context, postID int) error
func (*PostService) DeletePost ¶
func (postService *PostService) DeletePost(ctx context.Context, postID int) error
func (*PostService) GenerateUploadURL ¶
func (*PostService) GetUserPosts ¶
func (postService *PostService) GetUserPosts(ctx context.Context, UserID, limit int64, cursor string) (*dto.PaginatedResponse, error)
func (*PostService) IncreaseLikeCount ¶
func (postService *PostService) IncreaseLikeCount(ctx context.Context, postID int) error
func (*PostService) UpdatePost ¶
Click to show internal directories.
Click to hide internal directories.