Documentation ¶
Overview ¶
The types provided in this package are for decoding and encoding the JSON objects set by the Actions on Google for a webhook
The data types provided in this package are documented here: (https://developers.google.com/assistant/conversational/reference/rest/v1/TopLevel/fulfill
As of now, this package does not implement all the types and further work is required.
Index ¶
- type Canvas
- type CanvasContext
- type Content
- type Context
- type ContinuousMatchConfig
- type Device
- type Engagement
- type Entitlement
- type Entry
- type EntryDisplay
- type Expected
- type ExpectedPhrase
- type FulfillmentRequest
- type FulfillmentResponse
- type Handler
- type Home
- type Image
- type Intent
- type IntentParam
- type IntentSubscription
- type LatLng
- type Link
- type Location
- type Media
- type MediaContext
- type MediaImage
- type MediaObject
- type NextScene
- type OpenUrl
- type OrderUpdate
- type PackageEntitlements
- type PostalAddress
- type Prompt
- type Scene
- type Session
- type SignedData
- type Simple
- type Slot
- type Suggestion
- type SynonymType
- type TimeZone
- type TypeOverride
- type User
- type UserNotification
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Canvas ¶
type Canvas struct { Url string `json:"url"` Data []Value `json:"data"` SuppressMic bool `json:"supressMic"` ContinuousMatchConfig ContinuousMatchConfig `json:"continuousMatchConfig"` }
type CanvasContext ¶
type CanvasContext struct {
State Value `json:"state"`
}
type Context ¶
type Context struct { Media MediaContext `json:"media"` Canvas CanvasContext `json:"canvas"` }
type ContinuousMatchConfig ¶
type ContinuousMatchConfig struct { ExpectedPhrases []ExpectedPhrase `json:"expectedPhrases"` DurationSeconds int `json:"durationSeconds"` }
type Engagement ¶
type Engagement struct { PushNotificationIntents []IntentSubscription `json:"pushNotificationIntents"` DailyUpdateIntents []IntentSubscription `json:"dailyUpdateIntents"` }
type Entitlement ¶
type Entitlement struct { Sku string `json:"sku"` SkuType string `json:"skuType"` //To be converted to enum SkuType InAppDetails SignedData `json:"inAppDetails"` }
type Entry ¶
type Entry struct { Name string `json:"Name"` Synonyms []string `json:"synonyms"` Display EntryDisplay `json:"display"` }
type EntryDisplay ¶
type ExpectedPhrase ¶
type FulfillmentRequest ¶
type FulfillmentResponse ¶
type FulfillmentResponse struct { Prompt *Prompt `json:"prompt"` Scene *Scene `json:"scene,omitempty"` Session *Session `json:"session,omitempty"` User *User `json:"user,omitempty"` Home *Home `json:"home,omitempty"` Device *Device `json:"device,omitempty"` Expected *Expected `json:"expected,omitempty"` }
type Intent ¶
type Intent struct { Name string `json:"name"` Params map[string]IntentParam `json:"params"` Query string `json:"query"` }
type IntentParam ¶
type IntentSubscription ¶
type Location ¶
type Location struct { Coordinates LatLng `json:"coordinates"` PostalAddress PostalAddress `json:"postalADdress"` }
type Media ¶
type Media struct { MediaType string `json:"mediaType"` StartOffset string `json:"startOffset,omitempty"` OptionalMediaControls []string `json:"optionalMediaControls,omitempty"` MediaObjects []*MediaObject `json:"mediaObjects"` RepeatMode string `json:"repeatMode,omitempty"` //To be a enum RepeatMode FirstMediaObjectIndex *int `json:"firstMediaObjectIndex,omitempty"` }
type MediaContext ¶
type MediaImage ¶
type MediaObject ¶
type MediaObject struct { Name string `json:"name"` Description string `json:"description,omitempty"` Url string `json:"url"` Image *MediaImage `json:"image,omitempty"` }
type OrderUpdate ¶
type OrderUpdate struct { //Order Order `json:"order"` //too large for nothing UpdateMask string `json:"updateMask"` UserNotification UserNotification `json:"userNotification"` Reason string `json:"reason"` }
type PackageEntitlements ¶
type PackageEntitlements struct { PackageName string `json:"packageName"` Entitlements []Entitlement `json:"entitlements"` }
type PostalAddress ¶
type PostalAddress struct { Revision int `json:"revision"` RegionCode string `json:"regionCode"` LanguageCode string `json:"languageCode"` PostalCode string `json:"postalCode"` SortingCode string `json:"sortingCode"` AdministrativeArea string `json:"administrativeArea"` Locality string `json:"locality"` SubLocality string `json:"sublocality"` AddressLines []string `json:"addressLines"` Recipients []string `json:"recipient"` Organization string `json:"organization"` }
type Prompt ¶
type Prompt struct { Override bool `json:"override"` FirstSimple *Simple `json:"firstSimple,omitempty"` Content *Content `json:"content,omitempty"` LastSimple *Simple `json:"lastSimple,omitempty"` Suggestions *[]Suggestion `json:"suggestions,omitempty"` Link *Link `json:"link,omitempty"` Canvas *Canvas `json:"canvas,omitempty"` OrderUpdate *OrderUpdate `json:"orderUpdate,omitempty"` }
type Session ¶
type Session struct { Id string `json:"id"` Params map[string]Value `json:"params"` TypeOverrides []TypeOverride `json:"typeOverrides"` LanguageCode string `json:"languageCode"` }
type SignedData ¶
type SignedData struct { InAppPurchaseData interface{} `json:"inAppPurchaseData"` InAppDataSignature string `json:"inAppDataSignature"` }
type Suggestion ¶
type Suggestion struct {
Title string `json:"title"`
}
type SynonymType ¶
type SynonymType struct {
Entries []Entry `json:"entries"`
}
type TypeOverride ¶
type TypeOverride struct { Name string `json:"name"` Mode string `json:"mode"` //To be converted to enumerated TypeOverrideMode Synonym SynonymType `json:"synonym"` }
type User ¶
type User struct { Locale string `json:"locale"` Params map[string]Value `json:"params,omitempty"` AccountLinkingStatus string `json:"accountLinkingStatus"` //To be converted to enum AccountLinkingStatus VerificationStatus string `json:"verificationStatus"` //To be converted to enum UserVerification status LastSeenTime time.Time `json:"lastSeenTime"` Engagement Engagement `json:"engagement"` PackageEntitlements []PackageEntitlements `json:"packageEntitlements"` Permissions []string `json:"permissions"` //To be converted to enum Permission }
type UserNotification ¶
type Value ¶
type Value interface{}
https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Value This data type needs improvements to properly handle this
Click to show internal directories.
Click to hide internal directories.