Documentation ¶
Index ¶
- func CreateIndexName(aliasName string) string
- func ResolveAliasName(prefix string, mappingName string) string
- type Client
- type MockClient
- func (mc *MockClient) AliasExist(aliasName string) (bool, error)
- func (mc *MockClient) CreateAlias(aliasName string, indexName string) error
- func (mc *MockClient) CreateIndex(indexName string, mapping configuration.Index) error
- func (mc *MockClient) GetAliasedIndex(aliasName string) (string, error)
- func (mc *MockClient) GetIndexConfiguration(indexName string) (configuration.Index, error)
- func (mc *MockClient) IndexExist(indexName string) (bool, error)
- func (mc *MockClient) Reindex(sourceIndexName string, targetIndexName string) error
- func (mc *MockClient) UpdateAlias(aliasName string, newIndexName string) error
- func (mc *MockClient) UpdateIndexConfiguration(indexName string, configuration configuration.Index) error
- type Options
- type V6Client
- func (c *V6Client) AliasExist(aliasName string) (bool, error)
- func (c *V6Client) CreateAlias(aliasName string, indexName string) error
- func (c *V6Client) CreateIndex(indexName string, mapping configuration.Index) error
- func (c *V6Client) GetAliasedIndex(aliasName string) (string, error)
- func (c *V6Client) GetIndexConfiguration(indexName string) (configuration.Index, error)
- func (c *V6Client) IndexExist(indexName string) (bool, error)
- func (c *V6Client) Reindex(sourceIndexName string, targetIndexName string) error
- func (c *V6Client) UpdateAlias(aliasName string, indexName string) error
- func (c *V6Client) UpdateIndexConfiguration(indexName string, configuration configuration.Index) error
- type V7Client
- func (c *V7Client) AliasExist(aliasName string) (bool, error)
- func (c *V7Client) CreateAlias(aliasName string, indexName string) error
- func (c *V7Client) CreateIndex(indexName string, mapping configuration.Index) error
- func (c *V7Client) GetAliasedIndex(aliasName string) (string, error)
- func (c *V7Client) GetIndexConfiguration(indexName string) (configuration.Index, error)
- func (c *V7Client) IndexExist(indexName string) (bool, error)
- func (c *V7Client) Reindex(sourceIndexName string, targetIndexName string) error
- func (c *V7Client) UpdateAlias(aliasName string, indexName string) error
- func (c *V7Client) UpdateIndexConfiguration(indexName string, configuration configuration.Index) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateIndexName ¶
func ResolveAliasName ¶
Types ¶
type Client ¶
type Client interface { IndexExist(indexName string) (bool, error) AliasExist(aliasName string) (bool, error) CreateIndex(indexName string, mapping configuration.Index) error CreateAlias(aliasName string, indexName string) error UpdateAlias(aliasName string, newIndexName string) error GetAliasedIndex(aliasName string) (string, error) GetIndexConfiguration(indexName string) (configuration.Index, error) UpdateIndexConfiguration(indexName string, configuration configuration.Index) error Reindex(sourceIndexName string, targetIndexName string) error }
Client is an Elasticsearch client. Create one by calling New.
type MockClient ¶
func NewMockClient ¶
func NewMockClient() *MockClient
func (*MockClient) AliasExist ¶
func (mc *MockClient) AliasExist(aliasName string) (bool, error)
func (*MockClient) CreateAlias ¶
func (mc *MockClient) CreateAlias(aliasName string, indexName string) error
func (*MockClient) CreateIndex ¶
func (mc *MockClient) CreateIndex(indexName string, mapping configuration.Index) error
func (*MockClient) GetAliasedIndex ¶
func (mc *MockClient) GetAliasedIndex(aliasName string) (string, error)
func (*MockClient) GetIndexConfiguration ¶
func (mc *MockClient) GetIndexConfiguration(indexName string) (configuration.Index, error)
func (*MockClient) IndexExist ¶
func (mc *MockClient) IndexExist(indexName string) (bool, error)
func (*MockClient) Reindex ¶
func (mc *MockClient) Reindex(sourceIndexName string, targetIndexName string) error
func (*MockClient) UpdateAlias ¶
func (mc *MockClient) UpdateAlias(aliasName string, newIndexName string) error
func (*MockClient) UpdateIndexConfiguration ¶
func (mc *MockClient) UpdateIndexConfiguration(indexName string, configuration configuration.Index) error
type V6Client ¶
type V6Client struct {
// contains filtered or unexported fields
}
V6Client is an Elasticsearch client for elasticsearch v6. Create one by calling NewV6Client.
func NewV6Client ¶
NewV6Client creates a V6Client instance.
func (*V6Client) CreateAlias ¶
func (*V6Client) CreateIndex ¶
func (c *V6Client) CreateIndex(indexName string, mapping configuration.Index) error
func (*V6Client) GetAliasedIndex ¶
func (*V6Client) GetIndexConfiguration ¶
func (c *V6Client) GetIndexConfiguration(indexName string) (configuration.Index, error)
func (*V6Client) UpdateAlias ¶
func (*V6Client) UpdateIndexConfiguration ¶
func (c *V6Client) UpdateIndexConfiguration(indexName string, configuration configuration.Index) error
type V7Client ¶
type V7Client struct {
// contains filtered or unexported fields
}
V7Client is an Elasticsearch client for elasticsearch v6. Create one by calling NewV7Client.
func NewV7Client ¶
NewV7Client creates a V6Client instance.
func (*V7Client) CreateAlias ¶
func (*V7Client) CreateIndex ¶
func (c *V7Client) CreateIndex(indexName string, mapping configuration.Index) error
func (*V7Client) GetAliasedIndex ¶
func (*V7Client) GetIndexConfiguration ¶
func (c *V7Client) GetIndexConfiguration(indexName string) (configuration.Index, error)
func (*V7Client) UpdateAlias ¶
func (*V7Client) UpdateIndexConfiguration ¶
func (c *V7Client) UpdateIndexConfiguration(indexName string, configuration configuration.Index) error
Click to show internal directories.
Click to hide internal directories.