You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
415 B
16 lines
415 B
package repository
|
|
|
|
import (
|
|
"context"
|
|
|
|
"blog/models"
|
|
)
|
|
|
|
// PostRepo explain...
|
|
type PostRepo interface {
|
|
Fetch(ctx context.Context, num int64) ([]*models.Post, error)
|
|
GetByID(ctx context.Context, id int64) (*models.Post, error)
|
|
Create(ctx context.Context, p *models.Post) (int64, error)
|
|
Update(ctx context.Context, p *models.Post) (*models.Post, error)
|
|
Delete(ctx context.Context, id int64) (bool, error)
|
|
}
|
|
|