search

package
v0.1.4-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Searcher

type Searcher interface {
	// Characters searches for characters by their names.
	Characters(name string, limit, offset int) ([]*comic.Character, error)
}

Searcher is the interface for searching.

type Service

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

Service defines the service for searching.

func NewSearchService

func NewSearchService(db *pg.DB) *Service

NewSearchService creates the new search service implementation.

func (*Service) Characters

func (s *Service) Characters(name string, limit, offset int) ([]*comic.Character, error)

Characters searches for characters by their names using postgres' trigram similarities.

Jump to

Keyboard shortcuts

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