models

package
v4.6.3 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 0 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DocV6 added in v4.3.0

type DocV6 struct {
	Properties map[string]interface{} `json:"properties"`
}

Doc is contained in the templateMapping

type Document

type Document struct {
	ID        string                 `json:"id"`
	Index     string                 `json:"index"`
	IndexType string                 `json:"type"`
	Source    map[string]interface{} `json:"source"`
}

Document represent an es document

func NewDocument

func NewDocument(id string, index string, indexType string, source map[string]interface{}) *Document

NewDocument Construct a new Document

type TemplateMappingV6 added in v4.3.0

type TemplateMappingV6 struct {
	Document DocV6 `json:"document"`
}

TemplateMapping embedded in template

type TemplateV6 added in v4.3.0

type TemplateV6 struct {
	IndexPatterns []string               `json:"index_patterns"` // Keep the snake_case for elasticsearch template generation
	Settings      map[string]interface{} `json:"settings,omitempty"`
	Mappings      TemplateMappingV6      `json:"mappings,omitempty"`
}

Template is the ES template

func NewTemplateV6 added in v4.3.0

func NewTemplateV6(indexPatterns []string, mapping map[string]interface{}, settings map[string]interface{}) *TemplateV6

NewTemplate constructor the ES template

Jump to

Keyboard shortcuts

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