client

package
v0.0.0-...-7871ec4 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2019 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Client, _ = elastic.NewClient(
	elastic.SetURL("http://localhost:9200"),
	elastic.SetHealthcheckInterval(10*time.Second),
)

Client is being called by the main.go every time the app is being started

View Source
var NewMapping string

NewMapping lets you add mapping

Functions

func AddDocument

func AddDocument()

AddDocument lets you add a document to a given index

func AddIndex

func AddIndex()

AddIndex lets you add a new index

func AddMapping

func AddMapping()

AddMapping lets you add mapping

func DeleteDocument

func DeleteDocument()

DeleteDocument lets you delete a document from a given index

func DeleteIndex

func DeleteIndex()

DeleteIndex lets you delete an Index

func GetDocument

func GetDocument()

GetDocument lets you read documents from an index

func GetNewClient

func GetNewClient()

GetNewClient will throw error message if there is any, during the call of NewClient

func IndexExist

func IndexExist()

IndexExist checks if an index is already there

func UpdateDocument

func UpdateDocument()

UpdateDocument lets you update a specific document in a given index

func UpdateMapping

func UpdateMapping()

UpdateMapping lets you update the mapping of a given index

Types

type TestEntry

type TestEntry struct {
	Fach  string `json:"Fach"`
	Stoff string `json:"Thema"`
	Wann  string `json:"Wann"`
}

type TestUpdate

type TestUpdate struct {
	Fach  string `json:"Fach"`
	Stoff string `json:"Thema"`
	Wann  string `json:"Wann"`
}

Jump to

Keyboard shortcuts

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