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.

15 lines
607 B

  1. package repositories
  2. import (
  3. "context"
  4. "git.aiterp.net/rpdata/api/models"
  5. )
  6. type ChapterRepository interface {
  7. Find(ctx context.Context, id string) (*models.Chapter, error)
  8. List(ctx context.Context, filter models.ChapterFilter) ([]*models.Chapter, error)
  9. Insert(ctx context.Context, chapter models.Chapter) (*models.Chapter, error)
  10. Update(ctx context.Context, chapter models.Chapter, update models.ChapterUpdate) (*models.Chapter, error)
  11. Move(ctx context.Context, chapter models.Chapter, from, to models.Story) (*models.Chapter, error)
  12. Delete(ctx context.Context, chapter models.Chapter) error
  13. }