Documentation ¶
Index ¶
- type ActionType
- type AddressOptions
- type AndroidApp
- type Argument
- type BasicCard
- type Button
- type CarouselBrowse
- type CarouselBrowseItem
- type CarouselItem
- type CarouselSelect
- type Cell
- type ColumnProperty
- type ConfirmationData
- type ConfirmationDialogSpec
- type Context
- type DateTimeData
- type DateTimeDialogSpec
- type DeliveryAddressData
- type HorizontalAlignment
- type Image
- type ImageDisplayOptions
- type IntentValueType
- type Item
- type LinkData
- type LinkOutSuggestion
- type LinkValueSpec
- type ListItem
- type ListSelect
- type MediaObject
- type MediaResponse
- type MediaType
- type OpenUrlAction
- type OptionData
- type OptionInfo
- type Permission
- type PermissionData
- type PermissionValueSpec
- type PriceType
- type RichResponse
- type Row
- type SignInData
- type SignInValueSpec
- type SimpleResponse
- type SimpleSelect
- type SimpleSelectItem
- type StructuredResponse
- type Suggestion
- type SystemIntent
- type SystemIntentData
- type TableCard
- type UpdatePermissionValueSpec
- type UrlTypeHint
- type User
- type VersionFilter
- type WebhookResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionType ¶
type ActionType string
const ( AT_UNKNOWN ActionType = "UNKNOWN" AT_VIEW_DETAILS ActionType = "VIEW_DETAILS" AT_MODIFY ActionType = "MODIFY" AT_CANCEL ActionType = "CANCEL" AT_RETURN ActionType = "RETURN" AT_EXCHANGE ActionType = "EXCHANGE" AT_EMAIL ActionType = "EMAIL" AT_CALL ActionType = "CALL" AT_REORDER ActionType = "REORDER" AT_REVIEW ActionType = "REVIEW" AT_CUSTOMER_SERVICE ActionType = "CUSTOMER_SERVICE" AT_FIX_ISSUE ActionType = "FIX_ISSUE" )
type AddressOptions ¶
type AddressOptions struct {
Reason string `json:"reason,omitempty"`
}
type AndroidApp ¶
type AndroidApp struct { PackageName string `json:"packageName,omitempty"` Versions []*VersionFilter `json:"versions,omitempty"` }
type BasicCard ¶
type BasicCard struct { Title string `json:"title,omitempty"` Subtitle string `json:"subtitle,omitempty"` FormattedText string `json:"formattedText,omitempty"` Image *Image `json:"image,omitempty"` Buttons []*Button `json:"buttons,omitempty"` ImageDisplayOptions ImageDisplayOptions `json:"imageDisplayOptions,omitempty"` }
type Button ¶
type Button struct { Title string `json:"title,omitempty"` OpenUrlAction *OpenUrlAction `json:"openUrlAction,omitempty"` }
type CarouselBrowse ¶
type CarouselBrowse struct { Items []*CarouselBrowseItem `json:"items,omitempty"` ImageDisplayOptions ImageDisplayOptions `json:"imageDisplayOptions,omitempty"` }
type CarouselBrowseItem ¶
type CarouselBrowseItem struct { Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` Image *Image `json:"image,omitempty"` OpenUrlAction *OpenUrlAction `json:"openUrlAction,omitempty"` }
type CarouselItem ¶
type CarouselItem struct { OptionInfo *OptionInfo `json:"optionInfo,omitempty"` Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` Image *Image `json:"image,omitempty"` }
type CarouselSelect ¶
type CarouselSelect struct { Items []*CarouselItem `json:"items,omitempty"` ImageDisplayOptions ImageDisplayOptions `json:"imageDisplayOptions,omitempty"` }
type ColumnProperty ¶
type ColumnProperty struct { Header string `json:"header,omitempty"` HorizontalAlignment HorizontalAlignment `json:"horizontalAlignment,omitempty"` }
type ConfirmationData ¶
type ConfirmationData struct {
DialogSpec *ConfirmationDialogSpec `json:"dialogSpec,omitempty"`
}
type ConfirmationDialogSpec ¶
type ConfirmationDialogSpec struct {
RequestConfirmationText string `json:"requestConfirmationText,omitempty"`
}
type Context ¶
func GetContextsFromRequest ¶
func GetContextsFromRequest(req *dialogflowpb.WebhookRequest) ([]*Context, error)
type DateTimeData ¶
type DateTimeData struct {
DialogSpec *DateTimeDialogSpec `json:"dialogSpec,omitempty"`
}
type DateTimeDialogSpec ¶
type DeliveryAddressData ¶
type DeliveryAddressData struct {
AddressOptions *AddressOptions `json:"addressOptions,omitempty"`
}
type HorizontalAlignment ¶
type HorizontalAlignment string
const ( HA_LEADING HorizontalAlignment = "LEADING" HA_CENTER HorizontalAlignment = "CENTER" HA_TRAILING HorizontalAlignment = "TRAILING" )
type ImageDisplayOptions ¶
type ImageDisplayOptions string
const ( IDO_DEFAULT ImageDisplayOptions = "DEFAULT" IDO_WHITE ImageDisplayOptions = "WHITE" IDO_CROPPED ImageDisplayOptions = "CROPPED" )
type IntentValueType ¶
type IntentValueType string
const ( IVT_CONFIRMATION IntentValueType = "type.googleapis.com/google.actions.v2.ConfirmationValueSpec" IVT_DATETIME IntentValueType = "type.googleapis.com/google.actions.v2.DateTimeValueSpec" IVT_DELIVERY_ADDRESS IntentValueType = "type.googleapis.com/google.actions.v2.DeliveryAddressValueSpec" IVT_LINK IntentValueType = "type.googleapis.com/google.actions.v2.LinkValueSpec" IVT_OPTION IntentValueType = "type.googleapis.com/google.actions.v2.OptionValueSpec" IVT_PERMISSION IntentValueType = "type.googleapis.com/google.actions.v2.PermissionValueSpec" IVT_SIGN_IN IntentValueType = "type.googleapis.com/google.actions.v2.SignInValueSpec" )
func (IntentValueType) Context ¶
func (ivt IntentValueType) Context() string
func (IntentValueType) Event ¶
func (ivt IntentValueType) Event() string
func (IntentValueType) Intent ¶
func (ivt IntentValueType) Intent() string
type Item ¶
type Item struct { SimpleResponse *SimpleResponse `json:"simpleResponse,omitempty"` BasicCard *BasicCard `json:"basicCard,omitempty"` StructuredResponse *StructuredResponse `json:"structuredResponse,omitempty"` MediaResponse *MediaResponse `json:"mediaResponse,omitempty"` CarouselBrowse *CarouselBrowse `json:"carouselBrowse,omitempty"` TableCard *TableCard `json:"tableCard,omitempty"` }
type LinkData ¶
type LinkData struct {
LinkValueSpec
}
type LinkOutSuggestion ¶
type LinkOutSuggestion struct { DestinationName string `json:"destinationName,omitempty"` OpenUrlAction *OpenUrlAction `json:"openUrlAction,omitempty"` }
type LinkValueSpec ¶
type LinkValueSpec struct { }
type ListItem ¶
type ListItem struct { OptionInfo *OptionInfo `json:"optionInfo,omitempty"` Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` Image *Image `json:"image,omitempty"` }
type ListSelect ¶
type MediaObject ¶
type MediaResponse ¶
type MediaResponse struct { MediaType MediaType `json:"mediaType,omitempty"` MediaObjects []*MediaObject `json:"mediaObjects,omitempty"` }
type OpenUrlAction ¶
type OpenUrlAction struct { Url string `json:"url,omitempty"` AndroidApp *AndroidApp `json:"androidApp,omitempty"` UrlTypeHint UrlTypeHint `json:"urlTypeHint,omitempty"` }
type OptionData ¶
type OptionData struct { SimpleSelect *SimpleSelect `json:"simpleSelect,omitempty"` ListSelect *ListSelect `json:"listSelect,omitempty"` CarouselSelect *CarouselSelect `json:"carouselSelect,omitempty"` }
type OptionInfo ¶
type Permission ¶
type Permission string
const ( PM_UNSPECIFIED_PERMISSION Permission = "UNSPECIFIED_PERMISSION" PM_NAME Permission = "NAME" PM_DEVICE_PRECISE_LOCATION Permission = "DEVICE_PRECISE_LOCATION" PM_DEVICE_COARSE_LOCATION Permission = "DEVICE_COARSE_LOCATION" PM_UPDATE Permission = "UPDATE" )
type PermissionData ¶
type PermissionData struct {
PermissionValueSpec
}
type PermissionValueSpec ¶
type PermissionValueSpec struct { OptContext string `json:"optContext,omitempty"` Permissions []Permission `json:"permissions,omitempty"` UpdatePermissionValueSpec *UpdatePermissionValueSpec `json:"updatePermissionValueSpec,omitempty"` }
type RichResponse ¶
type RichResponse struct { Items []*Item `json:"items,omitempty"` Suggestions []*Suggestion `json:"suggestions,omitempty"` LinkOutSuggestion *LinkOutSuggestion `json:"linkOutSuggestion,omitempty"` }
type SignInData ¶
type SignInData struct {
SignInValueSpec
}
type SignInValueSpec ¶
type SignInValueSpec struct {
OptContext string `json:"optContext,omitempty"`
}
type SimpleResponse ¶
type SimpleSelect ¶
type SimpleSelect struct {
Items []*SimpleSelectItem `json:"items,omitempty"`
}
type SimpleSelectItem ¶
type SimpleSelectItem struct { OptionInfo *OptionInfo `json:"optionInfo,omitempty"` Title string `json:"title,omitempty"` }
type StructuredResponse ¶
type StructuredResponse struct { }
type Suggestion ¶
type Suggestion struct {
Title string `json:"title,omitempty"`
}
type SystemIntent ¶
type SystemIntent struct { Intent string `json:"intent,omitempty"` Data *SystemIntentData `json:"data,omitempty"` }
type SystemIntentData ¶
type SystemIntentData struct { Type IntentValueType `json:"@type,omitempty"` *ConfirmationData *DateTimeData *DeliveryAddressData *OptionData *PermissionData *SignInData *LinkData }
type UrlTypeHint ¶
type UrlTypeHint string
const ( UTH_URL_TYPE_HINT_UNSPECIFIED UrlTypeHint = "URL_TYPE_HINT_UNSPECIFIED" UTH_AMP_CONTENT UrlTypeHint = "AMP_CONTENT" )
type User ¶
func GetUserFromRequest ¶
func GetUserFromRequest(req *dialogflowpb.WebhookRequest) (*User, error)
type VersionFilter ¶
type WebhookResponse ¶
type WebhookResponse struct { ExpectUserResponse bool `json:"expectUserResponse"` UserStorage string `json:"userStorage,omitempty"` RichResponse *RichResponse `json:"richResponse,omitempty"` SystemIntent *SystemIntent `json:"systemIntent,omitempty"` }
Click to show internal directories.
Click to hide internal directories.