Documentation ¶
Index ¶
- type PostRepository
- func (pr *PostRepository) CreatePost(post *models.Post) error
- func (pr *PostRepository) DeletePost(id int) error
- func (pr *PostRepository) GetPost(id int) (*models.Post, error)
- func (pr *PostRepository) GetPosts(ctx context.Context) ([]models.Post, error)
- func (pr *PostRepository) UpdatePost(post *models.Post) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostRepository ¶
type PostRepository struct {
// contains filtered or unexported fields
}
func NewPostRepository ¶
func NewPostRepository(dbpool *pgxpool.Pool) *PostRepository
func (*PostRepository) CreatePost ¶
func (pr *PostRepository) CreatePost(post *models.Post) error
func (*PostRepository) DeletePost ¶
func (pr *PostRepository) DeletePost(id int) error
func (*PostRepository) UpdatePost ¶
func (pr *PostRepository) UpdatePost(post *models.Post) error
Click to show internal directories.
Click to hide internal directories.