Documentation ¶
Index ¶
- type ElasticClient
- func (ec *ElasticClient) Create(indexname string, indextype string, jsondata interface{}) (string, error)
- func (ec *ElasticClient) CreateIndex(index string, mapping string)
- func (ec *ElasticClient) Delete(indexname string, indextype string, id string) error
- func (ec *ElasticClient) DeleteIndex(index string) error
- func (ec *ElasticClient) Get(indexname string, indextype string, id string) (*elastic.GetResult, error)
- func (ec *ElasticClient) GetContext() context.Context
- func (ec *ElasticClient) IndexExists(index string) *elastic.IndicesExistsService
- func (ec *ElasticClient) InitAllMappings()
- func (ec *ElasticClient) Search(indexname string) *elastic.SearchResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ElasticClient ¶
type ElasticClient struct {
// contains filtered or unexported fields
}
ElasticClient ....
func CreateClient ¶
func CreateClient(config saconfig.EventConfiguration) (*ElasticClient, error)
CreateClient ....
func (*ElasticClient) Create ¶
func (ec *ElasticClient) Create(indexname string, indextype string, jsondata interface{}) (string, error)
Create ... it can be BodyJson or BodyString.. BodyJson needs struct defined
func (*ElasticClient) CreateIndex ¶
func (ec *ElasticClient) CreateIndex(index string, mapping string)
CreateIndex ...
func (*ElasticClient) Delete ¶
func (ec *ElasticClient) Delete(indexname string, indextype string, id string) error
Delete ....
func (*ElasticClient) DeleteIndex ¶
func (ec *ElasticClient) DeleteIndex(index string) error
DeleteIndex ...
func (*ElasticClient) Get ¶
func (ec *ElasticClient) Get(indexname string, indextype string, id string) (*elastic.GetResult, error)
Get ....
func (*ElasticClient) GetContext ¶
func (ec *ElasticClient) GetContext() context.Context
GetContext ...
func (*ElasticClient) IndexExists ¶
func (ec *ElasticClient) IndexExists(index string) *elastic.IndicesExistsService
IndexExists ...
func (*ElasticClient) InitAllMappings ¶
func (ec *ElasticClient) InitAllMappings()
InitAllMappings removes all indices with prefixes used by smart-gateway
func (*ElasticClient) Search ¶
func (ec *ElasticClient) Search(indexname string) *elastic.SearchResult
Search ..
Click to show internal directories.
Click to hide internal directories.