Documentation
¶
Index ¶
- Constants
- type Account
- type AccountsPageData
- type Cameras
- type ConfirmRequest
- type ConfirmResponse
- type EventsInputModel
- type Finances
- type HAConfig
- type Handler
- func (h *Handler) Accounts(username *string) (a []Account, err error)
- func (h *Handler) AccountsHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Cameras() (string, error)
- func (h *Handler) CamerasHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Door(r *http.Request) (string, error)
- func (h *Handler) DoorHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Events(w http.ResponseWriter, r *http.Request) (string, error)
- func (h *Handler) EventsHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Finances() ([]byte, error)
- func (h *Handler) FinancesHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetFinances() (*Finances, error)
- func (h *Handler) HANetwork() (string, error)
- func (h *Handler) HomeHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) LastEvent(w http.ResponseWriter, r *http.Request) (events EventsInputModel, err error)
- func (h *Handler) LastEventHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) LoginAddressHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) LoginHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) LoginSMSHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Operators() (string, error)
- func (h *Handler) OperatorsHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Places() (string, error)
- func (h *Handler) PlacesHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Refresh(refreshToken *string) (string, string, error)
- func (h *Handler) RequestCode(username *string, account Account) (result bool, err error)
- func (h *Handler) SendCode(r *http.Request) (authToken, refreshToken string, err error)
- func (h *Handler) SnapshotHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Stream(r *http.Request) (string, error)
- func (h *Handler) StreamHandler(w http.ResponseWriter, r *http.Request)
- type Header
- type HomePageData
- type LoginPageData
- type Places
- type SMSPageData
Constants ¶
View Source
const ( API_USER_AGENT = "myHomeErth/8 CFNetwork/1209 Darwin/20.2.0" CLIENT_USERAGENT = "iPhone11,6 | iOS 14.3 | erth | 6.4.6 (build 3) | %s | 2 | %s" API_HA_NETWORK = "http://supervisor/network/info" API_AUTH_LOGIN = "https://myhome.novotelecom.ru/auth/v2/login/%s" API_AUTH_CONFIRMATION = "https://myhome.novotelecom.ru/auth/v2/confirmation/%s" API_AUTH_CONFIRMATION_SMS = "https://myhome.novotelecom.ru/auth/v2/auth/%s/confirmation" API_AUTH = "https://api-auth.domru.ru/v1/person/auth" API_CAMERAS = "https://myhome.novotelecom.ru/rest/v1/forpost/cameras" API_OPEN_DOOR = "https://myhome.novotelecom.ru/rest/v1/places/%s/accesscontrols/%s/actions" API_FINANCES = "https://myhome.novotelecom.ru/rest/v1/subscribers/profiles/finances" API_SUBSCRIBER_PLACES = "https://myhome.novotelecom.ru/rest/v1/subscriberplaces" API_VIDEO_SNAPSHOT = "https://myhome.novotelecom.ru/rest/v1/places/%s/accesscontrols/%s/videosnapshots" API_CAMERA_GET_STREAM = "https://myhome.novotelecom.ru/rest/v1/forpost/cameras/%s/video" API_REFRESH_SESSION = "https://myhome.novotelecom.ru/auth/v2/session/refresh" API_EVENTS = "https://myhome.novotelecom.ru/rest/v1/places/%s/events?allowExtentedActions=true" API_OPERATORS = "https://myhome.novotelecom.ru/public/v1/operators" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountsPageData ¶
type ConfirmRequest ¶
type ConfirmResponse ¶
type EventsInputModel ¶
type EventsInputModel struct { Data []struct { ID string `json:"id,omitempty"` PlaceID int `json:"placeId,omitempty"` EventTypeName string `json:"eventTypeName,omitempty"` Timestamp string `json:"timestamp,omitempty"` Message string `json:"message,omitempty"` Source struct { Type string `json:"type,omitempty"` ID int `json:"id,omitempty"` } `json:"source,omitempty"` Value struct { Type string `json:"type,omitempty"` Value bool `json:"value,omitempty"` } `json:"value,omitempty"` EventStatusValue interface{} `json:"eventStatusValue,omitempty"` Actions []interface{} `json:"actions,omitempty"` } `json:"data,omitempty"` }
type Handler ¶
type Handler struct { Config *config.Config UserAccounts []Account Account *Account TemplateFs embed.FS }
func (*Handler) AccountsHandler ¶
func (h *Handler) AccountsHandler(w http.ResponseWriter, r *http.Request)
AccountsHandler ...
func (*Handler) CamerasHandler ¶
func (h *Handler) CamerasHandler(w http.ResponseWriter, r *http.Request)
CamerasHandler ...
func (*Handler) DoorHandler ¶
func (h *Handler) DoorHandler(w http.ResponseWriter, r *http.Request)
DoorHandler ...
func (*Handler) EventsHandler ¶
func (h *Handler) EventsHandler(w http.ResponseWriter, r *http.Request)
EventsHandler ...
func (*Handler) FinancesHandler ¶
func (h *Handler) FinancesHandler(w http.ResponseWriter, r *http.Request)
FinancesHandler ...
func (*Handler) GetFinances ¶
func (*Handler) HomeHandler ¶
func (h *Handler) HomeHandler(w http.ResponseWriter, r *http.Request)
HomeHandler ...
func (*Handler) LastEvent ¶
func (h *Handler) LastEvent(w http.ResponseWriter, r *http.Request) (events EventsInputModel, err error)
Events ...
func (*Handler) LastEventHandler ¶
func (h *Handler) LastEventHandler(w http.ResponseWriter, r *http.Request)
EventsHandler ...
func (*Handler) LoginAddressHandler ¶
func (h *Handler) LoginAddressHandler(w http.ResponseWriter, r *http.Request)
LoginAddressHandler ...
func (*Handler) LoginHandler ¶
func (h *Handler) LoginHandler(w http.ResponseWriter, r *http.Request)
LoginHandler ...
func (*Handler) LoginSMSHandler ¶
func (h *Handler) LoginSMSHandler(w http.ResponseWriter, r *http.Request)
LoginSMSHandler ...
func (*Handler) OperatorsHandler ¶
func (h *Handler) OperatorsHandler(w http.ResponseWriter, r *http.Request)
OperatorsHandler ...
func (*Handler) PlacesHandler ¶
func (h *Handler) PlacesHandler(w http.ResponseWriter, r *http.Request)
PlacesHandler ...
func (*Handler) RequestCode ¶
RequestCode ...
func (*Handler) SnapshotHandler ¶
func (h *Handler) SnapshotHandler(w http.ResponseWriter, r *http.Request)
SnapshotHandler ...
func (*Handler) StreamHandler ¶
func (h *Handler) StreamHandler(w http.ResponseWriter, r *http.Request)
StreamHandler ...
type HomePageData ¶
type LoginPageData ¶
type Places ¶
type Places struct { Data []struct { ID int `json:"id"` Place struct { ID int `json:"id"` Address struct { VisibleAddress string `json:"visibleAddress"` } `json:"address"` AccessControls []struct { ID int `json:"id"` Name string `json:"name"` } `json:"accessControls"` } `json:"place"` Subscriber struct { ID int `json:"id"` Name string `json:"name"` AccountID string `json:"accountId"` } `json:"subscriber"` Blocked bool `json:"blocked"` } `json:"data"` }
Click to show internal directories.
Click to hide internal directories.