Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlogData ¶
type BlogData struct { FeedURL string Author string Title string Description string Rating rating.Rating Level level.Level Tags []tag.Tag QuickNote string }
BlogData is the data for saving blogs.
type FetchData ¶
type FetchData struct { Rating rating.Rating Level level.Level Tags []tag.Tag Count uint32 After *primitive.ObjectID }
FetchData represents data for fetching.
type Repo ¶
type Repo interface { Save(ctx context.Context, userID uuid.UUID, data *BlogData) (primitive.ObjectID, error) Fetch(ctx context.Context, userID uuid.UUID, data *FetchData) ([]model.Blog, error) }
Repo is an abstraction for the blog repository.
func UseCollection ¶
func UseCollection(coll *mongo.Collection) Repo
UseCollection returns Repo wich uses the given collection.
Click to show internal directories.
Click to hide internal directories.