geocatalogo: github.com/go-spatial/geocatalogo/repository Index | Files

package repository

import "github.com/go-spatial/geocatalogo/repository"

Index

Package Files

bleve.go elasticsearch.go

func New Uses

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

New creates a repository

func NewBleve Uses

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

NewBleve creates a repository

type Bleve Uses

type Bleve struct {
    Type     string
    URL      string
    Mappings map[string]string
    Index    bleve.Index
}

Bleve provides an object model for repository.

func OpenBleve Uses

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

OpenBleve loads a repository

func (*Bleve) Delete Uses

func (r *Bleve) Delete() bool

Delete deletes a record into the repository

func (*Bleve) Get Uses

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

Get gets specified metadata records from the repository

func (*Bleve) Insert Uses

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

Insert inserts a record into the repository

func (*Bleve) Query Uses

func (r *Bleve) Query(term string, from int, size int, sr *search.Results) error

Query performs a search against the repository

func (*Bleve) Update Uses

func (r *Bleve) Update() bool

Update updates a record into the 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(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 20 packages (graph) and is imported by 2 packages. Updated 2019-07-20. Refresh now. Tools for package owners.