geocatalogo: Index | Files

package repository

import ""


Package Files


func New Uses

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

New creates a repository

type Elasticsearch Uses

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 Uses

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

Open loads a repository

func (*Elasticsearch) Delete Uses

func (r *Elasticsearch) Delete() bool

Delete deletes a record from the repository

func (*Elasticsearch) Get Uses

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

Get gets specified metadata records from the repository

func (*Elasticsearch) Insert Uses

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

Insert inserts a record into the repository

func (*Elasticsearch) Query Uses

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 Uses

func (r *Elasticsearch) Update() bool

Update updates a record in the repository

Package repository imports 15 packages (graph) and is imported by 2 packages. Updated 2019-11-20. Refresh now. Tools for package owners.