Documentation ¶
Overview ¶
common contains models that are common to ES operations
Index ¶
- func NewClient(conf config.ElasticsearchClient) (*elasticsearch.Client, error)
- type DocumentID
- type ElasticsearchErr
- type EsBulkResponse
- type EsBulkResponseItem
- type EsBulkResponseItemInfo
- type EsCountResponse
- type EsCreateResponse
- type EsUpdateResponse
- type IndexName
- type JsonSerdesErr
- type PersistedMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
func NewClient(conf config.ElasticsearchClient) (*elasticsearch.Client, error)
NewClient returns a configured elasticsearch.Client based on the given conf
Types ¶
type DocumentID ¶
type DocumentID string
type ElasticsearchErr ¶
type ElasticsearchErr struct {
Underlying error
}
func UnexpectedEsStatusError ¶
func UnexpectedEsStatusError(rawResp *esapi.Response) ElasticsearchErr
func (ElasticsearchErr) Error ¶
func (e ElasticsearchErr) Error() string
func (ElasticsearchErr) Unwrap ¶
func (e ElasticsearchErr) Unwrap() error
type EsBulkResponse ¶
type EsBulkResponse struct { Took uint `json:"took"` Errors bool `json:"errors"` Items []EsBulkResponseItem `json:"items"` }
type EsBulkResponseItem ¶
type EsBulkResponseItem struct { Index *EsBulkResponseItemInfo `json:"index"` Delete *EsBulkResponseItemInfo `json:"delete"` Create *EsBulkResponseItemInfo `json:"create"` Update *EsBulkResponseItemInfo `json:"update"` }
func (*EsBulkResponseItem) Info ¶
func (i *EsBulkResponseItem) Info() EsBulkResponseItemInfo
type EsBulkResponseItemInfo ¶
type EsBulkResponseItemInfo struct { Index string `json:"_index"` ID string `json:"_id"` SeqNum uint64 `json:"_seq_no"` PrimaryTerm uint64 `json:"_primary_term"` Result string `json:"result"` Status uint `json:"status"` }
func (*EsBulkResponseItemInfo) IsOk ¶
func (i *EsBulkResponseItemInfo) IsOk() bool
func (*EsBulkResponseItemInfo) Version ¶
func (i *EsBulkResponseItemInfo) Version() metadata.Version
type EsCountResponse ¶
type EsCountResponse struct {
Count uint `json:"count"`
}
type EsCreateResponse ¶
type EsCreateResponse struct { ID string `json:"_id"` SeqNum uint64 `json:"_seq_no"` PrimaryTerm uint64 `json:"_primary_term"` }
func (*EsCreateResponse) Version ¶
func (r *EsCreateResponse) Version() metadata.Version
type EsUpdateResponse ¶
type EsUpdateResponse struct { Index string `json:"_index"` ID string `json:"_id"` SeqNum uint64 `json:"_seq_no"` PrimaryTerm uint64 `json:"_primary_term"` Result string `json:"result"` }
func (*EsUpdateResponse) Version ¶
func (r *EsUpdateResponse) Version() metadata.Version
type JsonSerdesErr ¶
type JsonSerdesErr struct {
Underlying []error
}
func (JsonSerdesErr) Error ¶
func (e JsonSerdesErr) Error() string
func (JsonSerdesErr) Unwrap ¶
func (e JsonSerdesErr) Unwrap() error
Click to show internal directories.
Click to hide internal directories.