search

package
v0.0.0-...-40fc3ee Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

Close ...

func InsertReaction

func InsertReaction(ctx context.Context, reaction domain.Reaction) error

InsertReaction ...

func PerformSearchReactions

func PerformSearchReactions(ctx context.Context, query string, skip uint64, take uint64) ([]domain.Reaction, error)

PerformSearchReactions ...

func SetRepository

func SetRepository(repository Repository)

SetRepository ...

Types

type ElasticRepository

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

ElasticRepository ...

func NewElastic

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

NewElastic ...

func (*ElasticRepository) Close

func (r *ElasticRepository) Close()

Close ...

func (*ElasticRepository) InsertReaction

func (r *ElasticRepository) InsertReaction(ctx context.Context, reaction domain.Reaction) error

InsertReaction ...

func (*ElasticRepository) SearchReactions

func (r *ElasticRepository) SearchReactions(ctx context.Context, query string, skip uint64, take uint64) ([]domain.Reaction, error)

SearchReactions ...

type Repository

type Repository interface {
	Close()
	InsertReaction(ctx context.Context, reaction domain.Reaction) error
	SearchReactions(ctx context.Context, query string, skip uint64, take uint64) ([]domain.Reaction, error)
}

Repository ...

Jump to

Keyboard shortcuts

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