search

package
v0.0.0-...-2efbf93 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

func InsertMeow

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

func SearchMeows

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

func SetRepository

func SetRepository(repository Repository)

Types

type ElasticRepository

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

func NewElastic

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

func (*ElasticRepository) Close

func (r *ElasticRepository) Close()

func (*ElasticRepository) InsertMeow

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

func (*ElasticRepository) SearchMeows

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

type Repository

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

Jump to

Keyboard shortcuts

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