Documentation
¶
Index ¶
- Variables
- type AlexaRequest
- func (request AlexaRequest) GetAPL() interface{}
- func (request AlexaRequest) GetAttributes() interface{}
- func (request AlexaRequest) GetDisplay() interface{}
- func (request AlexaRequest) GetLocale() string
- func (request AlexaRequest) GetNewSession() bool
- func (request AlexaRequest) GetRequestIntentName() string
- func (request AlexaRequest) GetRequestType() string
- func (request AlexaRequest) GetSessionId() string
- func (request AlexaRequest) GetSlots() *map[string]Slot
- func (request AlexaRequest) GetUserId() string
- func (request AlexaRequest) GetVideo() interface{}
- func (request AlexaRequest) HasAPL() bool
- func (request AlexaRequest) HasDisplay() bool
- func (request AlexaRequest) HasVideo() bool
- type Context
- type Intent
- type Request
- type Resolutions
- type Session
- type Slot
Constants ¶
This section is empty.
Variables ¶
View Source
var SessionUnmarshalerHandler func(data []byte, s *Session) error = nil
=============================================================
HIJACK THE ATTRIBUTES UNMARSHAL ON THE REQUEST =============================================================
Functions ¶
This section is empty.
Types ¶
type AlexaRequest ¶
type AlexaRequest struct {
Version string `json:"version"`
Session Session `json:"session"`
Context Context `json:"context"`
Request Request `json:"request"`
}
func (AlexaRequest) GetAPL ¶
func (request AlexaRequest) GetAPL() interface{}
func (AlexaRequest) GetAttributes ¶
func (request AlexaRequest) GetAttributes() interface{}
func (AlexaRequest) GetDisplay ¶
func (request AlexaRequest) GetDisplay() interface{}
func (AlexaRequest) GetLocale ¶
func (request AlexaRequest) GetLocale() string
func (AlexaRequest) GetNewSession ¶
func (request AlexaRequest) GetNewSession() bool
func (AlexaRequest) GetRequestIntentName ¶
func (request AlexaRequest) GetRequestIntentName() string
func (AlexaRequest) GetRequestType ¶
func (request AlexaRequest) GetRequestType() string
func (AlexaRequest) GetSessionId ¶
func (request AlexaRequest) GetSessionId() string
func (AlexaRequest) GetSlots ¶
func (request AlexaRequest) GetSlots() *map[string]Slot
func (AlexaRequest) GetUserId ¶
func (request AlexaRequest) GetUserId() string
func (AlexaRequest) GetVideo ¶
func (request AlexaRequest) GetVideo() interface{}
func (AlexaRequest) HasAPL ¶
func (request AlexaRequest) HasAPL() bool
func (AlexaRequest) HasDisplay ¶
func (request AlexaRequest) HasDisplay() bool
func (AlexaRequest) HasVideo ¶
func (request AlexaRequest) HasVideo() bool
type Context ¶
type Context struct {
System struct {
Application struct {
ApplicationID string `json:"applicationId,omitempty"`
} `json:"application,omitempty"`
User struct {
UserID string `json:"userId,omitempty"`
AccessToken string `json:"accessToken,omitempty"`
Permissions struct {
ConsentToken string `json:"consentToken,omitempty"`
} `json:"permissions,omitempty"`
} `json:"user,omitempty"`
APIAccessToken string `json:"apiAccessToken"`
APIEndPoint string `json:"apiEndpoint"`
Device struct {
DeviceID string `json:"deviceId,omitempty"`
SupportedInterfaces struct {
Display *struct {
TemplateVersion string `json:"templateVersion,omitempty"`
MarkupVersion string `json:"markupVersion,omitempty"`
} `json:"Display,omitempty"`
AudioPlayer *struct {
} `json:"AudioPlayer,omitempty"`
VideoApp *struct {
} `json:"VideoApp,omitempty"`
AlexaPresentationAPL *struct {
} `json:"Alexa.Presentation.APL,omitempty"`
} `json:"supportedInterfaces,omitempty"`
} `json:"device,omitempty"`
} `json:"System,omitempty"`
AudioPlayer struct {
PlayerActivity string `json:"playerActivity,omitempty"`
Token string `json:"token,omitempty"`
OffsetInMilliseconds int `json:"offsetInMilliseconds,omitempty"`
} `json:"AudioPlayer,omitempty"`
/* Check documentation for those objects */
Viewport struct {
Experiences []struct {
ArcMinuteWidth int `json:"arcMinuteWidth"`
ArcMinuteHeight int `json:"arcMinuteHeight"`
CanRotate bool `json:"canRotate"`
CanResize bool `json:"canResize"`
} `json:"experiences"`
Shape string `json:"shape"`
PixelWidth int `json:"pixelWidth"`
PixelHeight int `json:"pixelHeight"`
DPI int `json:"dpi"`
CurrentPixelWidth int `json:"currentPixelWidth"`
CurrentPixelHeight int `json:"currentPixelHeight"`
Touch []string `json:"touch"`
} `json:"Viewport,omitempty"`
Display struct {
Token string `json:"token,omitempty"`
} `json:"Display,omitempty"`
}
type Request ¶
type Request struct {
Type string `json:"type"`
RequestID string `json:"requestId"`
Timestamp string `json:"timestamp"`
Locale string `json:"locale"`
// Intent request
Intent Intent `json:"intent,omitempty"`
DialogState string `json:"dialogState,omitempty"`
// Ended session request
Reason string `json:"reason,omitempty"`
Error map[string]string `json:"error,omitempty"`
// Audio player request and others
Token string `json:"token,omitempty"`
OffsetInMilliseconds int `json:"offsetInMilliseconds,omitempty"`
}
Partially implemented for now
type Resolutions ¶
type Resolutions struct {
ResolutionsPerAuthority []struct {
Authority string `json:"authority"`
Status struct {
Code string `json:"code"`
} `json:"status"`
Values []struct {
Value struct {
Name string `json:"name"`
Id string `json:"id"`
} `json:"value"`
} `json:"values"`
} `json:"resolutionsPerAuthority"`
}
type Session ¶
type Session struct {
New bool `json:"new"`
SessionID string `json:"sessionId"`
Attributes interface{} `json:"attributes,omitempty"`
Application struct {
ApplicationID string `json:"applicationId,omitempty"`
} `json:"application"`
User struct {
UserID string `json:"userId"`
AccessToken string `json:"accessToken,omitempty"`
Permissions struct {
ConsentToken string `json:"consentToken,omitempty"`
} `json:"permissions,omitempty"`
} `json:"user"`
}
func (*Session) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.