repository

package
v0.0.0-...-c41dffb Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 License: MIT Imports: 15 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg config.Config, log *logrus.Logger) error

New creates a repository

Types

type Elasticsearch

type Elasticsearch struct {
	Type      string
	URL       string
	Username  string
	Password  string
	Mappings  map[string]string
	Index     elastic.Client
	IndexName string
	TypeName  string
}

Elasticsearch provides an object model for repository.

func Open

func Open(cfg config.Config, log *logrus.Logger) (Elasticsearch, error)

Open loads a repository

func (*Elasticsearch) Delete

func (r *Elasticsearch) Delete() bool

Delete deletes a record from the repository

func (*Elasticsearch) Get

func (r *Elasticsearch) Get(identifiers []string, sr *search.Results) error

Get gets specified metadata records from the repository

func (*Elasticsearch) Insert

func (r *Elasticsearch) Insert(record metadata.Record) error

Insert inserts a record into the repository

func (*Elasticsearch) Query

func (r *Elasticsearch) Query(collections []string, term string, bbox []float64, timeVal []time.Time, from int, size int, sr *search.Results) error

Query performs a search against the repository

func (*Elasticsearch) Update

func (r *Elasticsearch) Update() bool

Update updates a record in the repository

Jump to

Keyboard shortcuts

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