Documentation ¶
Index ¶
- type Client
- type ESClient
- type ESIndexService
- func (i ESIndexService) BodyJson(body interface{}) IndexService
- func (i ESIndexService) Do(ctx context.Context) (*elastic.IndexResponse, error)
- func (i ESIndexService) Id(id string) IndexService
- func (i ESIndexService) Index(index string) IndexService
- func (i ESIndexService) Type(typ string) IndexService
- type ESIndicesCreateService
- type ESIndicesExistsService
- type ESSearchService
- func (s ESSearchService) Aggregation(name string, aggregation elastic.Aggregation) SearchService
- func (s ESSearchService) Do(ctx context.Context) (*elastic.SearchResult, error)
- func (s ESSearchService) Query(query elastic.Query) SearchService
- func (s ESSearchService) Size(size int) SearchService
- func (s ESSearchService) Type(typ string) SearchService
- type IndexService
- type IndicesCreateService
- type IndicesExistsService
- type SearchService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { IndexExists(index string) IndicesExistsService CreateIndex(index string) IndicesCreateService Index() IndexService Search(indices ...string) SearchService }
Client is an abstraction for elastic.Client
type ESClient ¶
type ESClient struct {
// contains filtered or unexported fields
}
ESClient is a wrapper around elastic.Client
func WrapESClient ¶
WrapESClient creates a ESClient out of *elastic.Client.
func (ESClient) CreateIndex ¶
func (c ESClient) CreateIndex(index string) IndicesCreateService
CreateIndex calls this function to internal client.
func (ESClient) Index ¶
func (c ESClient) Index() IndexService
Index calls this function to internal client.
func (ESClient) IndexExists ¶
func (c ESClient) IndexExists(index string) IndicesExistsService
IndexExists calls this function to internal client.
func (ESClient) Search ¶
func (c ESClient) Search(indices ...string) SearchService
Search calls this function to internal client.
type ESIndexService ¶
type ESIndexService struct {
// contains filtered or unexported fields
}
ESIndexService is a wrapper around elastic.ESIndexService
func WrapESIndexService ¶
func WrapESIndexService(indexService *elastic.IndexService) ESIndexService
WrapESIndexService creates an ESIndexService out of *elastic.ESIndexService.
func (ESIndexService) BodyJson ¶
func (i ESIndexService) BodyJson(body interface{}) IndexService
BodyJson calls this function to internal service.
func (ESIndexService) Do ¶
func (i ESIndexService) Do(ctx context.Context) (*elastic.IndexResponse, error)
Do calls this function to internal service.
func (ESIndexService) Id ¶
func (i ESIndexService) Id(id string) IndexService
Id calls this function to internal service.
func (ESIndexService) Index ¶
func (i ESIndexService) Index(index string) IndexService
Index calls this function to internal service.
func (ESIndexService) Type ¶
func (i ESIndexService) Type(typ string) IndexService
Type calls this function to internal service.
type ESIndicesCreateService ¶
type ESIndicesCreateService struct {
// contains filtered or unexported fields
}
ESIndicesCreateService is a wrapper around elastic.IndicesCreateService
func WrapESIndicesCreateService ¶
func WrapESIndicesCreateService(indicesCreateService *elastic.IndicesCreateService) ESIndicesCreateService
WrapESIndicesCreateService creates an ESIndicesCreateService out of *elastic.IndicesCreateService.
func (ESIndicesCreateService) Body ¶
func (c ESIndicesCreateService) Body(mapping string) IndicesCreateService
Body calls this function to internal service.
func (ESIndicesCreateService) Do ¶
func (c ESIndicesCreateService) Do(ctx context.Context) (*elastic.IndicesCreateResult, error)
Do calls this function to internal service.
type ESIndicesExistsService ¶
type ESIndicesExistsService struct {
// contains filtered or unexported fields
}
ESIndicesExistsService is a wrapper around elastic.IndicesExistsService
func WrapESIndicesExistsService ¶
func WrapESIndicesExistsService(indicesExistsService *elastic.IndicesExistsService) ESIndicesExistsService
WrapESIndicesExistsService creates an ESIndicesExistsService out of *elastic.IndicesExistsService.
type ESSearchService ¶
type ESSearchService struct {
// contains filtered or unexported fields
}
ESSearchService is a wrapper around elastic.ESSearchService
func WrapESSearchService ¶
func WrapESSearchService(searchService *elastic.SearchService) ESSearchService
WrapESSearchService creates an ESSearchService out of *elastic.ESSearchService.
func (ESSearchService) Aggregation ¶
func (s ESSearchService) Aggregation(name string, aggregation elastic.Aggregation) SearchService
Aggregation calls this function to internal service.
func (ESSearchService) Do ¶
func (s ESSearchService) Do(ctx context.Context) (*elastic.SearchResult, error)
Do calls this function to internal service.
func (ESSearchService) Query ¶
func (s ESSearchService) Query(query elastic.Query) SearchService
Query calls this function to internal service.
func (ESSearchService) Size ¶
func (s ESSearchService) Size(size int) SearchService
Size calls this function to internal service.
func (ESSearchService) Type ¶
func (s ESSearchService) Type(typ string) SearchService
Type calls this function to internal service.
type IndexService ¶
type IndexService interface { Index(index string) IndexService Type(typ string) IndexService Id(id string) IndexService BodyJson(body interface{}) IndexService Do(ctx context.Context) (*elastic.IndexResponse, error) }
IndexService is an abstraction for elastic.IndexService
type IndicesCreateService ¶
type IndicesCreateService interface { Body(mapping string) IndicesCreateService Do(ctx context.Context) (*elastic.IndicesCreateResult, error) }
IndicesCreateService is an abstraction for elastic.IndicesCreateService
type IndicesExistsService ¶
IndicesExistsService is an abstraction for elastic.IndicesExistsService
type SearchService ¶
type SearchService interface { Type(typ string) SearchService Size(size int) SearchService Aggregation(name string, aggregation elastic.Aggregation) SearchService Query(query elastic.Query) SearchService Do(ctx context.Context) (*elastic.SearchResult, error) }
SearchService is an abstraction for elastic.SearchService