Documentation ¶
Index ¶
- func GormConn(dsn string) *gorm.DB
- type ElasticsearchClient
- func (es *ElasticsearchClient) CountDocuments(index, query string) ([]byte, error)
- func (es *ElasticsearchClient) CreateDocument(index, id, body string) error
- func (es *ElasticsearchClient) CreateIndex(index, indexSettings string) error
- func (es *ElasticsearchClient) DeleteDocument(index, id string) error
- func (es *ElasticsearchClient) GetDocument(index, id string) (string, error)
- func (es *ElasticsearchClient) SearchDocuments(index, query string) ([]byte, error)
- func (es *ElasticsearchClient) UpdateDocument(index, id, body string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ElasticsearchClient ¶
type ElasticsearchClient struct {
Client *elasticsearch.Client
}
func NewElasticsearchClient ¶
func NewElasticsearchClient(dsn string) (*ElasticsearchClient, error)
func (*ElasticsearchClient) CountDocuments ¶
func (es *ElasticsearchClient) CountDocuments(index, query string) ([]byte, error)
func (*ElasticsearchClient) CreateDocument ¶
func (es *ElasticsearchClient) CreateDocument(index, id, body string) error
func (*ElasticsearchClient) CreateIndex ¶
func (es *ElasticsearchClient) CreateIndex(index, indexSettings string) error
func (*ElasticsearchClient) DeleteDocument ¶
func (es *ElasticsearchClient) DeleteDocument(index, id string) error
func (*ElasticsearchClient) GetDocument ¶
func (es *ElasticsearchClient) GetDocument(index, id string) (string, error)
func (*ElasticsearchClient) SearchDocuments ¶
func (es *ElasticsearchClient) SearchDocuments(index, query string) ([]byte, error)
func (*ElasticsearchClient) UpdateDocument ¶
func (es *ElasticsearchClient) UpdateDocument(index, id, body string) error
Click to show internal directories.
Click to hide internal directories.