Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ESClient ¶
type ESClient interface { LoadJSON(path string, json map[string]interface{}) ([]byte, error) Request(method, path string, pipeline string, params map[string]string, body interface{}) (int, []byte, error) GetVersion() string }
TemplateLoader is a subset of the Elasticsearch client API capable of loading the template.
type Field ¶
type Field struct { Name string `config:"name"` Type string `config:"type"` Description string `config:"description"` Format string `config:"format"` ScalingFactor int `config:"scaling_factor"` Fields Fields `config:"fields"` ObjectType string `config:"object_type"` // contains filtered or unexported fields }
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
func (*Loader) CheckTemplate ¶
CheckTemplate checks if a given template already exist. It returns true if and only if Elasticsearch returns with HTTP status code 200.
func (*Loader) Load ¶
loadTemplate checks if the index mapping template should be loaded In case the template is not already loaded or overwriting is enabled, the template is written to index
func (*Loader) LoadTemplate ¶
LoadTemplate loads a template into Elasticsearch overwriting the existing template if it exists. If you wish to not overwrite an existing template then use CheckTemplate prior to calling this method.
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
type TemplateConfig ¶
type Version ¶
type Version struct {
// contains filtered or unexported fields
}
func NewVersion ¶
NewVersion expects a string in the format: major.minor.bugfix(-meta)