Versions in this module Expand all Collapse all v1 v1.1.3 Feb 8, 2022 v1.1.2 Feb 8, 2022 v1.1.1 Feb 8, 2022 v1.0.0 Feb 8, 2022 Changes in this version + const ActionCreate + const ActionDelete + const ActionIndex + const ActionUpdate + type BulkRequest struct + Action string + Data map[string]interface{} + ID string + Index string + Parent string + Pipeline string + Type string + type BulkResponse struct + Code int + Errors bool + Items []map[string]*BulkResponseItem + Took int + type BulkResponseItem struct + Error json.RawMessage + Found bool + ID string + Index string + Status int + Type string + Version int + type Client struct + Addr string + Password string + Protocol string + User string + func NewClient(conf *ClientConfig) *Client + func (c *Client) Bulk(items []*BulkRequest) (*BulkResponse, error) + func (c *Client) CreateMapping(index string, docType string, mapping map[string]interface{}) error + func (c *Client) Delete(index string, docType string, id string) error + func (c *Client) DeleteIndex(index string) error + func (c *Client) Do(method string, url string, body map[string]interface{}) (*Response, error) + func (c *Client) DoBulk(url string, items []*BulkRequest) (*BulkResponse, error) + func (c *Client) DoRequest(method string, url string, body *bytes.Buffer) (*http.Response, error) + func (c *Client) Exists(index string, docType string, id string) (bool, error) + func (c *Client) Get(index string, docType string, id string) (*Response, error) + func (c *Client) GetMapping(index string, docType string) (*MappingResponse, error) + func (c *Client) IndexBulk(index string, items []*BulkRequest) (*BulkResponse, error) + func (c *Client) IndexTypeBulk(index string, docType string, items []*BulkRequest) (*BulkResponse, error) + func (c *Client) Update(index string, docType string, id string, data map[string]interface{}) error + type ClientConfig struct + Addr string + HTTPS bool + Password string + User string + type Mapping map[string]struct + type MappingResponse struct + Code int + Mapping Mapping + type Response struct + Code int + type ResponseItem struct + Found bool + ID string + Index string + Source map[string]interface{} + Type string + Version int