Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DBName - name of our database DBName string = "autocomplete" // CollectionName - name of our collection CollectionName string = "autocomplete" // URI - link used to connect to MongoDB instance URI string = "mongodb://localhost:27017" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GenericResponse ¶
GenericResponse struct
type Response ¶
type Response struct { SearchPhrase string `json:"searchphrase"` Suggestions []string `json:"suggestions"` }
Response struct
type SuggestionRequest ¶
type SuggestionRequest struct {
Phrase string `json:"phrase"`
}
SuggestionRequest struct
Click to show internal directories.
Click to hide internal directories.