routes

package
v0.0.0-...-a8ae919 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package routes defines routes for the app

Index

Constants

View Source
const APIURL string = "http://nlp-service:30000"

APIURL is the address for the nlp service

Variables

This section is empty.

Functions

func Export

func Export(w http.ResponseWriter, r *http.Request)

Export returns all intents as a CSV

func Health

func Health(w http.ResponseWriter, r *http.Request)

Health returns health of proxy and downstream

func Infer

func Infer(w http.ResponseWriter, r *http.Request)

Infer unpacks the intent and sends it downstream for inference

Types

type HealthStatus

type HealthStatus struct {
	ProxyAlive bool `json:"proxyAlive"`
	ModelAlive bool `json:"modelAlive"`
}

HealthStatus represents health of ingress (this) and nlp service

type Intent

type Intent struct {
	Intent string `json:"intent" bson:"intent"`
	URL    string `json:"url" bson:"url"`
}

Intent represents a single user intent

Jump to

Keyboard shortcuts

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