Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ElasticHandler ¶
type ElasticHandler interface { GetArticles(ctx context.Context, req entity.GetArticlesRequest) ([]entity.ArticleResponse, error) GetArticleDetails(ctx context.Context, query elastic.Query) (entity.ArticleResponse, error) InsertArticle(ctx context.Context, article entity.ArticleResponse) error UpdateArticle(ctx context.Context, article entity.ArticleResponse) error DeleteArticle(ctx context.Context, req entity.DeleteArticleRequest) error GetCategoryTree(ctx context.Context, req entity.GetCategoriesRequest) ([]entity.Category, error) GetCategoryDetails(ctx context.Context, query elastic.Query) (entity.Category, error) InsertCategory(ctx context.Context, category entity.InsertCategoryRequest) error UpdateCategory(ctx context.Context, category entity.UpdateCategoryRequest) error DeleteCategory(ctx context.Context, req entity.DeleteCategoryRequest) error }
func NewElasticRepository ¶
func NewElasticRepository(es *elastic.Client, cfg config.ElasticConfig) ElasticHandler
Click to show internal directories.
Click to hide internal directories.