Documentation
¶
Index ¶
- type Client
- func (dbc *Client) CreateDocument(indexName, typeName, document string, documentID string) (result *ElasticSearchDocument, err error)
- func (dbc *Client) CreateIndex(indexName, options string) (*IndexRecord, error)
- func (dbc *Client) CreateType(indexName, typeName, options string) (*TypeRecord, error)
- func (dbc *Client) DeleteDocument(indexName, typeName string, documentID string) (*ElasticSearchDocument, error)
- func (dbc *Client) FindIndices(indexPattern string) ([]string, error)
- func (dbc *Client) FindTypes(index, typePattern string) ([]string, error)
- func (dbc *Client) GetDocument(indexName, typeName string, documentID string) (*ElasticSearchDocument, error)
- func (dbc *Client) GetIndex(indexName string) (*IndexRecord, error)
- func (dbc *Client) GetType(indexName, typeName string) (*TypeRecord, error)
- func (dbc *Client) InitializeSchema() error
- func (dbc *Client) IsDocumentExists(indexName, typeName string, documentID string) (bool, error)
- func (dbc *Client) NewQuery(indexName, typeName string) *Query
- func (dbc *Client) ProcessSearchQuery(indexName, typeName string, query *Query) ([]ElasticSearchDocument, error)
- func (dbc *Client) UpdateDocument(indexName, typeName, document string, documentID string) (result *ElasticSearchDocument, err error)
- func (dbc *Client) UpdateTypeOptions(indexName, typeName, options string) (*TypeRecord, error)
- type ElasticSearchDocument
- type IndexRecord
- type Query
- type TypeRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a database client connection
func CreateClient ¶
func CreateClient(config utils.PostgresConnectionConfig) (result *Client)
CreateClient creates an instance of Client with specified parameters Doesn't check connection to DB server
func (*Client) CreateDocument ¶
func (dbc *Client) CreateDocument(indexName, typeName, document string, documentID string) (result *ElasticSearchDocument, err error)
CreateDocument creates a new document in database
func (*Client) CreateIndex ¶
func (dbc *Client) CreateIndex(indexName, options string) (*IndexRecord, error)
CreateIndex creates an index record with specified options
func (*Client) CreateType ¶
func (dbc *Client) CreateType(indexName, typeName, options string) (*TypeRecord, error)
CreateType creates a type record with specified options
func (*Client) DeleteDocument ¶
func (dbc *Client) DeleteDocument(indexName, typeName string, documentID string) (*ElasticSearchDocument, error)
DeleteDocument deletes existing document in database
func (*Client) FindIndices ¶
FindIndices searches for indicies using name pattern in ElasticSearch wildcard format
func (*Client) FindTypes ¶
FindTypes searches for indicies using name pattern in ElasticSearch wildcard format
func (*Client) GetDocument ¶
func (dbc *Client) GetDocument(indexName, typeName string, documentID string) (*ElasticSearchDocument, error)
GetDocument gets document specified by index, type, and ID
func (*Client) GetIndex ¶
func (dbc *Client) GetIndex(indexName string) (*IndexRecord, error)
GetIndex gets an instance of existing index
func (*Client) GetType ¶
func (dbc *Client) GetType(indexName, typeName string) (*TypeRecord, error)
GetType gets an instance of existing type
func (*Client) InitializeSchema ¶
InitializeSchema initializes system tables used by pg_elastic Doesn't affect existing tables
func (*Client) IsDocumentExists ¶
IsDocumentExists checkes for document existence in database
func (*Client) ProcessSearchQuery ¶
func (dbc *Client) ProcessSearchQuery(indexName, typeName string, query *Query) ([]ElasticSearchDocument, error)
ProcessSearchQuery does a processing of ElasticSearch-format query
func (*Client) UpdateDocument ¶
func (dbc *Client) UpdateDocument(indexName, typeName, document string, documentID string) (result *ElasticSearchDocument, err error)
UpdateDocument updates existing document in database
func (*Client) UpdateTypeOptions ¶
func (dbc *Client) UpdateTypeOptions(indexName, typeName, options string) (*TypeRecord, error)
UpdateTypeOptions updates options for exiting type
type ElasticSearchDocument ¶
ElasticSearchDocument represents ElasticSearch document stored in database
type IndexRecord ¶
IndexRecord contains information about index stored in database
type Query ¶
Query is alias for orm.Query type. Used to implement other packages of the project without linking it to pg/orm
type TypeRecord ¶
TypeRecord contains information about type stored in database