articles

package
v0.0.0-...-cbf5b65 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2023 License: MIT Imports: 5 Imported by: 0

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)
}

type UseCase

type UseCase interface {
	FindOne(ctx context.Context) (*models.Article, error)
	UpdatedWithNewArticle(ctx context.Context) (*types.UpdatedWithNewArticleResponse, error)
	AddNewSubscriber(ctx context.Context, id string) error
	RemoveSubscriber(ctx context.Context, id string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL