Skip to content

Instantly share code, notes, and snippets.

@IndianGuru
Created May 2, 2016 09:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IndianGuru/1a640a740fd869059b6ac0df435cd0cf to your computer and use it in GitHub Desktop.
Save IndianGuru/1a640a740fd869059b6ac0df435cd0cf to your computer and use it in GitHub Desktop.
Sample Response Struct
type QResponse struct {
ID string `json:"id"`
Timestamp time.Time `json:"timestamp"`
Result struct {
Source string `json:"source"`
ResolvedQuery string `json:"resolvedQuery"`
Action string `json:"action"`
ActionIncomplete bool `json:"actionIncomplete"`
Parameters struct {
Name string `json:"name"`
} `json:"parameters"`
Contexts []struct {
Name string `json:"name"`
Parameters struct {
Name string `json:"name"`
} `json:"parameters"`
Lifespan int `json:"lifespan"`
} `json:"contexts"`
Metadata struct {
IntentID string `json:"intentId"`
IntentName string `json:"intentName"`
} `json:"metadata"`
Fulfillment struct {
Speech string `json:"speech"`
} `json:"fulfillment"`
} `json:"result"`
Status struct {
Code int `json:"code"`
ErrorType string `json:"errorType"`
} `json:"status"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment