Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Repository ¶
type Repository interface { // Create creates a new story. Create(story models.Story) (models.Story, error) // Get gets a story by ID. Get(id string) (models.Story, error) // Delete deletes a story by ID. Update(id string, story models.Story) (models.Story, error) }
func NewRepository ¶
func NewRepository(collection *mongo.Collection) Repository
NewRepository creates a new story repository.
Click to show internal directories.
Click to hide internal directories.