Documentation ¶
Index ¶
- type PostRepository
- func (r *PostRepository) Create(ctx context.Context, post *model.Post) error
- func (r *PostRepository) Delete(ctx context.Context, post *model.Post) error
- func (r *PostRepository) Find(ctx context.Context, id int) (*model.Post, error)
- func (r *PostRepository) FindAll(ctx context.Context) ([]model.Post, error)
- func (r *PostRepository) Update(ctx context.Context, post *model.Post, update *model.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(db *gorm.DB) (*PostRepository, error)
Click to show internal directories.
Click to hide internal directories.