Documentation ¶
Overview ¶
Package smarthome for Smart Home Management
Index ¶
- type AddHomeMemberRequest
- type AddHomeMemberResponse
- type AddHomeRequest
- type AddHomeResponse
- type AddHomeRoomDeviceRequest
- type AddHomeRoomDeviceResponse
- type AddRoomRequest
- type AddRoomResponse
- type DeleteHomeMemberRequest
- type DeleteHomeMemberResponse
- type DeleteHomeRequest
- type DeleteHomeResponse
- type DeleteHomeRoomDeviceRequest
- type DeleteRoomRequest
- type DeleteRoomResponse
- type Device
- type Home
- type Member
- type QueryHomeDeviceRequest
- type QueryHomeDeviceResponse
- type QueryHomeMembersRequest
- type QueryHomeMembersResponse
- type QueryHomeRequest
- type QueryHomeResponse
- type QueryHomeRoomDeviceRequest
- type QueryHomeRoomDeviceResponse
- type QueryRoomInfoRequest
- type QueryRoomInfoResponse
- type Room
- type Status
- type UpdateHomeMemberPermissionRequest
- type UpdateHomeMemberPermissionResponse
- type UpdateHomeRequest
- type UpdateHomeResponse
- type UpdateHomeRoomDeviceRequest
- type UpdateHomeRoomDeviceResponse
- type UpdateRoomRequest
- type UpdateRoomResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddHomeMemberRequest ¶
type AddHomeMemberRequest struct { HomeID int64 `url:"-" validate:"required" json:"-"` // Family id AppSchema string `url:"-" validate:"required" json:"app_schema"` // Account mark Member Member `url:"-" validate:"required" json:"member"` // Member object }
func (*AddHomeMemberRequest) Method ¶
func (s *AddHomeMemberRequest) Method() string
Method for Request.Method()
func (*AddHomeMemberRequest) URL ¶
func (s *AddHomeMemberRequest) URL() string
URL for Request.URL()
type AddHomeMemberResponse ¶
type AddHomeMemberResponse bool
type AddHomeRequest ¶
type AddHomeRequest struct { UID string `url:"-" validate:"required" json:"uid"` // Tuya user id Home Home `url:"-" validate:"required" json:"home"` // Family Rooms []string `url:"-" json:"rooms,omitempty"` // Room list }
func (*AddHomeRequest) Method ¶
func (s *AddHomeRequest) Method() string
Method for Request.Method()
type AddHomeResponse ¶
type AddHomeResponse int64
type AddHomeRoomDeviceRequest ¶
type AddHomeRoomDeviceRequest struct { HomeID int64 `url:"-" validate:"required" json:"-"` // home ID RoomID int64 `url:"-" validate:"required" json:"-"` // room ID DeviceIDs []string `url:"-" validate:"required" json:"device_ids"` // device IDs }
func (*AddHomeRoomDeviceRequest) Method ¶
func (s *AddHomeRoomDeviceRequest) Method() string
Method for Request.Method()
func (*AddHomeRoomDeviceRequest) URL ¶
func (s *AddHomeRoomDeviceRequest) URL() string
URL for Request.URL()
type AddHomeRoomDeviceResponse ¶
type AddHomeRoomDeviceResponse bool
type AddRoomRequest ¶
type AddRoomRequest struct { HomeID int64 `url:"-" validate:"required" json:"-"` // Family id Name string `url:"-" validate:"required" json:"name"` // Room name }
func (*AddRoomRequest) Method ¶
func (s *AddRoomRequest) Method() string
Method for Request.Method()
type AddRoomResponse ¶
type AddRoomResponse int64
type DeleteHomeMemberRequest ¶
type DeleteHomeMemberRequest struct { HomeID int64 `url:"-" validate:"required" json:"-"` // family id UID string `url:"-" validate:"required" json:"-"` // User ID in tuya }
func (*DeleteHomeMemberRequest) Method ¶
func (s *DeleteHomeMemberRequest) Method() string
Method for Request.Method()
func (*DeleteHomeMemberRequest) URL ¶
func (s *DeleteHomeMemberRequest) URL() string
URL for Request.URL()
type DeleteHomeMemberResponse ¶
type DeleteHomeMemberResponse bool
type DeleteHomeRequest ¶
type DeleteHomeRequest struct {
HomeID int64 `url:"-" validate:"required" json:"-"` // Family id
}
func (*DeleteHomeRequest) Method ¶
func (s *DeleteHomeRequest) Method() string
Method for Request.Method()
type DeleteHomeResponse ¶
type DeleteHomeResponse bool
type DeleteHomeRoomDeviceRequest ¶
type DeleteHomeRoomDeviceRequest struct { HomeID int64 `url:"-" validate:"required" json:"-"` // home ID RoomID int64 `url:"-" validate:"required" json:"-"` // room ID DeviceIDs []string `url:"-" validate:"required" json:"device_ids"` // devices ID }
func (*DeleteHomeRoomDeviceRequest) Method ¶
func (s *DeleteHomeRoomDeviceRequest) Method() string
Method for Request.Method()
func (*DeleteHomeRoomDeviceRequest) URL ¶
func (s *DeleteHomeRoomDeviceRequest) URL() string
URL for Request.URL()
type DeleteRoomRequest ¶
type DeleteRoomRequest struct { HomeID int64 `url:"-" validate:"required" json:"-"` // Family id RoomID int64 `url:"-" validate:"required" json:"-"` // Room id }
func (*DeleteRoomRequest) Method ¶
func (s *DeleteRoomRequest) Method() string
Method for Request.Method()
type DeleteRoomResponse ¶
type DeleteRoomResponse bool
type Device ¶
type Device struct { ID string `json:"id"` // device ID UID string `json:"uid"` // User id LocalKey string `json:"local_key"` // Key Category string `json:"category"` // Product Category ProductID string `json:"product_id"` // Product id Sub bool `json:"sub"` // Whether it is a sub-equipment (true: yes, false: no) UUID string `json:"uuid"` // Device unique identifier OwnerID string `json:"owner_id"` // Device owner id Online bool `json:"online"` // Device online status IP string `json:"ip"` // Device IP Name string `json:"name"` // Device name TimeZone string `json:"time_zone"` // Device time zone Status Status `json:"status"` // Device function status }
type Member ¶
type Member struct { CountryCode string `url:"-" validate:"required" json:"country_code"` // Country code MemberAccount string `url:"-" validate:"required" json:"member_account"` // Member account Admin bool `url:"-" validate:"required" json:"admin"` // Whether an administrator Name string `url:"-" validate:"required" json:"name"` // Member name }
type QueryHomeDeviceRequest ¶
type QueryHomeDeviceRequest struct {
HomeID int64 `url:"-" validate:"required" json:"-"` // Family id
}
func (*QueryHomeDeviceRequest) Method ¶
func (s *QueryHomeDeviceRequest) Method() string
Method for Request.Method()
func (*QueryHomeDeviceRequest) URL ¶
func (s *QueryHomeDeviceRequest) URL() string
URL for Request.URL()
type QueryHomeDeviceResponse ¶
type QueryHomeDeviceResponse struct { ID string `json:"id"` // Device ID UID string `json:"uid"` // User ID LocalKey string `json:"local_key"` // Key Category string `json:"category"` // Product Category ProductID string `json:"product_id"` // Product ID Sub bool `json:"sub"` // Whether it is a sub-device (true: yes, false: no) UUID string `json:"uuid"` // Device unique identifier OwnerID string `json:"owner_id"` // Device owner ID Online bool `json:"online"` // Device online status Ip string `json:"ip"` // Device IP Name string `json:"name"` // Device name TimeZone string `json:"time_zone"` // Time zone of the device Status Status `json:"status"` // Device function status }
type QueryHomeMembersRequest ¶
type QueryHomeMembersRequest struct {
HomeID int64 `url:"-" validate:"required" json:"-"` // family id
}
func (*QueryHomeMembersRequest) Method ¶
func (s *QueryHomeMembersRequest) Method() string
Method for Request.Method()
func (*QueryHomeMembersRequest) URL ¶
func (s *QueryHomeMembersRequest) URL() string
URL for Request.URL()
type QueryHomeMembersResponse ¶
type QueryHomeMembersResponse []Member
type QueryHomeRequest ¶
type QueryHomeRequest struct {
HomeID int64 `url:"-" validate:"required" json:"-"` // Family ID
}
func (*QueryHomeRequest) Method ¶
func (s *QueryHomeRequest) Method() string
Method for Request.Method()
type QueryHomeResponse ¶
type QueryHomeRoomDeviceRequest ¶
type QueryHomeRoomDeviceRequest struct { HomeID int64 `url:"-" validate:"required" json:"-"` // Family ID RoomID int64 `url:"-" validate:"required" json:"-"` // Room ID }
func (*QueryHomeRoomDeviceRequest) Method ¶
func (s *QueryHomeRoomDeviceRequest) Method() string
Method for Request.Method()
func (*QueryHomeRoomDeviceRequest) URL ¶
func (s *QueryHomeRoomDeviceRequest) URL() string
URL for Request.URL()
type QueryHomeRoomDeviceResponse ¶
type QueryHomeRoomDeviceResponse []Device
type QueryRoomInfoRequest ¶
type QueryRoomInfoRequest struct {
HomeID int64 `url:"-" validate:"required" json:"-"` // Family id
}
func (*QueryRoomInfoRequest) Method ¶
func (s *QueryRoomInfoRequest) Method() string
Method for Request.Method()
func (*QueryRoomInfoRequest) URL ¶
func (s *QueryRoomInfoRequest) URL() string
URL for Request.URL()
type QueryRoomInfoResponse ¶
type QueryRoomInfoResponse struct { HomeID int64 `json:"home_id"` // Family ID Name string `json:"name"` // Family name GeoName string `json:"geo_name"` // Family location Longitude float32 `json:"lon"` // Longitude Latitude float32 `json:"lat"` // Latitude Rooms []Room `json:"rooms"` // Room list }
type UpdateHomeMemberPermissionRequest ¶
type UpdateHomeMemberPermissionRequest struct { HomeID int64 `url:"-" validate:"required" json:"-"` // Family id UID string `url:"-" validate:"required" json:"-"` // User ID in tuya Admin bool `url:"-" validate:"required" json:"admin"` // The home administrator indicates, true is the administrator and false is not the administrator. }
func (*UpdateHomeMemberPermissionRequest) Method ¶
func (s *UpdateHomeMemberPermissionRequest) Method() string
Method for Request.Method()
func (*UpdateHomeMemberPermissionRequest) URL ¶
func (s *UpdateHomeMemberPermissionRequest) URL() string
URL for Request.URL()
type UpdateHomeMemberPermissionResponse ¶
type UpdateHomeMemberPermissionResponse bool
type UpdateHomeRequest ¶
type UpdateHomeRequest struct { HomeID int64 `url:"-" validate:"required" json:"-"` // Family ID Name string `url:"-" json:"name,omitempty"` // Family name GeoName string `url:"-" json:"geo_name,omitempty"` // Family location Longitude float32 `url:"-" json:"lon,omitempty"` // Longitude Latitude float32 `url:"-" json:"lat,omitempty"` // Latitude }
func (*UpdateHomeRequest) Method ¶
func (s *UpdateHomeRequest) Method() string
Method for Request.Method()
type UpdateHomeResponse ¶
type UpdateHomeResponse bool
type UpdateHomeRoomDeviceRequest ¶
type UpdateHomeRoomDeviceRequest struct { HomeID int64 `url:"-" validate:"required" json:"-"` // home ID RoomID int64 `url:"-" validate:"required" json:"-"` // room ID DeviceIDs []string `url:"-" validate:"required" json:"device_ids"` // device IDs }
func (*UpdateHomeRoomDeviceRequest) Method ¶
func (s *UpdateHomeRoomDeviceRequest) Method() string
Method for Request.Method()
func (*UpdateHomeRoomDeviceRequest) URL ¶
func (s *UpdateHomeRoomDeviceRequest) URL() string
URL for Request.URL()
type UpdateHomeRoomDeviceResponse ¶
type UpdateHomeRoomDeviceResponse bool
type UpdateRoomRequest ¶
type UpdateRoomRequest struct { HomeID int64 `url:"-" validate:"required" json:"-"` // Family ID RoomID int64 `url:"-" validate:"required" json:"-"` // Room ID Name string `url:"-" validate:"required" json:"name"` // Room name }
func (*UpdateRoomRequest) Method ¶
func (s *UpdateRoomRequest) Method() string
Method for Request.Method()
type UpdateRoomResponse ¶
type UpdateRoomResponse bool