search

package
v0.0.0-...-d0758bc Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

func InsertGiggle

func InsertGiggle(ctx context.Context, giggle schema.Giggle) error

func SearchGiggles

func SearchGiggles(ctx context.Context, query string, skip uint64, take uint64) ([]schema.Giggle, 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) InsertGiggle

func (r *ElasticRepository) InsertGiggle(ctx context.Context, giggle schema.Giggle) error

func (*ElasticRepository) SearchGiggles

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

type Repository

type Repository interface {
	Close()
	InsertGiggle(ctx context.Context, giggle schema.Giggle) error
	SearchGiggles(ctx context.Context, query string, skip uint64, take uint64) ([]schema.Giggle, error)
}

Jump to

Keyboard shortcuts

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