elasticsearch

package
v0.0.0-...-b696ed4 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: MIT Imports: 7 Imported by: 0

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

Jump to

Keyboard shortcuts

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