elasticsearch

package
v0.0.0-...-e7e71ae Latest Latest
Warning

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

Go to latest
Published: May 13, 2019 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorUnexpectedStatusCode = errors.New("unexpected status code from elasticsearch api")

ErrorUnexpectedStatusCode represents the error message to be returned when the status received from elastic is not as expected

Functions

func CallElastic

func CallElastic(ctx context.Context, path, method string, payload interface{}) ([]byte, int, error)

CallElastic builds a request to elastic search based on the method, path and payload

func DeleteIndex

func DeleteIndex(path string) (int, error)

DeleteIndex removes a specified index from elasticsearch

Types

type Dimension

type Dimension struct {
	Code             string `json:"code"`
	HasData          bool   `json:"has_data"`
	Label            string `json:"label"`
	NumberOfChildren int    `json:"number_of_children"`
	URL              string `json:"url"`
}

Dimension represents the data stored in an elasticsearch document

type Index

type Index struct {
	InstanceID   string
	Dimension    string
	TestDataFile string
	URL          string
	MappingsFile string
}

func (*Index) CreateSearchIndex

func (i *Index) CreateSearchIndex() error

CreateSearchIndex represents the creation and loading of test data into an index for testing

Jump to

Keyboard shortcuts

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