Documentation
¶
Index ¶
Constants ¶
View Source
const ( SearchTypeExamples = "examples" SearchTypeRunbooks = "runbooks" SearchTypeNotebooks = "notebooks" DefaultSearchLimit = 3 MaxExampleSearchLimit = 10 MaxRunbookSearchLimit = 5 MinExampleScore = 0.3 MinRunbookScore = 0.25 )
Variables ¶
This section is empty.
Functions ¶
func NormalizeSearchType ¶
Types ¶
type ExampleSearcher ¶
type ExampleSearcher interface {
Search(query string, limit int) ([]resource.SearchResult, error)
}
type RunbookSearcher ¶
type RunbookSearcher interface {
Search(query string, limit int) ([]resource.RunbookSearchResult, error)
}
type RunbookTagProvider ¶
type RunbookTagProvider interface {
Tags() []string
}
type SearchExampleResult ¶
type SearchExampleResult struct {
CategoryKey string `json:"category_key"`
CategoryName string `json:"category_name"`
ExampleName string `json:"example_name"`
Description string `json:"description"`
Query string `json:"query"`
TargetCluster string `json:"target_cluster"`
SimilarityScore float64 `json:"similarity_score"`
}
type SearchExamplesResponse ¶
type SearchRunbookResult ¶
type SearchRunbooksResponse ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func New ¶
func New( exampleIndex ExampleSearcher, moduleReg *module.Registry, runbookIndex RunbookSearcher, runbookReg RunbookTagProvider, ) *Service
func (*Service) SearchExamples ¶
func (s *Service) SearchExamples(query, categoryFilter string, limit int) (*SearchExamplesResponse, error)
func (*Service) SearchRunbooks ¶
func (s *Service) SearchRunbooks(query, tagFilter string, limit int) (*SearchRunbooksResponse, error)
Click to show internal directories.
Click to hide internal directories.