search

package
v0.0.0-...-a0e5b65 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2019 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

Close - Closes repository connection

func InquiryMeow

func InquiryMeow(ctx context.Context, query string, skip uint64, take uint64) ([]schema.Meow, error)

InquiryMeow - InquiryMeow implementation

func InsertMeow

func InsertMeow(ctx context.Context, meow schema.Meow) error

InsertMeow - InsertMeow implementation

func SetRepository

func SetRepository(repository Repository)

SetRepository - set the repository connection

Types

type ElasticRepository

type ElasticRepository struct {
	// contains filtered or unexported fields
}

ElasticRepository keeps the elasticsearch client reference

func NewElastic

func NewElastic(url string) (*ElasticRepository, error)

NewElastic created a new connection with ElasticSearch and return it

func (*ElasticRepository) Close

func (r *ElasticRepository) Close()

Close the connection with ElasticSearch

func (*ElasticRepository) InquiryMeow

func (r *ElasticRepository) InquiryMeow(ctx context.Context, query string, skip uint64, take uint64) ([]schema.Meow, error)

InquiryMeow return the meows finds eventually for the query provided

func (*ElasticRepository) InsertMeow

func (r *ElasticRepository) InsertMeow(ctx context.Context, meow schema.Meow) error

InsertMeow performs an insert on ElasticSearch

type Repository

type Repository interface {
	Close()
	InsertMeow(ctx context.Context, meow schema.Meow) error
	InquiryMeow(ctx context.Context, query string, skip uint64, take uint64) ([]schema.Meow, error)
}

Repository interface for Querying services

Jump to

Keyboard shortcuts

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