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
627 B

  1. package repositories
  2. import (
  3. "context"
  4. "git.aiterp.net/rpdata/api/models"
  5. )
  6. type StoryRepository interface {
  7. Find(ctx context.Context, id string) (*models.Story, error)
  8. List(ctx context.Context, filter models.StoryFilter) ([]*models.Story, error)
  9. Insert(ctx context.Context, story models.Story) (*models.Story, error)
  10. Update(ctx context.Context, story models.Story, update models.StoryUpdate) (*models.Story, error)
  11. AddTag(ctx context.Context, story models.Story, tag models.Tag) error
  12. RemoveTag(ctx context.Context, story models.Story, tag models.Tag) error
  13. Delete(ctx context.Context, story models.Story) error
  14. }