Documentation ¶
Index ¶
- type BlogPostRepository
- func (r *BlogPostRepository) Add(ctx context.Context, blogPost *entities.BlogPost) (*entities.BlogPost, *errors.CustomError)
- func (r *BlogPostRepository) Delete(ctx context.Context, id int64) *errors.CustomError
- func (r *BlogPostRepository) GetAll(ctx context.Context) (*[]entities.BlogPostResponse, *errors.CustomError)
- func (r *BlogPostRepository) GetByID(ctx context.Context, id int64) (*entities.BlogPostResponse, *errors.CustomError)
- func (r *BlogPostRepository) Search(ctx context.Context, search string) (*[]entities.BlogPostResponse, *errors.CustomError)
- func (r *BlogPostRepository) Update(ctx context.Context, blogPost *entities.BlogPost) *errors.CustomError
- type IBlogPostRepository
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlogPostRepository ¶
type BlogPostRepository struct {
Model blogpostmodel.IBlogPostModel
}
func New ¶
func New() *BlogPostRepository
func (*BlogPostRepository) Add ¶
func (r *BlogPostRepository) Add(ctx context.Context, blogPost *entities.BlogPost) (*entities.BlogPost, *errors.CustomError)
func (*BlogPostRepository) Delete ¶
func (r *BlogPostRepository) Delete(ctx context.Context, id int64) *errors.CustomError
func (*BlogPostRepository) GetAll ¶
func (r *BlogPostRepository) GetAll(ctx context.Context) (*[]entities.BlogPostResponse, *errors.CustomError)
func (*BlogPostRepository) GetByID ¶
func (r *BlogPostRepository) GetByID(ctx context.Context, id int64) (*entities.BlogPostResponse, *errors.CustomError)
func (*BlogPostRepository) Search ¶
func (r *BlogPostRepository) Search(ctx context.Context, search string) (*[]entities.BlogPostResponse, *errors.CustomError)
func (*BlogPostRepository) Update ¶
func (r *BlogPostRepository) Update(ctx context.Context, blogPost *entities.BlogPost) *errors.CustomError
type IBlogPostRepository ¶
type IBlogPostRepository interface { Add(ctx context.Context, blogPost *entities.BlogPost) (*entities.BlogPost, *errors.CustomError) GetAll(ctx context.Context) (*[]entities.BlogPostResponse, *errors.CustomError) GetByID(ctx context.Context, id int64) (*entities.BlogPostResponse, *errors.CustomError) Update(ctx context.Context, blogPost *entities.BlogPost) *errors.CustomError Delete(ctx context.Context, id int64) *errors.CustomError Search(ctx context.Context, search string) (*[]entities.BlogPostResponse, *errors.CustomError) }
Click to show internal directories.
Click to hide internal directories.