Documentation ¶
Index ¶
- type PostRepo
- func (r *PostRepo) Create(ctx context.Context, req dto.PostCreateReq) (*dto.PostRes, error)
- func (r *PostRepo) DeleteByID(ctx context.Context, postID uint64) error
- func (r *PostRepo) GetAll(ctx context.Context) (result []dto.PostRes, err error)
- func (r *PostRepo) GetDetail(ctx context.Context, req dto.PostGetReq) (*dto.PostRes, error)
- func (r *PostRepo) GetDetailTag(ctx context.Context, req dto.TagGetReq) (*models.Tag, error)
- func (r *PostRepo) UpdateByID(ctx context.Context, req dto.PostUpdateReq) error
- type PostRepository
- type Repositories
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostRepo ¶
func (*PostRepo) DeleteByID ¶
func (*PostRepo) GetDetailTag ¶
func (*PostRepo) UpdateByID ¶
type PostRepository ¶
type PostRepository interface { GetAll(ctx context.Context) (result []dto.PostRes, err error) GetDetail(ctx context.Context, req dto.PostGetReq) (*dto.PostRes, error) GetDetailTag(ctx context.Context, req dto.TagGetReq) (*models.Tag, error) Create(ctx context.Context, req dto.PostCreateReq) (*dto.PostRes, error) DeleteByID(ctx context.Context, postID uint64) error UpdateByID(ctx context.Context, req dto.PostUpdateReq) error }
func NewPostRepository ¶
type Repositories ¶
type Repositories struct {
Post PostRepository
}
Repositories all repo object injected here
Click to show internal directories.
Click to hide internal directories.