db

package
v0.0.0-...-a3ef211 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GormConn

func GormConn(dsn string) *gorm.DB

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL