Documentation
¶
Index ¶
- Constants
- Variables
- type AuthRequestPayload
- type Control
- func (*Control) Descriptor() ([]byte, []int)deprecated
- func (x *Control) GetForceConnectToServer() bool
- func (x *Control) GetNightLight() Control_NightLight
- func (x *Control) GetNightLightTimeout() int32
- func (x *Control) GetSensorDataTransfer() *Control_SensorDataTransfer
- func (*Control) ProtoMessage()
- func (x *Control) ProtoReflect() protoreflect.Message
- func (x *Control) Reset()
- func (x *Control) String() string
- type Control_NightLight
- func (Control_NightLight) Descriptor() protoreflect.EnumDescriptor
- func (x Control_NightLight) Enum() *Control_NightLight
- func (Control_NightLight) EnumDescriptor() ([]byte, []int)deprecated
- func (x Control_NightLight) Number() protoreflect.EnumNumber
- func (x Control_NightLight) String() string
- func (Control_NightLight) Type() protoreflect.EnumType
- func (x *Control_NightLight) UnmarshalJSON(b []byte) errordeprecated
- type Control_SensorDataTransfer
- func (*Control_SensorDataTransfer) Descriptor() ([]byte, []int)deprecated
- func (x *Control_SensorDataTransfer) GetHumidity() bool
- func (x *Control_SensorDataTransfer) GetLight() bool
- func (x *Control_SensorDataTransfer) GetNight() bool
- func (x *Control_SensorDataTransfer) GetTemperature() bool
- func (*Control_SensorDataTransfer) ProtoMessage()
- func (x *Control_SensorDataTransfer) ProtoReflect() protoreflect.Message
- func (x *Control_SensorDataTransfer) Reset()
- func (x *Control_SensorDataTransfer) String() string
- type GetLogs
- type GetSensorData
- func (*GetSensorData) Descriptor() ([]byte, []int)deprecated
- func (x *GetSensorData) GetAll() bool
- func (x *GetSensorData) GetHumidity() bool
- func (x *GetSensorData) GetLight() bool
- func (x *GetSensorData) GetNight() bool
- func (x *GetSensorData) GetTemperature() bool
- func (*GetSensorData) ProtoMessage()
- func (x *GetSensorData) ProtoReflect() protoreflect.Message
- func (x *GetSensorData) Reset()
- func (x *GetSensorData) String() string
- type GetStatus
- type MFARequiredError
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetRequest() *Request
- func (x *Message) GetResponse() *Response
- func (x *Message) GetType() Message_Type
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type Message_Type
- func (Message_Type) Descriptor() protoreflect.EnumDescriptor
- func (x Message_Type) Enum() *Message_Type
- func (Message_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (x Message_Type) Number() protoreflect.EnumNumber
- func (x Message_Type) String() string
- func (Message_Type) Type() protoreflect.EnumType
- func (x *Message_Type) UnmarshalJSON(b []byte) errordeprecated
- type MountingMode
- func (MountingMode) Descriptor() protoreflect.EnumDescriptor
- func (x MountingMode) Enum() *MountingMode
- func (MountingMode) EnumDescriptor() ([]byte, []int)deprecated
- func (x MountingMode) Number() protoreflect.EnumNumber
- func (x MountingMode) String() string
- func (MountingMode) Type() protoreflect.EnumType
- func (x *MountingMode) UnmarshalJSON(b []byte) errordeprecated
- type NanitClient
- func (c *NanitClient) Authorize()
- func (c *NanitClient) EnsureBabies() []baby.Baby
- func (c *NanitClient) FetchAuthorized(req *http.Request, data interface{})
- func (c *NanitClient) FetchBabies() []baby.Baby
- func (c *NanitClient) FetchMessages(babyUID string, limit int) []message.Message
- func (c *NanitClient) FetchNewMessages(babyUID string, defaultMessageTimeout time.Duration) []message.Message
- func (c *NanitClient) Login(authReq *AuthRequestPayload) (accessToken string, refreshToken string, err error)
- func (c *NanitClient) MaybeAuthorize(force bool)
- func (c *NanitClient) RenewSession() error
- type Playback
- type Playback_Status
- func (Playback_Status) Descriptor() protoreflect.EnumDescriptor
- func (x Playback_Status) Enum() *Playback_Status
- func (Playback_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x Playback_Status) Number() protoreflect.EnumNumber
- func (x Playback_Status) String() string
- func (Playback_Status) Type() protoreflect.EnumType
- func (x *Playback_Status) UnmarshalJSON(b []byte) errordeprecated
- type Request
- func (*Request) Descriptor() ([]byte, []int)deprecated
- func (x *Request) GetControl() *Control
- func (x *Request) GetGetLogs() *GetLogs
- func (x *Request) GetGetSensorData() *GetSensorData
- func (x *Request) GetGetStatus_() *GetStatus
- func (x *Request) GetId() int32
- func (x *Request) GetPlayback() *Playback
- func (x *Request) GetSensorData_() []*SensorData
- func (x *Request) GetSettings() *Settings
- func (x *Request) GetStatus() *Status
- func (x *Request) GetStreaming() *Streaming
- func (x *Request) GetType() RequestType
- func (*Request) ProtoMessage()
- func (x *Request) ProtoReflect() protoreflect.Message
- func (x *Request) Reset()
- func (x *Request) String() string
- type RequestType
- func (RequestType) Descriptor() protoreflect.EnumDescriptor
- func (x RequestType) Enum() *RequestType
- func (RequestType) EnumDescriptor() ([]byte, []int)deprecated
- func (x RequestType) Number() protoreflect.EnumNumber
- func (x RequestType) String() string
- func (RequestType) Type() protoreflect.EnumType
- func (x *RequestType) UnmarshalJSON(b []byte) errordeprecated
- type Response
- func (*Response) Descriptor() ([]byte, []int)deprecated
- func (x *Response) GetRequestId() int32
- func (x *Response) GetRequestType() RequestType
- func (x *Response) GetSensorData() []*SensorData
- func (x *Response) GetSettings() *Settings
- func (x *Response) GetStatus() *Status
- func (x *Response) GetStatusCode() int32
- func (x *Response) GetStatusMessage() string
- func (*Response) ProtoMessage()
- func (x *Response) ProtoReflect() protoreflect.Message
- func (x *Response) Reset()
- func (x *Response) String() string
- type SensorData
- func (*SensorData) Descriptor() ([]byte, []int)deprecated
- func (x *SensorData) GetIsAlert() bool
- func (x *SensorData) GetSensorType() SensorType
- func (x *SensorData) GetTimestamp() int32
- func (x *SensorData) GetValue() int32
- func (x *SensorData) GetValueMilli() int32
- func (*SensorData) ProtoMessage()
- func (x *SensorData) ProtoReflect() protoreflect.Message
- func (x *SensorData) Reset()
- func (x *SensorData) String() string
- type SensorType
- func (SensorType) Descriptor() protoreflect.EnumDescriptor
- func (x SensorType) Enum() *SensorType
- func (SensorType) EnumDescriptor() ([]byte, []int)deprecated
- func (x SensorType) Number() protoreflect.EnumNumber
- func (x SensorType) String() string
- func (SensorType) Type() protoreflect.EnumType
- func (x *SensorType) UnmarshalJSON(b []byte) errordeprecated
- type Settings
- func (*Settings) Descriptor() ([]byte, []int)deprecated
- func (x *Settings) GetAntiFlicker() Settings_AntiFlicker
- func (x *Settings) GetMicMuteOn() bool
- func (x *Settings) GetMountingMode() int32
- func (x *Settings) GetNightVision() bool
- func (x *Settings) GetSensors() []*Settings_SensorSettings
- func (x *Settings) GetSleepMode() bool
- func (x *Settings) GetStatusLightOn() bool
- func (x *Settings) GetStreams() []*Settings_StreamSettings
- func (x *Settings) GetVolume() int32
- func (x *Settings) GetWifiBand() Settings_WifiBand
- func (*Settings) ProtoMessage()
- func (x *Settings) ProtoReflect() protoreflect.Message
- func (x *Settings) Reset()
- func (x *Settings) String() string
- type Settings_AntiFlicker
- func (Settings_AntiFlicker) Descriptor() protoreflect.EnumDescriptor
- func (x Settings_AntiFlicker) Enum() *Settings_AntiFlicker
- func (Settings_AntiFlicker) EnumDescriptor() ([]byte, []int)deprecated
- func (x Settings_AntiFlicker) Number() protoreflect.EnumNumber
- func (x Settings_AntiFlicker) String() string
- func (Settings_AntiFlicker) Type() protoreflect.EnumType
- func (x *Settings_AntiFlicker) UnmarshalJSON(b []byte) errordeprecated
- type Settings_SensorSettings
- func (*Settings_SensorSettings) Descriptor() ([]byte, []int)deprecated
- func (x *Settings_SensorSettings) GetHighThreshold() int32
- func (x *Settings_SensorSettings) GetLowThreshold() int32
- func (x *Settings_SensorSettings) GetSampleIntervalSec() int32
- func (x *Settings_SensorSettings) GetSensorType() SensorType
- func (x *Settings_SensorSettings) GetTriggerIntervalSec() int32
- func (x *Settings_SensorSettings) GetUseHighThreshold() bool
- func (x *Settings_SensorSettings) GetUseLowThreshold() bool
- func (x *Settings_SensorSettings) GetUseMilliForThresholds() bool
- func (*Settings_SensorSettings) ProtoMessage()
- func (x *Settings_SensorSettings) ProtoReflect() protoreflect.Message
- func (x *Settings_SensorSettings) Reset()
- func (x *Settings_SensorSettings) String() string
- type Settings_StreamSettings
- func (*Settings_StreamSettings) Descriptor() ([]byte, []int)deprecated
- func (x *Settings_StreamSettings) GetBestBitrate() int32
- func (x *Settings_StreamSettings) GetBestFps() int32
- func (x *Settings_StreamSettings) GetBitrate() int32
- func (x *Settings_StreamSettings) GetEconomyBitrate() int32
- func (x *Settings_StreamSettings) GetEconomyFps() int32
- func (x *Settings_StreamSettings) GetId() StreamIdentifier
- func (*Settings_StreamSettings) ProtoMessage()
- func (x *Settings_StreamSettings) ProtoReflect() protoreflect.Message
- func (x *Settings_StreamSettings) Reset()
- func (x *Settings_StreamSettings) String() string
- type Settings_WifiBand
- func (Settings_WifiBand) Descriptor() protoreflect.EnumDescriptor
- func (x Settings_WifiBand) Enum() *Settings_WifiBand
- func (Settings_WifiBand) EnumDescriptor() ([]byte, []int)deprecated
- func (x Settings_WifiBand) Number() protoreflect.EnumNumber
- func (x Settings_WifiBand) String() string
- func (Settings_WifiBand) Type() protoreflect.EnumType
- func (x *Settings_WifiBand) UnmarshalJSON(b []byte) errordeprecated
- type Status
- func (*Status) Descriptor() ([]byte, []int)deprecated
- func (x *Status) GetConnectionToServer() Status_ConnectionToServer
- func (x *Status) GetCurrentVersion() string
- func (x *Status) GetDownloadedVersion() string
- func (x *Status) GetHardwareVersion() string
- func (x *Status) GetIsSecurityUpgrade() bool
- func (x *Status) GetMode() MountingMode
- func (x *Status) GetUpgradeDownloaded() bool
- func (*Status) ProtoMessage()
- func (x *Status) ProtoReflect() protoreflect.Message
- func (x *Status) Reset()
- func (x *Status) String() string
- type Status_ConnectionToServer
- func (Status_ConnectionToServer) Descriptor() protoreflect.EnumDescriptor
- func (x Status_ConnectionToServer) Enum() *Status_ConnectionToServer
- func (Status_ConnectionToServer) EnumDescriptor() ([]byte, []int)deprecated
- func (x Status_ConnectionToServer) Number() protoreflect.EnumNumber
- func (x Status_ConnectionToServer) String() string
- func (Status_ConnectionToServer) Type() protoreflect.EnumType
- func (x *Status_ConnectionToServer) UnmarshalJSON(b []byte) errordeprecated
- type Stream
- type StreamIdentifier
- func (StreamIdentifier) Descriptor() protoreflect.EnumDescriptor
- func (x StreamIdentifier) Enum() *StreamIdentifier
- func (StreamIdentifier) EnumDescriptor() ([]byte, []int)deprecated
- func (x StreamIdentifier) Number() protoreflect.EnumNumber
- func (x StreamIdentifier) String() string
- func (StreamIdentifier) Type() protoreflect.EnumType
- func (x *StreamIdentifier) UnmarshalJSON(b []byte) errordeprecated
- type Stream_Type
- func (Stream_Type) Descriptor() protoreflect.EnumDescriptor
- func (x Stream_Type) Enum() *Stream_Type
- func (Stream_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (x Stream_Type) Number() protoreflect.EnumNumber
- func (x Stream_Type) String() string
- func (Stream_Type) Type() protoreflect.EnumType
- func (x *Stream_Type) UnmarshalJSON(b []byte) errordeprecated
- type Streaming
- func (*Streaming) Descriptor() ([]byte, []int)deprecated
- func (x *Streaming) GetAttempts() int32
- func (x *Streaming) GetId() StreamIdentifier
- func (x *Streaming) GetRtmpUrl() string
- func (x *Streaming) GetStatus() Streaming_Status
- func (*Streaming) ProtoMessage()
- func (x *Streaming) ProtoReflect() protoreflect.Message
- func (x *Streaming) Reset()
- func (x *Streaming) String() string
- type Streaming_Status
- func (Streaming_Status) Descriptor() protoreflect.EnumDescriptor
- func (x Streaming_Status) Enum() *Streaming_Status
- func (Streaming_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x Streaming_Status) Number() protoreflect.EnumNumber
- func (x Streaming_Status) String() string
- func (Streaming_Status) Type() protoreflect.EnumType
- func (x *Streaming_Status) UnmarshalJSON(b []byte) errordeprecated
- type WebsocketConnection
- type WebsocketConnectionHandler
- type WebsocketConnectionManager
- type WebsocketMessageHandler
Constants ¶
const ( // AuthTokenTimelife - Time duration after which we assume auth token expired AuthTokenTimelife = 60 * time.Minute )
Variables ¶
var ( RequestType_name = map[int32]string{ 3: "GET_STREAMING", 2: "PUT_STREAMING", 4: "GET_SETTINGS", 5: "PUT_SETTINGS", 6: "GET_CONTROL", 7: "PUT_CONTROL", 8: "GET_STATUS", 9: "PUT_STATUS", 12: "GET_SENSOR_DATA", 11: "PUT_SENSOR_DATA", 13: "GET_UCTOKENS", 14: "PUT_UCTOKENS", 15: "PUT_SETUP_NETWORK", 16: "PUT_SETUP_SERVER", 17: "GET_FIRMWARE", 18: "PUT_FIRMWARE", 19: "GET_PLAYBACK", 20: "PUT_PLAYBACK", 21: "GET_SOUNDTRACKS", 22: "GET_STATUS_NETWORK", 23: "GET_LIST_NETWORKS", 24: "GET_LOGS", 25: "GET_BANDWIDTH", 26: "GET_AUDIO_STREAMING", 27: "PUT_AUDIO_STREAMING", 28: "GET_WIFI_SETUP", 29: "PUT_WIFI_SETUP", 30: "PUT_STING_START", 31: "PUT_STING_STOP", 32: "PUT_STING_STATUS", 34: "PUT_STING_ALERT", 35: "PUT_KEEP_ALIVE", 36: "GET_STING_STATUS", 37: "PUT_STING_TEST", 38: "PUT_RTSP_STREAMING", 39: "GET_UOM_URI", 40: "GET_UOM", 41: "PUT_UOM", 42: "GET_AUTH_KEY", 43: "PUT_AUTH_KEY", 44: "PUT_HEALTH", 45: "PUT_TCP_REQUEST", 46: "GET_STING_START", 47: "GET_LOGS_URI", } RequestType_value = map[string]int32{ "GET_STREAMING": 3, "PUT_STREAMING": 2, "GET_SETTINGS": 4, "PUT_SETTINGS": 5, "GET_CONTROL": 6, "PUT_CONTROL": 7, "GET_STATUS": 8, "PUT_STATUS": 9, "GET_SENSOR_DATA": 12, "PUT_SENSOR_DATA": 11, "GET_UCTOKENS": 13, "PUT_UCTOKENS": 14, "PUT_SETUP_NETWORK": 15, "PUT_SETUP_SERVER": 16, "GET_FIRMWARE": 17, "PUT_FIRMWARE": 18, "GET_PLAYBACK": 19, "PUT_PLAYBACK": 20, "GET_SOUNDTRACKS": 21, "GET_STATUS_NETWORK": 22, "GET_LIST_NETWORKS": 23, "GET_LOGS": 24, "GET_BANDWIDTH": 25, "GET_AUDIO_STREAMING": 26, "PUT_AUDIO_STREAMING": 27, "GET_WIFI_SETUP": 28, "PUT_WIFI_SETUP": 29, "PUT_STING_START": 30, "PUT_STING_STOP": 31, "PUT_STING_STATUS": 32, "PUT_STING_ALERT": 34, "PUT_KEEP_ALIVE": 35, "GET_STING_STATUS": 36, "PUT_STING_TEST": 37, "PUT_RTSP_STREAMING": 38, "GET_UOM_URI": 39, "GET_UOM": 40, "PUT_UOM": 41, "GET_AUTH_KEY": 42, "PUT_AUTH_KEY": 43, "PUT_HEALTH": 44, "PUT_TCP_REQUEST": 45, "GET_STING_START": 46, "GET_LOGS_URI": 47, } )
Enum value maps for RequestType.
var ( SensorType_name = map[int32]string{ 0: "SOUND", 1: "MOTION", 2: "TEMPERATURE", 3: "HUMIDITY", 4: "LIGHT", 5: "NIGHT", } SensorType_value = map[string]int32{ "SOUND": 0, "MOTION": 1, "TEMPERATURE": 2, "HUMIDITY": 3, "LIGHT": 4, "NIGHT": 5, } )
Enum value maps for SensorType.
var ( StreamIdentifier_name = map[int32]string{ 0: "DVR", 1: "ANALYTICS", 2: "MOBILE", } StreamIdentifier_value = map[string]int32{ "DVR": 0, "ANALYTICS": 1, "MOBILE": 2, } )
Enum value maps for StreamIdentifier.
var ( MountingMode_name = map[int32]string{ 0: "STAND", 1: "TRAVEL", 2: "SWITCH", } MountingMode_value = map[string]int32{ "STAND": 0, "TRAVEL": 1, "SWITCH": 2, } )
Enum value maps for MountingMode.
var ( Control_NightLight_name = map[int32]string{ 0: "LIGHT_OFF", 1: "LIGHT_ON", } Control_NightLight_value = map[string]int32{ "LIGHT_OFF": 0, "LIGHT_ON": 1, } )
Enum value maps for Control_NightLight.
var ( Settings_AntiFlicker_name = map[int32]string{ 0: "FR50HZ", 1: "FR60HZ", } Settings_AntiFlicker_value = map[string]int32{ "FR50HZ": 0, "FR60HZ": 1, } )
Enum value maps for Settings_AntiFlicker.
var ( Settings_WifiBand_name = map[int32]string{ 0: "ANY", 1: "FR2_4GHZ", 2: "FR5_0GHZ", } Settings_WifiBand_value = map[string]int32{ "ANY": 0, "FR2_4GHZ": 1, "FR5_0GHZ": 2, } )
Enum value maps for Settings_WifiBand.
var ( Status_ConnectionToServer_name = map[int32]string{ 0: "DISCONNECTED", 1: "CONNECTED", } Status_ConnectionToServer_value = map[string]int32{ "DISCONNECTED": 0, "CONNECTED": 1, } )
Enum value maps for Status_ConnectionToServer.
var ( Playback_Status_name = map[int32]string{ 0: "STARTED", 1: "STOPPED", } Playback_Status_value = map[string]int32{ "STARTED": 0, "STOPPED": 1, } )
Enum value maps for Playback_Status.
var ( Stream_Type_name = map[int32]string{ 0: "LOCAL", 1: "REMOTE", 2: "RTSP", 3: "P2P", } Stream_Type_value = map[string]int32{ "LOCAL": 0, "REMOTE": 1, "RTSP": 2, "P2P": 3, } )
Enum value maps for Stream_Type.
var ( Streaming_Status_name = map[int32]string{ 0: "STARTED", 1: "STOPPED", 2: "PAUSED", } Streaming_Status_value = map[string]int32{ "STARTED": 0, "STOPPED": 1, "PAUSED": 2, } )
Enum value maps for Streaming_Status.
var ( Message_Type_name = map[int32]string{ 0: "KEEPALIVE", 1: "REQUEST", 2: "RESPONSE", } Message_Type_value = map[string]int32{ "KEEPALIVE": 0, "REQUEST": 1, "RESPONSE": 2, } )
Enum value maps for Message_Type.
var ErrExpiredRefreshToken = errors.New("Refresh token has expired. Relogin required.")
var File_pkg_client_websocket_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type AuthRequestPayload ¶
type Control ¶
type Control struct {
ForceConnectToServer *bool `protobuf:"varint,5,opt,name=forceConnectToServer" json:"forceConnectToServer,omitempty"`
NightLightTimeout *int32 `protobuf:"varint,6,opt,name=nightLightTimeout" json:"nightLightTimeout,omitempty"`
NightLight *Control_NightLight `protobuf:"varint,3,opt,name=nightLight,enum=client.Control_NightLight" json:"nightLight,omitempty"`
SensorDataTransfer *Control_SensorDataTransfer `protobuf:"bytes,4,opt,name=sensorDataTransfer" json:"sensorDataTransfer,omitempty"`
// contains filtered or unexported fields
}
func (*Control) Descriptor
deprecated
func (*Control) GetForceConnectToServer ¶
func (*Control) GetNightLight ¶
func (x *Control) GetNightLight() Control_NightLight
func (*Control) GetNightLightTimeout ¶
func (*Control) GetSensorDataTransfer ¶
func (x *Control) GetSensorDataTransfer() *Control_SensorDataTransfer
func (*Control) ProtoMessage ¶
func (*Control) ProtoMessage()
func (*Control) ProtoReflect ¶
func (x *Control) ProtoReflect() protoreflect.Message
type Control_NightLight ¶
type Control_NightLight int32
const ( Control_LIGHT_OFF Control_NightLight = 0 Control_LIGHT_ON Control_NightLight = 1 )
func (Control_NightLight) Descriptor ¶
func (Control_NightLight) Descriptor() protoreflect.EnumDescriptor
func (Control_NightLight) Enum ¶
func (x Control_NightLight) Enum() *Control_NightLight
func (Control_NightLight) EnumDescriptor
deprecated
func (Control_NightLight) EnumDescriptor() ([]byte, []int)
Deprecated: Use Control_NightLight.Descriptor instead.
func (Control_NightLight) Number ¶
func (x Control_NightLight) Number() protoreflect.EnumNumber
func (Control_NightLight) String ¶
func (x Control_NightLight) String() string
func (Control_NightLight) Type ¶
func (Control_NightLight) Type() protoreflect.EnumType
func (*Control_NightLight) UnmarshalJSON
deprecated
func (x *Control_NightLight) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type Control_SensorDataTransfer ¶
type Control_SensorDataTransfer struct {
Sound *bool `protobuf:"varint,1,opt,name=sound" json:"sound,omitempty"`
Motion *bool `protobuf:"varint,2,opt,name=motion" json:"motion,omitempty"`
Temperature *bool `protobuf:"varint,3,opt,name=temperature" json:"temperature,omitempty"`
Humidity *bool `protobuf:"varint,4,opt,name=humidity" json:"humidity,omitempty"`
Light *bool `protobuf:"varint,5,opt,name=light" json:"light,omitempty"`
Night *bool `protobuf:"varint,6,opt,name=night" json:"night,omitempty"`
// contains filtered or unexported fields
}
func (*Control_SensorDataTransfer) Descriptor
deprecated
func (*Control_SensorDataTransfer) Descriptor() ([]byte, []int)
Deprecated: Use Control_SensorDataTransfer.ProtoReflect.Descriptor instead.
func (*Control_SensorDataTransfer) GetHumidity ¶
func (x *Control_SensorDataTransfer) GetHumidity() bool
func (*Control_SensorDataTransfer) GetLight ¶
func (x *Control_SensorDataTransfer) GetLight() bool
func (*Control_SensorDataTransfer) GetNight ¶
func (x *Control_SensorDataTransfer) GetNight() bool
func (*Control_SensorDataTransfer) GetTemperature ¶
func (x *Control_SensorDataTransfer) GetTemperature() bool
func (*Control_SensorDataTransfer) ProtoMessage ¶
func (*Control_SensorDataTransfer) ProtoMessage()
func (*Control_SensorDataTransfer) ProtoReflect ¶
func (x *Control_SensorDataTransfer) ProtoReflect() protoreflect.Message
func (*Control_SensorDataTransfer) Reset ¶
func (x *Control_SensorDataTransfer) Reset()
func (*Control_SensorDataTransfer) String ¶
func (x *Control_SensorDataTransfer) String() string
type GetLogs ¶
type GetLogs struct {
Url *string `protobuf:"bytes,1,req,name=url" json:"url,omitempty"`
// contains filtered or unexported fields
}
func (*GetLogs) Descriptor
deprecated
func (*GetLogs) ProtoMessage ¶
func (*GetLogs) ProtoMessage()
func (*GetLogs) ProtoReflect ¶
func (x *GetLogs) ProtoReflect() protoreflect.Message
type GetSensorData ¶
type GetSensorData struct {
All *bool `protobuf:"varint,1,opt,name=all" json:"all,omitempty"`
Temperature *bool `protobuf:"varint,4,opt,name=temperature" json:"temperature,omitempty"`
Humidity *bool `protobuf:"varint,5,opt,name=humidity" json:"humidity,omitempty"`
Light *bool `protobuf:"varint,6,opt,name=light" json:"light,omitempty"`
Night *bool `protobuf:"varint,7,opt,name=night" json:"night,omitempty"`
// contains filtered or unexported fields
}
func (*GetSensorData) Descriptor
deprecated
func (*GetSensorData) Descriptor() ([]byte, []int)
Deprecated: Use GetSensorData.ProtoReflect.Descriptor instead.
func (*GetSensorData) GetAll ¶
func (x *GetSensorData) GetAll() bool
func (*GetSensorData) GetHumidity ¶
func (x *GetSensorData) GetHumidity() bool
func (*GetSensorData) GetLight ¶
func (x *GetSensorData) GetLight() bool
func (*GetSensorData) GetNight ¶
func (x *GetSensorData) GetNight() bool
func (*GetSensorData) GetTemperature ¶
func (x *GetSensorData) GetTemperature() bool
func (*GetSensorData) ProtoMessage ¶
func (*GetSensorData) ProtoMessage()
func (*GetSensorData) ProtoReflect ¶
func (x *GetSensorData) ProtoReflect() protoreflect.Message
func (*GetSensorData) Reset ¶
func (x *GetSensorData) Reset()
func (*GetSensorData) String ¶
func (x *GetSensorData) String() string
type GetStatus ¶
type GetStatus struct {
All *bool `protobuf:"varint,1,opt,name=all" json:"all,omitempty"`
// contains filtered or unexported fields
}
func (*GetStatus) Descriptor
deprecated
func (*GetStatus) ProtoMessage ¶
func (*GetStatus) ProtoMessage()
func (*GetStatus) ProtoReflect ¶
func (x *GetStatus) ProtoReflect() protoreflect.Message
type MFARequiredError ¶
type MFARequiredError struct {
MFAToken string
}
func (*MFARequiredError) Error ¶
func (e *MFARequiredError) Error() string
type Message ¶
type Message struct {
Type *Message_Type `protobuf:"varint,1,req,name=type,enum=client.Message_Type" json:"type,omitempty"`
Request *Request `protobuf:"bytes,2,opt,name=request" json:"request,omitempty"`
Response *Response `protobuf:"bytes,3,opt,name=response" json:"response,omitempty"`
// contains filtered or unexported fields
}
func (*Message) Descriptor
deprecated
func (*Message) GetRequest ¶
func (*Message) GetResponse ¶
func (*Message) GetType ¶
func (x *Message) GetType() Message_Type
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type Message_Type ¶
type Message_Type int32
const ( Message_KEEPALIVE Message_Type = 0 Message_REQUEST Message_Type = 1 Message_RESPONSE Message_Type = 2 )
func (Message_Type) Descriptor ¶
func (Message_Type) Descriptor() protoreflect.EnumDescriptor
func (Message_Type) Enum ¶
func (x Message_Type) Enum() *Message_Type
func (Message_Type) EnumDescriptor
deprecated
func (Message_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use Message_Type.Descriptor instead.
func (Message_Type) Number ¶
func (x Message_Type) Number() protoreflect.EnumNumber
func (Message_Type) String ¶
func (x Message_Type) String() string
func (Message_Type) Type ¶
func (Message_Type) Type() protoreflect.EnumType
func (*Message_Type) UnmarshalJSON
deprecated
func (x *Message_Type) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type MountingMode ¶
type MountingMode int32
const ( MountingMode_STAND MountingMode = 0 MountingMode_TRAVEL MountingMode = 1 MountingMode_SWITCH MountingMode = 2 )
func (MountingMode) Descriptor ¶
func (MountingMode) Descriptor() protoreflect.EnumDescriptor
func (MountingMode) Enum ¶
func (x MountingMode) Enum() *MountingMode
func (MountingMode) EnumDescriptor
deprecated
func (MountingMode) EnumDescriptor() ([]byte, []int)
Deprecated: Use MountingMode.Descriptor instead.
func (MountingMode) Number ¶
func (x MountingMode) Number() protoreflect.EnumNumber
func (MountingMode) String ¶
func (x MountingMode) String() string
func (MountingMode) Type ¶
func (MountingMode) Type() protoreflect.EnumType
func (*MountingMode) UnmarshalJSON
deprecated
func (x *MountingMode) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type NanitClient ¶
NanitClient - client context
func (*NanitClient) Authorize ¶
func (c *NanitClient) Authorize()
Authorize - performs authorization attempt, panics if it fails
func (*NanitClient) EnsureBabies ¶
func (c *NanitClient) EnsureBabies() []baby.Baby
EnsureBabies - fetches baby list if not fetched already
func (*NanitClient) FetchAuthorized ¶
func (c *NanitClient) FetchAuthorized(req *http.Request, data interface{})
FetchAuthorized - makes authorized http request
func (*NanitClient) FetchBabies ¶
func (c *NanitClient) FetchBabies() []baby.Baby
FetchBabies - fetches baby list
func (*NanitClient) FetchMessages ¶
func (c *NanitClient) FetchMessages(babyUID string, limit int) []message.Message
FetchMessages - fetches message list
func (*NanitClient) FetchNewMessages ¶
func (c *NanitClient) FetchNewMessages(babyUID string, defaultMessageTimeout time.Duration) []message.Message
FetchNewMessages - fetches 10 newest messages, ignores any messages which were already fetched or which are older than 5 minutes
func (*NanitClient) Login ¶
func (c *NanitClient) Login(authReq *AuthRequestPayload) (accessToken string, refreshToken string, err error)
Login - performs login with MFA support
func (*NanitClient) MaybeAuthorize ¶
func (c *NanitClient) MaybeAuthorize(force bool)
MaybeAuthorize - Performs authorization if we don't have token or we assume it is expired
func (*NanitClient) RenewSession ¶
func (c *NanitClient) RenewSession() error
Renews an existing session using a valid refresh token If the refresh token has also expired, we need to perform a full re-login
type Playback ¶
type Playback struct {
Status *Playback_Status `protobuf:"varint,1,req,name=status,enum=client.Playback_Status" json:"status,omitempty"`
// contains filtered or unexported fields
}
func (*Playback) Descriptor
deprecated
func (*Playback) GetStatus ¶
func (x *Playback) GetStatus() Playback_Status
func (*Playback) ProtoMessage ¶
func (*Playback) ProtoMessage()
func (*Playback) ProtoReflect ¶
func (x *Playback) ProtoReflect() protoreflect.Message
type Playback_Status ¶
type Playback_Status int32
const ( Playback_STARTED Playback_Status = 0 Playback_STOPPED Playback_Status = 1 )
func (Playback_Status) Descriptor ¶
func (Playback_Status) Descriptor() protoreflect.EnumDescriptor
func (Playback_Status) Enum ¶
func (x Playback_Status) Enum() *Playback_Status
func (Playback_Status) EnumDescriptor
deprecated
func (Playback_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use Playback_Status.Descriptor instead.
func (Playback_Status) Number ¶
func (x Playback_Status) Number() protoreflect.EnumNumber
func (Playback_Status) String ¶
func (x Playback_Status) String() string
func (Playback_Status) Type ¶
func (Playback_Status) Type() protoreflect.EnumType
func (*Playback_Status) UnmarshalJSON
deprecated
func (x *Playback_Status) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type Request ¶
type Request struct {
Id *int32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
Type *RequestType `protobuf:"varint,2,req,name=type,enum=client.RequestType" json:"type,omitempty"`
GetSensorData *GetSensorData `protobuf:"bytes,12,opt,name=getSensorData" json:"getSensorData,omitempty"`
SensorData_ []*SensorData `protobuf:"bytes,13,rep,name=sensorData" json:"sensorData,omitempty"`
Streaming *Streaming `protobuf:"bytes,4,opt,name=streaming" json:"streaming,omitempty"`
Control *Control `protobuf:"bytes,15,opt,name=control" json:"control,omitempty"`
Settings *Settings `protobuf:"bytes,5,opt,name=settings" json:"settings,omitempty"`
Status *Status `protobuf:"bytes,7,opt,name=status" json:"status,omitempty"`
GetStatus_ *GetStatus `protobuf:"bytes,8,opt,name=getStatus" json:"getStatus,omitempty"`
Playback *Playback `protobuf:"bytes,16,opt,name=playback" json:"playback,omitempty"`
GetLogs *GetLogs `protobuf:"bytes,18,opt,name=getLogs" json:"getLogs,omitempty"`
// contains filtered or unexported fields
}
func (*Request) Descriptor
deprecated
func (*Request) GetControl ¶
func (*Request) GetGetLogs ¶
func (*Request) GetGetSensorData ¶
func (x *Request) GetGetSensorData() *GetSensorData
func (*Request) GetGetStatus_ ¶
func (*Request) GetPlayback ¶
func (*Request) GetSensorData_ ¶
func (x *Request) GetSensorData_() []*SensorData
func (*Request) GetSettings ¶
func (*Request) GetStreaming ¶
func (*Request) GetType ¶
func (x *Request) GetType() RequestType
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type RequestType ¶
type RequestType int32
const ( RequestType_GET_STREAMING RequestType = 3 RequestType_PUT_STREAMING RequestType = 2 RequestType_GET_SETTINGS RequestType = 4 RequestType_PUT_SETTINGS RequestType = 5 RequestType_GET_CONTROL RequestType = 6 RequestType_PUT_CONTROL RequestType = 7 RequestType_GET_STATUS RequestType = 8 RequestType_PUT_STATUS RequestType = 9 RequestType_GET_SENSOR_DATA RequestType = 12 RequestType_PUT_SENSOR_DATA RequestType = 11 RequestType_GET_UCTOKENS RequestType = 13 RequestType_PUT_UCTOKENS RequestType = 14 RequestType_PUT_SETUP_NETWORK RequestType = 15 RequestType_PUT_SETUP_SERVER RequestType = 16 RequestType_GET_FIRMWARE RequestType = 17 RequestType_PUT_FIRMWARE RequestType = 18 RequestType_GET_PLAYBACK RequestType = 19 RequestType_PUT_PLAYBACK RequestType = 20 RequestType_GET_SOUNDTRACKS RequestType = 21 RequestType_GET_STATUS_NETWORK RequestType = 22 RequestType_GET_LIST_NETWORKS RequestType = 23 RequestType_GET_LOGS RequestType = 24 RequestType_GET_BANDWIDTH RequestType = 25 RequestType_GET_AUDIO_STREAMING RequestType = 26 RequestType_PUT_AUDIO_STREAMING RequestType = 27 RequestType_GET_WIFI_SETUP RequestType = 28 RequestType_PUT_WIFI_SETUP RequestType = 29 RequestType_PUT_STING_START RequestType = 30 RequestType_PUT_STING_STOP RequestType = 31 RequestType_PUT_STING_STATUS RequestType = 32 RequestType_PUT_STING_ALERT RequestType = 34 RequestType_PUT_KEEP_ALIVE RequestType = 35 RequestType_GET_STING_STATUS RequestType = 36 RequestType_PUT_STING_TEST RequestType = 37 RequestType_PUT_RTSP_STREAMING RequestType = 38 RequestType_GET_UOM_URI RequestType = 39 RequestType_GET_UOM RequestType = 40 RequestType_PUT_UOM RequestType = 41 RequestType_GET_AUTH_KEY RequestType = 42 RequestType_PUT_AUTH_KEY RequestType = 43 RequestType_PUT_HEALTH RequestType = 44 RequestType_PUT_TCP_REQUEST RequestType = 45 RequestType_GET_STING_START RequestType = 46 RequestType_GET_LOGS_URI RequestType = 47 )
func (RequestType) Descriptor ¶
func (RequestType) Descriptor() protoreflect.EnumDescriptor
func (RequestType) Enum ¶
func (x RequestType) Enum() *RequestType
func (RequestType) EnumDescriptor
deprecated
func (RequestType) EnumDescriptor() ([]byte, []int)
Deprecated: Use RequestType.Descriptor instead.
func (RequestType) Number ¶
func (x RequestType) Number() protoreflect.EnumNumber
func (RequestType) String ¶
func (x RequestType) String() string
func (RequestType) Type ¶
func (RequestType) Type() protoreflect.EnumType
func (*RequestType) UnmarshalJSON
deprecated
func (x *RequestType) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type Response ¶
type Response struct {
RequestId *int32 `protobuf:"varint,1,req,name=requestId" json:"requestId,omitempty"`
RequestType *RequestType `protobuf:"varint,2,req,name=requestType,enum=client.RequestType" json:"requestType,omitempty"`
StatusCode *int32 `protobuf:"varint,3,req,name=statusCode" json:"statusCode,omitempty"`
StatusMessage *string `protobuf:"bytes,4,opt,name=statusMessage" json:"statusMessage,omitempty"`
Status *Status `protobuf:"bytes,5,opt,name=status" json:"status,omitempty"`
SensorData []*SensorData `protobuf:"bytes,9,rep,name=sensorData" json:"sensorData,omitempty"`
Settings *Settings `protobuf:"bytes,6,opt,name=settings" json:"settings,omitempty"`
// contains filtered or unexported fields
}
func (*Response) Descriptor
deprecated
func (*Response) GetRequestId ¶
func (*Response) GetRequestType ¶
func (x *Response) GetRequestType() RequestType
func (*Response) GetSensorData ¶
func (x *Response) GetSensorData() []*SensorData
func (*Response) GetSettings ¶
func (*Response) GetStatusCode ¶
func (*Response) GetStatusMessage ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type SensorData ¶
type SensorData struct {
SensorType *SensorType `protobuf:"varint,1,req,name=sensorType,enum=client.SensorType" json:"sensorType,omitempty"`
IsAlert *bool `protobuf:"varint,4,opt,name=isAlert" json:"isAlert,omitempty"`
Timestamp *int32 `protobuf:"varint,5,opt,name=timestamp" json:"timestamp,omitempty"`
ValueMilli *int32 `protobuf:"varint,6,opt,name=valueMilli" json:"valueMilli,omitempty"`
Value *int32 `protobuf:"varint,3,opt,name=value" json:"value,omitempty"`
// contains filtered or unexported fields
}
func (*SensorData) Descriptor
deprecated
func (*SensorData) Descriptor() ([]byte, []int)
Deprecated: Use SensorData.ProtoReflect.Descriptor instead.
func (*SensorData) GetIsAlert ¶
func (x *SensorData) GetIsAlert() bool
func (*SensorData) GetSensorType ¶
func (x *SensorData) GetSensorType() SensorType
func (*SensorData) GetTimestamp ¶
func (x *SensorData) GetTimestamp() int32
func (*SensorData) GetValue ¶
func (x *SensorData) GetValue() int32
func (*SensorData) GetValueMilli ¶
func (x *SensorData) GetValueMilli() int32
func (*SensorData) ProtoMessage ¶
func (*SensorData) ProtoMessage()
func (*SensorData) ProtoReflect ¶
func (x *SensorData) ProtoReflect() protoreflect.Message
func (*SensorData) Reset ¶
func (x *SensorData) Reset()
func (*SensorData) String ¶
func (x *SensorData) String() string
type SensorType ¶
type SensorType int32
const ( SensorType_SOUND SensorType = 0 SensorType_MOTION SensorType = 1 SensorType_TEMPERATURE SensorType = 2 SensorType_HUMIDITY SensorType = 3 SensorType_LIGHT SensorType = 4 SensorType_NIGHT SensorType = 5 )
func (SensorType) Descriptor ¶
func (SensorType) Descriptor() protoreflect.EnumDescriptor
func (SensorType) Enum ¶
func (x SensorType) Enum() *SensorType
func (SensorType) EnumDescriptor
deprecated
func (SensorType) EnumDescriptor() ([]byte, []int)
Deprecated: Use SensorType.Descriptor instead.
func (SensorType) Number ¶
func (x SensorType) Number() protoreflect.EnumNumber
func (SensorType) String ¶
func (x SensorType) String() string
func (SensorType) Type ¶
func (SensorType) Type() protoreflect.EnumType
func (*SensorType) UnmarshalJSON
deprecated
func (x *SensorType) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type Settings ¶
type Settings struct {
NightVision *bool `protobuf:"varint,2,opt,name=nightVision" json:"nightVision,omitempty"`
Sensors []*Settings_SensorSettings `protobuf:"bytes,7,rep,name=sensors" json:"sensors,omitempty"`
Streams []*Settings_StreamSettings `protobuf:"bytes,8,rep,name=streams" json:"streams,omitempty"`
Volume *int32 `protobuf:"varint,9,opt,name=volume" json:"volume,omitempty"`
AntiFlicker *Settings_AntiFlicker `protobuf:"varint,10,opt,name=antiFlicker,enum=client.Settings_AntiFlicker" json:"antiFlicker,omitempty"`
SleepMode *bool `protobuf:"varint,11,opt,name=sleepMode" json:"sleepMode,omitempty"`
StatusLightOn *bool `protobuf:"varint,12,opt,name=statusLightOn" json:"statusLightOn,omitempty"`
MountingMode *int32 `protobuf:"varint,15,opt,name=mountingMode" json:"mountingMode,omitempty"`
WifiBand *Settings_WifiBand `protobuf:"varint,18,opt,name=wifiBand,enum=client.Settings_WifiBand" json:"wifiBand,omitempty"`
MicMuteOn *bool `protobuf:"varint,20,opt,name=micMuteOn" json:"micMuteOn,omitempty"`
// contains filtered or unexported fields
}
func (*Settings) Descriptor
deprecated
func (*Settings) GetAntiFlicker ¶
func (x *Settings) GetAntiFlicker() Settings_AntiFlicker
func (*Settings) GetMicMuteOn ¶
func (*Settings) GetMountingMode ¶
func (*Settings) GetNightVision ¶
func (*Settings) GetSensors ¶
func (x *Settings) GetSensors() []*Settings_SensorSettings
func (*Settings) GetSleepMode ¶
func (*Settings) GetStatusLightOn ¶
func (*Settings) GetStreams ¶
func (x *Settings) GetStreams() []*Settings_StreamSettings
func (*Settings) GetWifiBand ¶
func (x *Settings) GetWifiBand() Settings_WifiBand
func (*Settings) ProtoMessage ¶
func (*Settings) ProtoMessage()
func (*Settings) ProtoReflect ¶
func (x *Settings) ProtoReflect() protoreflect.Message
type Settings_AntiFlicker ¶
type Settings_AntiFlicker int32
const ( Settings_FR50HZ Settings_AntiFlicker = 0 Settings_FR60HZ Settings_AntiFlicker = 1 )
func (Settings_AntiFlicker) Descriptor ¶
func (Settings_AntiFlicker) Descriptor() protoreflect.EnumDescriptor
func (Settings_AntiFlicker) Enum ¶
func (x Settings_AntiFlicker) Enum() *Settings_AntiFlicker
func (Settings_AntiFlicker) EnumDescriptor
deprecated
func (Settings_AntiFlicker) EnumDescriptor() ([]byte, []int)
Deprecated: Use Settings_AntiFlicker.Descriptor instead.
func (Settings_AntiFlicker) Number ¶
func (x Settings_AntiFlicker) Number() protoreflect.EnumNumber
func (Settings_AntiFlicker) String ¶
func (x Settings_AntiFlicker) String() string
func (Settings_AntiFlicker) Type ¶
func (Settings_AntiFlicker) Type() protoreflect.EnumType
func (*Settings_AntiFlicker) UnmarshalJSON
deprecated
func (x *Settings_AntiFlicker) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type Settings_SensorSettings ¶
type Settings_SensorSettings struct {
SensorType *SensorType `protobuf:"varint,1,req,name=sensorType,enum=client.SensorType" json:"sensorType,omitempty"`
UseLowThreshold *bool `protobuf:"varint,2,opt,name=useLowThreshold" json:"useLowThreshold,omitempty"`
UseHighThreshold *bool `protobuf:"varint,3,opt,name=useHighThreshold" json:"useHighThreshold,omitempty"`
LowThreshold *int32 `protobuf:"varint,4,opt,name=lowThreshold" json:"lowThreshold,omitempty"`
HighThreshold *int32 `protobuf:"varint,5,opt,name=highThreshold" json:"highThreshold,omitempty"`
SampleIntervalSec *int32 `protobuf:"varint,6,opt,name=sampleIntervalSec" json:"sampleIntervalSec,omitempty"`
TriggerIntervalSec *int32 `protobuf:"varint,7,opt,name=triggerIntervalSec" json:"triggerIntervalSec,omitempty"`
UseMilliForThresholds *bool `protobuf:"varint,8,opt,name=useMilliForThresholds" json:"useMilliForThresholds,omitempty"`
// contains filtered or unexported fields
}
func (*Settings_SensorSettings) Descriptor
deprecated
func (*Settings_SensorSettings) Descriptor() ([]byte, []int)
Deprecated: Use Settings_SensorSettings.ProtoReflect.Descriptor instead.
func (*Settings_SensorSettings) GetHighThreshold ¶
func (x *Settings_SensorSettings) GetHighThreshold() int32
func (*Settings_SensorSettings) GetLowThreshold ¶
func (x *Settings_SensorSettings) GetLowThreshold() int32
func (*Settings_SensorSettings) GetSampleIntervalSec ¶
func (x *Settings_SensorSettings) GetSampleIntervalSec() int32
func (*Settings_SensorSettings) GetSensorType ¶
func (x *Settings_SensorSettings) GetSensorType() SensorType
func (*Settings_SensorSettings) GetTriggerIntervalSec ¶
func (x *Settings_SensorSettings) GetTriggerIntervalSec() int32
func (*Settings_SensorSettings) GetUseHighThreshold ¶
func (x *Settings_SensorSettings) GetUseHighThreshold() bool
func (*Settings_SensorSettings) GetUseLowThreshold ¶
func (x *Settings_SensorSettings) GetUseLowThreshold() bool
func (*Settings_SensorSettings) GetUseMilliForThresholds ¶
func (x *Settings_SensorSettings) GetUseMilliForThresholds() bool
func (*Settings_SensorSettings) ProtoMessage ¶
func (*Settings_SensorSettings) ProtoMessage()
func (*Settings_SensorSettings) ProtoReflect ¶
func (x *Settings_SensorSettings) ProtoReflect() protoreflect.Message
func (*Settings_SensorSettings) Reset ¶
func (x *Settings_SensorSettings) Reset()
func (*Settings_SensorSettings) String ¶
func (x *Settings_SensorSettings) String() string
type Settings_StreamSettings ¶
type Settings_StreamSettings struct {
Id *StreamIdentifier `protobuf:"varint,1,req,name=id,enum=client.StreamIdentifier" json:"id,omitempty"`
Bitrate *int32 `protobuf:"varint,2,opt,name=bitrate" json:"bitrate,omitempty"`
EconomyBitrate *int32 `protobuf:"varint,3,opt,name=economyBitrate" json:"economyBitrate,omitempty"`
EconomyFps *int32 `protobuf:"varint,4,opt,name=economyFps" json:"economyFps,omitempty"`
BestBitrate *int32 `protobuf:"varint,5,opt,name=bestBitrate" json:"bestBitrate,omitempty"`
BestFps *int32 `protobuf:"varint,6,opt,name=bestFps" json:"bestFps,omitempty"`
// contains filtered or unexported fields
}
func (*Settings_StreamSettings) Descriptor
deprecated
func (*Settings_StreamSettings) Descriptor() ([]byte, []int)
Deprecated: Use Settings_StreamSettings.ProtoReflect.Descriptor instead.
func (*Settings_StreamSettings) GetBestBitrate ¶
func (x *Settings_StreamSettings) GetBestBitrate() int32
func (*Settings_StreamSettings) GetBestFps ¶
func (x *Settings_StreamSettings) GetBestFps() int32
func (*Settings_StreamSettings) GetBitrate ¶
func (x *Settings_StreamSettings) GetBitrate() int32
func (*Settings_StreamSettings) GetEconomyBitrate ¶
func (x *Settings_StreamSettings) GetEconomyBitrate() int32
func (*Settings_StreamSettings) GetEconomyFps ¶
func (x *Settings_StreamSettings) GetEconomyFps() int32
func (*Settings_StreamSettings) GetId ¶
func (x *Settings_StreamSettings) GetId() StreamIdentifier
func (*Settings_StreamSettings) ProtoMessage ¶
func (*Settings_StreamSettings) ProtoMessage()
func (*Settings_StreamSettings) ProtoReflect ¶
func (x *Settings_StreamSettings) ProtoReflect() protoreflect.Message
func (*Settings_StreamSettings) Reset ¶
func (x *Settings_StreamSettings) Reset()
func (*Settings_StreamSettings) String ¶
func (x *Settings_StreamSettings) String() string
type Settings_WifiBand ¶
type Settings_WifiBand int32
const ( Settings_ANY Settings_WifiBand = 0 Settings_FR2_4GHZ Settings_WifiBand = 1 Settings_FR5_0GHZ Settings_WifiBand = 2 )
func (Settings_WifiBand) Descriptor ¶
func (Settings_WifiBand) Descriptor() protoreflect.EnumDescriptor
func (Settings_WifiBand) Enum ¶
func (x Settings_WifiBand) Enum() *Settings_WifiBand
func (Settings_WifiBand) EnumDescriptor
deprecated
func (Settings_WifiBand) EnumDescriptor() ([]byte, []int)
Deprecated: Use Settings_WifiBand.Descriptor instead.
func (Settings_WifiBand) Number ¶
func (x Settings_WifiBand) Number() protoreflect.EnumNumber
func (Settings_WifiBand) String ¶
func (x Settings_WifiBand) String() string
func (Settings_WifiBand) Type ¶
func (Settings_WifiBand) Type() protoreflect.EnumType
func (*Settings_WifiBand) UnmarshalJSON
deprecated
func (x *Settings_WifiBand) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type Status ¶
type Status struct {
UpgradeDownloaded *bool `protobuf:"varint,1,opt,name=upgradeDownloaded" json:"upgradeDownloaded,omitempty"`
ConnectionToServer *Status_ConnectionToServer `protobuf:"varint,2,opt,name=connectionToServer,enum=client.Status_ConnectionToServer" json:"connectionToServer,omitempty"`
CurrentVersion *string `protobuf:"bytes,3,opt,name=currentVersion" json:"currentVersion,omitempty"`
Mode *MountingMode `protobuf:"varint,4,opt,name=mode,enum=client.MountingMode" json:"mode,omitempty"`
IsSecurityUpgrade *bool `protobuf:"varint,5,opt,name=isSecurityUpgrade" json:"isSecurityUpgrade,omitempty"`
DownloadedVersion *string `protobuf:"bytes,6,opt,name=downloadedVersion" json:"downloadedVersion,omitempty"`
HardwareVersion *string `protobuf:"bytes,7,opt,name=hardwareVersion" json:"hardwareVersion,omitempty"`
// contains filtered or unexported fields
}
func (*Status) Descriptor
deprecated
func (*Status) GetConnectionToServer ¶
func (x *Status) GetConnectionToServer() Status_ConnectionToServer
func (*Status) GetCurrentVersion ¶
func (*Status) GetDownloadedVersion ¶
func (*Status) GetHardwareVersion ¶
func (*Status) GetIsSecurityUpgrade ¶
func (*Status) GetMode ¶
func (x *Status) GetMode() MountingMode
func (*Status) GetUpgradeDownloaded ¶
func (*Status) ProtoMessage ¶
func (*Status) ProtoMessage()
func (*Status) ProtoReflect ¶
func (x *Status) ProtoReflect() protoreflect.Message
type Status_ConnectionToServer ¶
type Status_ConnectionToServer int32
const ( Status_DISCONNECTED Status_ConnectionToServer = 0 Status_CONNECTED Status_ConnectionToServer = 1 )
func (Status_ConnectionToServer) Descriptor ¶
func (Status_ConnectionToServer) Descriptor() protoreflect.EnumDescriptor
func (Status_ConnectionToServer) Enum ¶
func (x Status_ConnectionToServer) Enum() *Status_ConnectionToServer
func (Status_ConnectionToServer) EnumDescriptor
deprecated
func (Status_ConnectionToServer) EnumDescriptor() ([]byte, []int)
Deprecated: Use Status_ConnectionToServer.Descriptor instead.
func (Status_ConnectionToServer) Number ¶
func (x Status_ConnectionToServer) Number() protoreflect.EnumNumber
func (Status_ConnectionToServer) String ¶
func (x Status_ConnectionToServer) String() string
func (Status_ConnectionToServer) Type ¶
func (Status_ConnectionToServer) Type() protoreflect.EnumType
func (*Status_ConnectionToServer) UnmarshalJSON
deprecated
func (x *Status_ConnectionToServer) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type Stream ¶
type Stream struct {
Type *Stream_Type `protobuf:"varint,1,req,name=type,enum=client.Stream_Type" json:"type,omitempty"`
Url *string `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"`
Bps *int32 `protobuf:"varint,3,opt,name=bps" json:"bps,omitempty"`
// contains filtered or unexported fields
}
func (*Stream) Descriptor
deprecated
func (*Stream) GetType ¶
func (x *Stream) GetType() Stream_Type
func (*Stream) ProtoMessage ¶
func (*Stream) ProtoMessage()
func (*Stream) ProtoReflect ¶
func (x *Stream) ProtoReflect() protoreflect.Message
type StreamIdentifier ¶
type StreamIdentifier int32
const ( StreamIdentifier_DVR StreamIdentifier = 0 StreamIdentifier_ANALYTICS StreamIdentifier = 1 StreamIdentifier_MOBILE StreamIdentifier = 2 )
func (StreamIdentifier) Descriptor ¶
func (StreamIdentifier) Descriptor() protoreflect.EnumDescriptor
func (StreamIdentifier) Enum ¶
func (x StreamIdentifier) Enum() *StreamIdentifier
func (StreamIdentifier) EnumDescriptor
deprecated
func (StreamIdentifier) EnumDescriptor() ([]byte, []int)
Deprecated: Use StreamIdentifier.Descriptor instead.
func (StreamIdentifier) Number ¶
func (x StreamIdentifier) Number() protoreflect.EnumNumber
func (StreamIdentifier) String ¶
func (x StreamIdentifier) String() string
func (StreamIdentifier) Type ¶
func (StreamIdentifier) Type() protoreflect.EnumType
func (*StreamIdentifier) UnmarshalJSON
deprecated
func (x *StreamIdentifier) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type Stream_Type ¶
type Stream_Type int32
const ( Stream_LOCAL Stream_Type = 0 Stream_REMOTE Stream_Type = 1 Stream_RTSP Stream_Type = 2 Stream_P2P Stream_Type = 3 )
func (Stream_Type) Descriptor ¶
func (Stream_Type) Descriptor() protoreflect.EnumDescriptor
func (Stream_Type) Enum ¶
func (x Stream_Type) Enum() *Stream_Type
func (Stream_Type) EnumDescriptor
deprecated
func (Stream_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use Stream_Type.Descriptor instead.
func (Stream_Type) Number ¶
func (x Stream_Type) Number() protoreflect.EnumNumber
func (Stream_Type) String ¶
func (x Stream_Type) String() string
func (Stream_Type) Type ¶
func (Stream_Type) Type() protoreflect.EnumType
func (*Stream_Type) UnmarshalJSON
deprecated
func (x *Stream_Type) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type Streaming ¶
type Streaming struct {
Id *StreamIdentifier `protobuf:"varint,1,req,name=id,enum=client.StreamIdentifier" json:"id,omitempty"`
Status *Streaming_Status `protobuf:"varint,2,req,name=status,enum=client.Streaming_Status" json:"status,omitempty"`
RtmpUrl *string `protobuf:"bytes,3,req,name=rtmpUrl" json:"rtmpUrl,omitempty"`
Attempts *int32 `protobuf:"varint,4,opt,name=attempts" json:"attempts,omitempty"`
// contains filtered or unexported fields
}
func (*Streaming) Descriptor
deprecated
func (*Streaming) GetAttempts ¶
func (*Streaming) GetId ¶
func (x *Streaming) GetId() StreamIdentifier
func (*Streaming) GetRtmpUrl ¶
func (*Streaming) GetStatus ¶
func (x *Streaming) GetStatus() Streaming_Status
func (*Streaming) ProtoMessage ¶
func (*Streaming) ProtoMessage()
func (*Streaming) ProtoReflect ¶
func (x *Streaming) ProtoReflect() protoreflect.Message
type Streaming_Status ¶
type Streaming_Status int32
const ( Streaming_STARTED Streaming_Status = 0 Streaming_STOPPED Streaming_Status = 1 Streaming_PAUSED Streaming_Status = 2 )
func (Streaming_Status) Descriptor ¶
func (Streaming_Status) Descriptor() protoreflect.EnumDescriptor
func (Streaming_Status) Enum ¶
func (x Streaming_Status) Enum() *Streaming_Status
func (Streaming_Status) EnumDescriptor
deprecated
func (Streaming_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use Streaming_Status.Descriptor instead.
func (Streaming_Status) Number ¶
func (x Streaming_Status) Number() protoreflect.EnumNumber
func (Streaming_Status) String ¶
func (x Streaming_Status) String() string
func (Streaming_Status) Type ¶
func (Streaming_Status) Type() protoreflect.EnumType
func (*Streaming_Status) UnmarshalJSON
deprecated
func (x *Streaming_Status) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type WebsocketConnection ¶
type WebsocketConnection struct {
// contains filtered or unexported fields
}
WebsocketConnection - ready websocket connection
func NewWebsocketConnection ¶
func NewWebsocketConnection(socket *gowebsocket.Socket) *WebsocketConnection
NewWebsocketConnection - constructor
func (*WebsocketConnection) RegisterMessageHandler ¶
func (conn *WebsocketConnection) RegisterMessageHandler(handler WebsocketMessageHandler)
RegisterMessageHandler - registers handler which will be called whenever new message is received
func (*WebsocketConnection) SendMessage ¶
func (conn *WebsocketConnection) SendMessage(m *Message)
SendMessage - low-level helper for sending raw message Note: Use SendRequest() for requests
func (*WebsocketConnection) SendRequest ¶
func (conn *WebsocketConnection) SendRequest(reqType RequestType, requestData *Request) func(time.Duration) (*Response, error)
SendRequest - sends request to the cam and returns await function. Await function waits for the response and returns it
type WebsocketConnectionHandler ¶
type WebsocketConnectionHandler func(*WebsocketConnection, utils.GracefulContext)
WebsocketConnectionHandler - handler of ready connection
type WebsocketConnectionManager ¶
type WebsocketConnectionManager struct {
BabyUID string
CameraUID string
Session *session.Session
API *NanitClient
BabyStateManager *baby.StateManager
// contains filtered or unexported fields
}
WebsocketConnectionManager - connection manager
func NewWebsocketConnectionManager ¶
func NewWebsocketConnectionManager(babyUID string, cameraUID string, session *session.Session, api *NanitClient, babyStateManager *baby.StateManager) *WebsocketConnectionManager
NewWebsocketConnectionManager - constructor
func (*WebsocketConnectionManager) RunWithinContext ¶
func (manager *WebsocketConnectionManager) RunWithinContext(ctx utils.GracefulContext)
RunWithinContext - starts websocket connection attempt loop
func (*WebsocketConnectionManager) WithReadyConnection ¶
func (manager *WebsocketConnectionManager) WithReadyConnection(handler WebsocketConnectionHandler)
WithReadyConnection - registers handler which will be called as a go routine upon ready connection
type WebsocketMessageHandler ¶
type WebsocketMessageHandler func(*Message, *WebsocketConnection)
WebsocketMessageHandler - message handler