GraphQL API and utilities for the rpdata project
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

  1. package repositories
  2. import (
  3. "context"
  4. "git.aiterp.net/rpdata/api/models"
  5. )
  6. type PostRepository interface {
  7. Find(ctx context.Context, id string) (*models.Post, error)
  8. List(ctx context.Context, filter models.PostFilter) ([]*models.Post, error)
  9. Insert(ctx context.Context, post models.Post) (*models.Post, error)
  10. InsertMany(ctx context.Context, posts ...*models.Post) ([]*models.Post, error)
  11. Update(ctx context.Context, post models.Post, update models.PostUpdate) (*models.Post, error)
  12. Move(ctx context.Context, post models.Post, position int) ([]*models.Post, error)
  13. Delete(ctx context.Context, post models.Post) error
  14. }