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
632 B
16 lines
632 B
package repositories
|
|
|
|
import (
|
|
"context"
|
|
"git.aiterp.net/rpdata/api/models"
|
|
)
|
|
|
|
type PostRepository interface {
|
|
Find(ctx context.Context, id string) (*models.Post, error)
|
|
List(ctx context.Context, filter models.PostFilter) ([]*models.Post, error)
|
|
Insert(ctx context.Context, post models.Post) (*models.Post, error)
|
|
InsertMany(ctx context.Context, posts ...*models.Post) ([]*models.Post, error)
|
|
Update(ctx context.Context, post models.Post, update models.PostUpdate) (*models.Post, error)
|
|
Move(ctx context.Context, post models.Post, position int) ([]*models.Post, error)
|
|
Delete(ctx context.Context, post models.Post) error
|
|
}
|