search

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyQueryString = errors.New("query string cannot be empty")
	ErrEmptySchemaID    = errors.New("schema_id cannot be empty")
	ErrEmptyNamespaceID = errors.New("namespace_id cannot be empty")
)

Functions

This section is empty.

Types

type Repository

type Repository interface {
	Search(context.Context, *SearchRequest) ([]*SearchHits, error)
	SearchLatest(context.Context, *SearchRequest) ([]*SearchHits, error)
}

type SearchHits

type SearchHits struct {
	Fields      []string
	Types       []string
	Path        string
	NamespaceID string
	SchemaID    string
	VersionID   int32
}

type SearchRequest

type SearchRequest struct {
	NamespaceID string
	SchemaID    string
	Query       string
	History     bool
	VersionID   int32
}

type SearchResponse

type SearchResponse struct {
	Hits []*SearchHits
}

type Service

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

func NewService

func NewService(repository Repository) *Service

func (*Service) Search

func (s *Service) Search(ctx context.Context, req *SearchRequest) (*SearchResponse, error)

Jump to

Keyboard shortcuts

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