dialogflow

package
v0.0.0-...-82292ab Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const URL = "http://labx.travelgatex.com:80/search"

Variables

This section is empty.

Functions

This section is empty.

Types

type DialogFlow

type DialogFlow struct{}

func NewDialog

func NewDialog() *DialogFlow

func (DialogFlow) Convert

func (d DialogFlow) Convert(body io.ReadCloser) (*conversation.Criteria, error)

Convert a read closer into a pkg.Criteria

func (DialogFlow) Send

func (d DialogFlow) Send(criteria *conversation.Criteria) (io.ReadCloser, error)

func (DialogFlow) Speak

func (d DialogFlow) Speak(destination string, hotelName string, amount string, optionID string) ([]byte, error)

type OutputContext

type OutputContext struct {
	Name          string     `json:"name"`
	LifespanCount int        `json:"lifespanCount"`
	Parameters    Parameters `json:"parameters"`
}

type Parameters

type Parameters struct {
	HotelName string `json:"hotelName"`
	Price     string `json:"price"`
	OptionID  string `json:"optionID"`
}

type SearchResponse

type SearchResponse struct {
	FulfillmentText string          `json:"fulfillmentText"`
	OutputContexts  []OutputContext `json:"outputContexts"`
}

Jump to

Keyboard shortcuts

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