api

package
v0.0.0-...-c12cbef Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: MIT Imports: 13 Imported by: 0

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

func Run

func Run()

Run - Start our API server

Types

type GenericResponse

type GenericResponse struct {
	Status  int    `json:"status"`
	Message string `json:"message"`
}

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

Jump to

Keyboard shortcuts

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