Documentation ¶
Index ¶
- Constants
- func NewCommandResponse(req models.SmartthingsRequest) models.CommandResponse
- func NewDeviceStateResponse(req models.SmartthingsRequest) models.DeviceStateResponse
- func NewGlobalErrorResponse(req models.SmartthingsRequest, errEnum string, detail string) models.InteractionResult
- func NewOauthHandler(sdmProjectID string) oauthHandler
- type NestHandler
- func (h *NestHandler) HandleCommandRequest(w http.ResponseWriter, r *http.Request, req models.SmartthingsRequest)
- func (h *NestHandler) HandleDiscoveryRequest(w http.ResponseWriter, r *http.Request, req models.SmartthingsRequest)
- func (h *NestHandler) HandleGrantCallbackAccess(w http.ResponseWriter, r *http.Request, req models.SmartthingsRequest)
- func (h *NestHandler) HandleInteractionResult(w http.ResponseWriter, r *http.Request, req models.SmartthingsRequest)
- func (h *NestHandler) HandleStateRefreshRequest(w http.ResponseWriter, r *http.Request, req models.SmartthingsRequest)
- func (h *NestHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Constants ¶
View Source
const (
StNestThermostatDeviceProfileID string = "bd2e8c4a-0e4b-475f-b8ff-273fb5f5cef5"
)
Variables ¶
This section is empty.
Functions ¶
func NewCommandResponse ¶
func NewCommandResponse(req models.SmartthingsRequest) models.CommandResponse
func NewDeviceStateResponse ¶
func NewDeviceStateResponse(req models.SmartthingsRequest) models.DeviceStateResponse
func NewGlobalErrorResponse ¶
func NewGlobalErrorResponse(req models.SmartthingsRequest, errEnum string, detail string) models.InteractionResult
func NewOauthHandler ¶
func NewOauthHandler(sdmProjectID string) oauthHandler
Types ¶
type NestHandler ¶
type NestHandler struct {
// contains filtered or unexported fields
}
func NewNestHandler ¶
func NewNestHandler(cli sdmapi.SmartDeviceManagement, oauthStateFile string, clientID string, clientSecret string) NestHandler
func (*NestHandler) HandleCommandRequest ¶
func (h *NestHandler) HandleCommandRequest(w http.ResponseWriter, r *http.Request, req models.SmartthingsRequest)
func (*NestHandler) HandleDiscoveryRequest ¶
func (h *NestHandler) HandleDiscoveryRequest(w http.ResponseWriter, r *http.Request, req models.SmartthingsRequest)
func (*NestHandler) HandleGrantCallbackAccess ¶
func (h *NestHandler) HandleGrantCallbackAccess(w http.ResponseWriter, r *http.Request, req models.SmartthingsRequest)
The GrantCallbackAccess request provides us with the information that we need to request an access and refresh token from the Smartthings token service
func (*NestHandler) HandleInteractionResult ¶
func (h *NestHandler) HandleInteractionResult(w http.ResponseWriter, r *http.Request, req models.SmartthingsRequest)
Interaction result type requests indicate a problem with data that we sent back to Smartthings from a previous request
func (*NestHandler) HandleStateRefreshRequest ¶
func (h *NestHandler) HandleStateRefreshRequest(w http.ResponseWriter, r *http.Request, req models.SmartthingsRequest)
func (*NestHandler) ServeHTTP ¶
func (h *NestHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.