Documentation
¶
Overview ¶
Posts routes and controllers logic package for the backend.
Index ¶
- Constants
- func NewPostRepository(cache db.Cacher) models.PostRepositoryInterface
- func Router() chi.Router
- type PostRepository
- func (r *PostRepository) Delete(postID string) error
- func (r *PostRepository) GetAll() (*map[string]models.Post, error)
- func (r *PostRepository) GetByID(postID string) (*models.Post, error)
- func (r *PostRepository) GetPage(pageOpts interface{}) (*map[string]models.Post, error)
- func (r *PostRepository) Save(post *models.Post) error
Constants ¶
View Source
const (
PKG_NAME = "posts"
)
Variables ¶
This section is empty.
Functions ¶
func NewPostRepository ¶ added in v0.44.22
func NewPostRepository(cache db.Cacher) models.PostRepositoryInterface
Types ¶
type PostRepository ¶ added in v0.44.22
type PostRepository struct {
// contains filtered or unexported fields
}
The implementation of pkg/models.PostRepositoryInterface.
func (*PostRepository) Delete ¶ added in v0.44.22
func (r *PostRepository) Delete(postID string) error
func (*PostRepository) GetAll ¶ added in v0.44.22
func (r *PostRepository) GetAll() (*map[string]models.Post, error)
func (*PostRepository) GetByID ¶ added in v0.44.22
func (r *PostRepository) GetByID(postID string) (*models.Post, error)
Click to show internal directories.
Click to hide internal directories.