es

package
v0.0.0-...-e7367dc Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRepository

func NewRepository(es *elasticsearch.Client) repo.Repository

Types

type Document

type Document struct {
	Title string  `json:"title"`
	Brand string  `json:"brand"`
	Price float32 `json:"price"`
	Stock int     `json:"stock"`
}

type Hit

type Hit struct {
	ID     string   `json:"_id"`
	Source Document `json:"_source"`
}

type Hits

type Hits struct {
	Hits  []Hit `json:"hits"`
	Total Total `json:"total"`
}

type Mapper

type Mapper interface {
	// contains filtered or unexported methods
}

type Result

type Result struct {
	Hits Hits `json:"hits"`
}

type Total

type Total struct {
	Value int `json:"value"`
}

type Update

type Update struct {
	Doc *Document `json:"doc"`
}

Jump to

Keyboard shortcuts

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