Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrArticleNotFound = errors.New("KB article not found")
Functions ¶
func GetArticleIndex ¶
GetArticleIndex retrieves the index of an article from its url. if the article is not found, ErrArticleNotFound is returned.
Types ¶
type Article ¶
type Article struct { Index uint64 `json:"index"` URL string `json:"url"` Title string `json:"title"` Keywords []string `json:"keywords"` Score int }
Article is a struct that holds information about a knowledge-base article.
type ArticleList ¶
type ArticleList []*Article
func GetArticleList ¶
func GetArticleList() (ArticleList, error)
GetArticleList returns the list of KB articles.
func GetSuggestions ¶
func GetSuggestions(userInput string) (ArticleList, error)
GetSuggestions returns a list of up to 3 suggestions for the built-in list of KB articles matching the given user input.
func GetSuggestionsFromArticleList ¶
func GetSuggestionsFromArticleList(userInput string, articles ArticleList) (ArticleList, error)
GetSuggestionsFromArticleList returns a list of up to 3 suggestions for the given list of KB articles matching the given user input.
Click to show internal directories.
Click to hide internal directories.