Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handlers ¶
type Handlers interface { FindOne() gin.HandlerFunc UpdatedWithNewArticle() gin.HandlerFunc }
type Repository ¶
type Repository interface { Create(ctx context.Context, article *models.Article) (*mongo.InsertOneResult, error) Upsert(ctx context.Context, article *models.Article) (*mongo.UpdateResult, error) FindByAid(ctx context.Context, aid int) (*models.Article, error) Find(ctx context.Context, filter interface{}) ([]*models.Article, error) FindOne(ctx context.Context, filter interface{}) (*models.Article, error) UpdateOne(ctx context.Context, filter interface{}, update interface{}) (*mongo.UpdateResult, error) FindOneAndUpdate(ctx context.Context, filter interface{}, update interface{}) (*models.Article, error) }
Click to show internal directories.
Click to hide internal directories.