Documentation ¶
Overview ¶
Package onvif is developed to provide an ONVIF client implementation on Go programming language
Index ¶
- Constants
- Variables
- type Device
- func (dev *Device) CallMethod(method interface{}) (*http.Response, error)
- func (dev *Device) CallOnvifFunction(serviceName, functionName string, data []byte) (interface{}, error)
- func (dev *Device) GetDeviceInfo() DeviceInfo
- func (dev *Device) GetDeviceParams() DeviceParams
- func (dev *Device) GetEndpoint(name string) string
- func (dev *Device) GetEndpointByRequestStruct(requestStruct interface{}) (string, error)
- func (dev *Device) GetServices() map[string]string
- func (dev *Device) SendGetSnapshotRequest(url string) (resp *http.Response, err error)
- func (dev *Device) SendSoap(endpoint string, xmlRequestBody string) (resp *http.Response, err error)
- type DeviceInfo
- type DeviceParams
- type DeviceType
- type DigestClient
- type Function
Constants ¶
const ( DigestAuth = "digest" UsernameTokenAuth = "usernametoken" Both = "both" NoAuth = "none" )
Onvif Auth Mode
const ( AnalyticsWebService = "Analytics" DeviceWebService = "Device" EventWebService = "Event" ImagingWebService = "Imaging" MediaWebService = "Media" Media2WebService = "Media2" PTZWebService = "PTZ" )
Onvif WebService
const ( CreateAnalyticsModules = "CreateAnalyticsModules" CreateRules = "CreateRules" DeleteAnalyticsModules = "DeleteAnalyticsModules" DeleteRules = "DeleteRules" GetAnalyticsModuleOptions = "GetAnalyticsModuleOptions" GetAnalyticsModules = "GetAnalyticsModules" GetRuleOptions = "GetRuleOptions" GetRules = "GetRules" GetSupportedAnalyticsModules = "GetSupportedAnalyticsModules" GetSupportedRules = "GetSupportedRules" ModifyAnalyticsModules = "ModifyAnalyticsModules" ModifyRules = "ModifyRules" )
WebService - Analytics
const ( AddIPAddressFilter = "AddIPAddressFilter" AddScopes = "AddScopes" CreateCertificate = "CreateCertificate" CreateDot1XConfiguration = "CreateDot1XConfiguration" CreateStorageConfiguration = "CreateStorageConfiguration" CreateUsers = "CreateUsers" DeleteCertificates = "DeleteCertificates" DeleteDot1XConfiguration = "DeleteDot1XConfiguration" DeleteGeoLocation = "DeleteGeoLocation" DeleteStorageConfiguration = "DeleteStorageConfiguration" DeleteUsers = "DeleteUsers" GetAccessPolicy = "GetAccessPolicy" GetCACertificates = "GetCACertificates" GetCapabilities = "GetCapabilities" GetCertificateInformation = "GetCertificateInformation" GetCertificates = "GetCertificates" GetCertificatesStatus = "GetCertificatesStatus" GetClientCertificateMode = "GetClientCertificateMode" GetDNS = "GetDNS" GetDPAddresses = "GetDPAddresses" GetDeviceInformation = "GetDeviceInformation" GetDiscoveryMode = "GetDiscoveryMode" GetDot11Capabilities = "GetDot11Capabilities" GetDot11Status = "GetDot11Status" GetDot1XConfiguration = "GetDot1XConfiguration" GetDot1XConfigurations = "GetDot1XConfigurations" GetDynamicDNS = "GetDynamicDNS" GetEndpointReference = "GetEndpointReference" GetGeoLocation = "GetGeoLocation" GetHostname = "GetHostname" GetIPAddressFilter = "GetIPAddressFilter" GetNTP = "GetNTP" GetNetworkDefaultGateway = "GetNetworkDefaultGateway" GetNetworkInterfaces = "GetNetworkInterfaces" GetNetworkProtocols = "GetNetworkProtocols" GetPkcs10Request = "GetPkcs10Request" GetRelayOutputs = "GetRelayOutputs" GetRemoteDiscoveryMode = "GetRemoteDiscoveryMode" GetRemoteUser = "GetRemoteUser" GetScopes = "GetScopes" GetServiceCapabilities = "GetServiceCapabilities" GetServices = "GetServices" GetStorageConfiguration = "GetStorageConfiguration" GetStorageConfigurations = "GetStorageConfigurations" GetSystemBackup = "GetSystemBackup" GetSystemDateAndTime = "GetSystemDateAndTime" GetSystemLog = "GetSystemLog" GetSystemSupportInformation = "GetSystemSupportInformation" GetSystemUris = "GetSystemUris" GetUsers = "GetUsers" GetWsdlUrl = "GetWsdlUrl" GetZeroConfiguration = "GetZeroConfiguration" LoadCACertificates = "LoadCACertificates" LoadCertificateWithPrivateKey = "LoadCertificateWithPrivateKey" LoadCertificates = "LoadCertificates" RemoveIPAddressFilter = "RemoveIPAddressFilter" RemoveScopes = "RemoveScopes" RestoreSystem = "RestoreSystem" ScanAvailableDot11Networks = "ScanAvailableDot11Networks" SendAuxiliaryCommand = "SendAuxiliaryCommand" SetAccessPolicy = "SetAccessPolicy" SetCertificatesStatus = "SetCertificatesStatus" SetClientCertificateMode = "SetClientCertificateMode" SetDNS = "SetDNS" SetDPAddresses = "SetDPAddresses" SetDiscoveryMode = "SetDiscoveryMode" SetDot1XConfiguration = "SetDot1XConfiguration" SetDynamicDNS = "SetDynamicDNS" SetGeoLocation = "SetGeoLocation" SetHostname = "SetHostname" SetHostnameFromDHCP = "SetHostnameFromDHCP" SetIPAddressFilter = "SetIPAddressFilter" SetNTP = "SetNTP" SetNetworkDefaultGateway = "SetNetworkDefaultGateway" SetNetworkInterfaces = "SetNetworkInterfaces" SetNetworkProtocols = "SetNetworkProtocols" SetRelayOutputSettings = "SetRelayOutputSettings" SetRelayOutputState = "SetRelayOutputState" SetRemoteDiscoveryMode = "SetRemoteDiscoveryMode" SetRemoteUser = "SetRemoteUser" SetScopes = "SetScopes" SetStorageConfiguration = "SetStorageConfiguration" SetSystemDateAndTime = "SetSystemDateAndTime" SetSystemFactoryDefault = "SetSystemFactoryDefault" SetUser = "SetUser" SetZeroConfiguration = "SetZeroConfiguration" StartFirmwareUpgrade = "StartFirmwareUpgrade" StartSystemRestore = "StartSystemRestore" SystemReboot = "SystemReboot" UpgradeSystemFirmware = "UpgradeSystemFirmware" )
WebService - Device
const ( CreatePullPointSubscription = "CreatePullPointSubscription" GetEventProperties = "GetEventProperties" PullMessages = "PullMessages" Renew = "Renew" Seek = "Seek" SetSynchronizationPoint = "SetSynchronizationPoint" Subscribe = "Subscribe" SubscriptionReference = "SubscriptionReference" Unsubscribe = "Unsubscribe" )
WebService - Event
const ( GetCurrentPreset = "GetCurrentPreset" GetImagingSettings = "GetImagingSettings" GetMoveOptions = "GetMoveOptions" GetOptions = "GetOptions" GetPresets = "GetPresets" GetStatus = "GetStatus" Move = "Move" SetCurrentPreset = "SetCurrentPreset" SetImagingSettings = "SetImagingSettings" Stop = "Stop" )
WebService - Imaging
const ( AddAudioDecoderConfiguration = "AddAudioDecoderConfiguration" AddAudioEncoderConfiguration = "AddAudioEncoderConfiguration" AddAudioOutputConfiguration = "AddAudioOutputConfiguration" AddAudioSourceConfiguration = "AddAudioSourceConfiguration" AddMetadataConfiguration = "AddMetadataConfiguration" AddPTZConfiguration = "AddPTZConfiguration" AddVideoAnalyticsConfiguration = "AddVideoAnalyticsConfiguration" AddVideoEncoderConfiguration = "AddVideoEncoderConfiguration" AddVideoSourceConfiguration = "AddVideoSourceConfiguration" CreateOSD = "CreateOSD" CreateProfile = "CreateProfile" DeleteOSD = "DeleteOSD" DeleteProfile = "DeleteProfile" GetAudioDecoderConfiguration = "GetAudioDecoderConfiguration" GetAudioDecoderConfigurationOptions = "GetAudioDecoderConfigurationOptions" GetAudioDecoderConfigurations = "GetAudioDecoderConfigurations" GetAudioEncoderConfiguration = "GetAudioEncoderConfiguration" GetAudioEncoderConfigurationOptions = "GetAudioEncoderConfigurationOptions" GetAudioEncoderConfigurations = "GetAudioEncoderConfigurations" GetAudioOutputConfiguration = "GetAudioOutputConfiguration" GetAudioOutputConfigurationOptions = "GetAudioOutputConfigurationOptions" GetAudioOutputConfigurations = "GetAudioOutputConfigurations" GetAudioOutputs = "GetAudioOutputs" GetAudioSourceConfiguration = "GetAudioSourceConfiguration" GetAudioSourceConfigurationOptions = "GetAudioSourceConfigurationOptions" GetAudioSourceConfigurations = "GetAudioSourceConfigurations" GetAudioSources = "GetAudioSources" GetCompatibleAudioDecoderConfigurations = "GetCompatibleAudioDecoderConfigurations" GetCompatibleAudioEncoderConfigurations = "GetCompatibleAudioEncoderConfigurations" GetCompatibleAudioOutputConfigurations = "GetCompatibleAudioOutputConfigurations" GetCompatibleAudioSourceConfigurations = "GetCompatibleAudioSourceConfigurations" GetCompatibleMetadataConfigurations = "GetCompatibleMetadataConfigurations" GetCompatibleVideoAnalyticsConfigurations = "GetCompatibleVideoAnalyticsConfigurations" GetCompatibleVideoEncoderConfigurations = "GetCompatibleVideoEncoderConfigurations" GetCompatibleVideoSourceConfigurations = "GetCompatibleVideoSourceConfigurations" GetGuaranteedNumberOfVideoEncoderInstances = "GetGuaranteedNumberOfVideoEncoderInstances" GetMetadataConfiguration = "GetMetadataConfiguration" GetMetadataConfigurationOptions = "GetMetadataConfigurationOptions" GetMetadataConfigurations = "GetMetadataConfigurations" GetOSD = "GetOSD" GetOSDOptions = "GetOSDOptions" GetOSDs = "GetOSDs" GetProfile = "GetProfile" GetProfiles = "GetProfiles" GetSnapshotUri = "GetSnapshotUri" GetStreamUri = "GetStreamUri" GetVideoAnalyticsConfiguration = "GetVideoAnalyticsConfiguration" GetVideoAnalyticsConfigurations = "GetVideoAnalyticsConfigurations" GetVideoEncoderConfiguration = "GetVideoEncoderConfiguration" GetVideoEncoderConfigurationOptions = "GetVideoEncoderConfigurationOptions" GetVideoEncoderConfigurations = "GetVideoEncoderConfigurations" GetVideoSourceConfiguration = "GetVideoSourceConfiguration" GetVideoSourceConfigurationOptions = "GetVideoSourceConfigurationOptions" GetVideoSourceConfigurations = "GetVideoSourceConfigurations" GetVideoSourceModes = "GetVideoSourceModes" GetVideoSources = "GetVideoSources" RemoveAudioDecoderConfiguration = "RemoveAudioDecoderConfiguration" RemoveAudioEncoderConfiguration = "RemoveAudioEncoderConfiguration" RemoveAudioOutputConfiguration = "RemoveAudioOutputConfiguration" RemoveAudioSourceConfiguration = "RemoveAudioSourceConfiguration" RemoveMetadataConfiguration = "RemoveMetadataConfiguration" RemovePTZConfiguration = "RemovePTZConfiguration" RemoveVideoAnalyticsConfiguration = "RemoveVideoAnalyticsConfiguration" RemoveVideoEncoderConfiguration = "RemoveVideoEncoderConfiguration" RemoveVideoSourceConfiguration = "RemoveVideoSourceConfiguration" SetAudioDecoderConfiguration = "SetAudioDecoderConfiguration" SetAudioEncoderConfiguration = "SetAudioEncoderConfiguration" SetAudioOutputConfiguration = "SetAudioOutputConfiguration" SetAudioSourceConfiguration = "SetAudioSourceConfiguration" SetMetadataConfiguration = "SetMetadataConfiguration" SetOSD = "SetOSD" SetVideoAnalyticsConfiguration = "SetVideoAnalyticsConfiguration" SetVideoEncoderConfiguration = "SetVideoEncoderConfiguration" SetVideoSourceConfiguration = "SetVideoSourceConfiguration" SetVideoSourceMode = "SetVideoSourceMode" StartMulticastStreaming = "StartMulticastStreaming" StopMulticastStreaming = "StopMulticastStreaming" )
WebService - Media
const ( AddConfiguration = "AddConfiguration" GetAnalyticsConfigurations = "GetAnalyticsConfigurations" RemoveConfiguration = "RemoveConfiguration" )
WebService - Media2
const ( AbsoluteMove = "AbsoluteMove" ContinuousMove = "ContinuousMove" CreatePresetTour = "CreatePresetTour" GeoMove = "GeoMove" GetCompatibleConfigurations = "GetCompatibleConfigurations" GetConfiguration = "GetConfiguration" GetConfigurationOptions = "GetConfigurationOptions" GetConfigurations = "GetConfigurations" GetNode = "GetNode" GetNodes = "GetNodes" GetPresetTour = "GetPresetTour" GetPresetTourOptions = "GetPresetTourOptions" GetPresetTours = "GetPresetTours" GotoHomePosition = "GotoHomePosition" GotoPreset = "GotoPreset" ModifyPresetTour = "ModifyPresetTour" OperatePresetTour = "OperatePresetTour" RelativeMove = "RelativeMove" RemovePreset = "RemovePreset" RemovePresetTour = "RemovePresetTour" SetConfiguration = "SetConfiguration" SetHomePosition = "SetHomePosition" SetPreset = "SetPreset" )
WebService - PTZ
Variables ¶
var AnalyticsFunctionMap = map[string]Function{ CreateAnalyticsModules: &analytics.CreateAnalyticsModulesFunction{}, CreateRules: &analytics.CreateRulesFunction{}, DeleteAnalyticsModules: &analytics.DeleteAnalyticsModulesFunction{}, DeleteRules: &analytics.DeleteRulesFunction{}, GetAnalyticsModuleOptions: &analytics.GetAnalyticsModuleOptionsFunction{}, GetAnalyticsModules: &analytics.GetAnalyticsModulesFunction{}, GetRuleOptions: &analytics.GetRuleOptionsFunction{}, GetRules: &analytics.GetRulesFunction{}, GetSupportedAnalyticsModules: &analytics.GetSupportedAnalyticsModulesFunction{}, GetSupportedRules: &analytics.GetSupportedRulesFunction{}, ModifyAnalyticsModules: &analytics.ModifyAnalyticsModulesFunction{}, ModifyRules: &analytics.ModifyRulesFunction{}, }
var DeviceFunctionMap = map[string]Function{ AddIPAddressFilter: &device.AddIPAddressFilterFunction{}, AddScopes: &device.AddScopesFunction{}, CreateCertificate: &device.CreateCertificateFunction{}, CreateDot1XConfiguration: &device.CreateDot1XConfigurationFunction{}, CreateStorageConfiguration: &device.CreateStorageConfigurationFunction{}, CreateUsers: &device.CreateUsersFunction{}, DeleteCertificates: &device.DeleteCertificatesFunction{}, DeleteDot1XConfiguration: &device.DeleteDot1XConfigurationFunction{}, DeleteGeoLocation: &device.DeleteGeoLocationFunction{}, DeleteStorageConfiguration: &device.DeleteStorageConfigurationFunction{}, DeleteUsers: &device.DeleteUsersFunction{}, GetAccessPolicy: &device.GetAccessPolicyFunction{}, GetCACertificates: &device.GetCACertificatesFunction{}, GetCapabilities: &device.GetCapabilitiesFunction{}, GetCertificateInformation: &device.GetCertificateInformationFunction{}, GetCertificates: &device.GetCertificatesFunction{}, GetCertificatesStatus: &device.GetCertificatesStatusFunction{}, GetClientCertificateMode: &device.GetClientCertificateModeFunction{}, GetDNS: &device.GetDNSFunction{}, GetDPAddresses: &device.GetDPAddressesFunction{}, GetDeviceInformation: &device.GetDeviceInformationFunction{}, GetDiscoveryMode: &device.GetDiscoveryModeFunction{}, GetDot11Capabilities: &device.GetDot11CapabilitiesFunction{}, GetDot11Status: &device.GetDot11StatusFunction{}, GetDot1XConfiguration: &device.GetDot1XConfigurationFunction{}, GetDot1XConfigurations: &device.GetDot1XConfigurationsFunction{}, GetDynamicDNS: &device.GetDynamicDNSFunction{}, GetEndpointReference: &device.GetEndpointReferenceFunction{}, GetGeoLocation: &device.GetGeoLocationFunction{}, GetHostname: &device.GetHostnameFunction{}, GetIPAddressFilter: &device.GetIPAddressFilterFunction{}, GetNTP: &device.GetNTPFunction{}, GetNetworkDefaultGateway: &device.GetNetworkDefaultGatewayFunction{}, GetNetworkInterfaces: &device.GetNetworkInterfacesFunction{}, GetNetworkProtocols: &device.GetNetworkProtocolsFunction{}, GetPkcs10Request: &device.GetPkcs10RequestFunction{}, GetRelayOutputs: &device.GetRelayOutputsFunction{}, GetRemoteDiscoveryMode: &device.GetRemoteDiscoveryModeFunction{}, GetRemoteUser: &device.GetRemoteUserFunction{}, GetScopes: &device.GetScopesFunction{}, GetServiceCapabilities: &device.GetServiceCapabilitiesFunction{}, GetServices: &device.GetServicesFunction{}, GetStorageConfiguration: &device.GetStorageConfigurationFunction{}, GetStorageConfigurations: &device.GetStorageConfigurationsFunction{}, GetSystemBackup: &device.GetSystemBackupFunction{}, GetSystemDateAndTime: &device.GetSystemDateAndTimeFunction{}, GetSystemLog: &device.GetSystemLogFunction{}, GetSystemSupportInformation: &device.GetSystemSupportInformationFunction{}, GetSystemUris: &device.GetSystemUrisFunction{}, GetUsers: &device.GetUsersFunction{}, GetWsdlUrl: &device.GetWsdlUrlFunction{}, GetZeroConfiguration: &device.GetZeroConfigurationFunction{}, LoadCACertificates: &device.LoadCACertificatesFunction{}, LoadCertificateWithPrivateKey: &device.LoadCertificateWithPrivateKeyFunction{}, LoadCertificates: &device.LoadCertificatesFunction{}, RemoveIPAddressFilter: &device.RemoveIPAddressFilterFunction{}, RemoveScopes: &device.RemoveScopesFunction{}, RestoreSystem: &device.RestoreSystemFunction{}, ScanAvailableDot11Networks: &device.ScanAvailableDot11NetworksFunction{}, SendAuxiliaryCommand: &device.SendAuxiliaryCommandFunction{}, SetAccessPolicy: &device.SetAccessPolicyFunction{}, SetCertificatesStatus: &device.SetCertificatesStatusFunction{}, SetClientCertificateMode: &device.SetClientCertificateModeFunction{}, SetDNS: &device.SetDNSFunction{}, SetDPAddresses: &device.SetDPAddressesFunction{}, SetDiscoveryMode: &device.SetDiscoveryModeFunction{}, SetDot1XConfiguration: &device.SetDot1XConfigurationFunction{}, SetDynamicDNS: &device.SetDynamicDNSFunction{}, SetGeoLocation: &device.SetGeoLocationFunction{}, SetHostname: &device.SetHostnameFunction{}, SetHostnameFromDHCP: &device.SetHostnameFromDHCPFunction{}, SetIPAddressFilter: &device.SetIPAddressFilterFunction{}, SetNTP: &device.SetNTPFunction{}, SetNetworkDefaultGateway: &device.SetNetworkDefaultGatewayFunction{}, SetNetworkInterfaces: &device.SetNetworkInterfacesFunction{}, SetNetworkProtocols: &device.SetNetworkProtocolsFunction{}, SetRelayOutputSettings: &device.SetRelayOutputSettingsFunction{}, SetRelayOutputState: &device.SetRelayOutputStateFunction{}, SetRemoteDiscoveryMode: &device.SetRemoteDiscoveryModeFunction{}, SetRemoteUser: &device.SetRemoteUserFunction{}, SetScopes: &device.SetScopesFunction{}, SetStorageConfiguration: &device.SetStorageConfigurationFunction{}, SetSystemDateAndTime: &device.SetSystemDateAndTimeFunction{}, SetSystemFactoryDefault: &device.SetSystemFactoryDefaultFunction{}, SetUser: &device.SetUserFunction{}, SetZeroConfiguration: &device.SetZeroConfigurationFunction{}, StartFirmwareUpgrade: &device.StartFirmwareUpgradeFunction{}, StartSystemRestore: &device.StartSystemRestoreFunction{}, SystemReboot: &device.SystemRebootFunction{}, UpgradeSystemFirmware: &device.UpgradeSystemFirmwareFunction{}, }
var EventFunctionMap = map[string]Function{ CreatePullPointSubscription: &event.CreatePullPointSubscriptionFunction{}, GetEventProperties: &event.GetEventPropertiesFunction{}, GetServiceCapabilities: &event.GetServiceCapabilitiesFunction{}, PullMessages: &event.PullMessagesFunction{}, Renew: &event.RenewFunction{}, Seek: &event.SeekFunction{}, SetSynchronizationPoint: &event.SetSynchronizationPointFunction{}, Subscribe: &event.SubscribeFunction{}, SubscriptionReference: &event.SubscriptionReferenceFunction{}, Unsubscribe: &event.UnsubscribeFunction{}, }
var ImagingFunctionMap = map[string]Function{
GetCurrentPreset: &imaging.GetCurrentPresetFunction{},
GetImagingSettings: &imaging.GetImagingSettingsFunction{},
GetMoveOptions: &imaging.GetMoveOptionsFunction{},
GetOptions: &imaging.GetOptionsFunction{},
GetPresets: &imaging.GetPresetsFunction{},
GetServiceCapabilities: &imaging.GetServiceCapabilitiesFunction{},
GetStatus: &imaging.GetStatusFunction{},
Move: &imaging.MoveFunction{},
SetCurrentPreset: &imaging.SetCurrentPresetFunction{},
SetImagingSettings: &imaging.SetImagingSettingsFunction{},
Stop: &imaging.StopFunction{},
}
var Media2FunctionMap = map[string]Function{ AddConfiguration: &media2.AddConfigurationFunction{}, GetAnalyticsConfigurations: &media2.GetAnalyticsConfigurationsFunction{}, GetProfiles: &media2.GetProfilesFunction{}, RemoveConfiguration: &media2.RemoveConfigurationFunction{}, }
var MediaFunctionMap = map[string]Function{ AddAudioDecoderConfiguration: &media.AddAudioDecoderConfigurationFunction{}, AddAudioEncoderConfiguration: &media.AddAudioEncoderConfigurationFunction{}, AddAudioOutputConfiguration: &media.AddAudioOutputConfigurationFunction{}, AddAudioSourceConfiguration: &media.AddAudioSourceConfigurationFunction{}, AddMetadataConfiguration: &media.AddMetadataConfigurationFunction{}, AddPTZConfiguration: &media.AddPTZConfigurationFunction{}, AddVideoAnalyticsConfiguration: &media.AddVideoAnalyticsConfigurationFunction{}, AddVideoEncoderConfiguration: &media.AddVideoEncoderConfigurationFunction{}, AddVideoSourceConfiguration: &media.AddVideoSourceConfigurationFunction{}, CreateOSD: &media.CreateOSDFunction{}, CreateProfile: &media.CreateProfileFunction{}, DeleteOSD: &media.DeleteOSDFunction{}, DeleteProfile: &media.DeleteProfileFunction{}, GetAudioDecoderConfiguration: &media.GetAudioDecoderConfigurationFunction{}, GetAudioDecoderConfigurationOptions: &media.GetAudioDecoderConfigurationOptionsFunction{}, GetAudioDecoderConfigurations: &media.GetAudioDecoderConfigurationsFunction{}, GetAudioEncoderConfiguration: &media.GetAudioEncoderConfigurationFunction{}, GetAudioEncoderConfigurationOptions: &media.GetAudioEncoderConfigurationOptionsFunction{}, GetAudioEncoderConfigurations: &media.GetAudioEncoderConfigurationsFunction{}, GetAudioOutputConfiguration: &media.GetAudioOutputConfigurationFunction{}, GetAudioOutputConfigurationOptions: &media.GetAudioOutputConfigurationOptionsFunction{}, GetAudioOutputConfigurations: &media.GetAudioOutputConfigurationsFunction{}, GetAudioOutputs: &media.GetAudioOutputsFunction{}, GetAudioSourceConfiguration: &media.GetAudioSourceConfigurationFunction{}, GetAudioSourceConfigurationOptions: &media.GetAudioSourceConfigurationOptionsFunction{}, GetAudioSourceConfigurations: &media.GetAudioSourceConfigurationsFunction{}, GetAudioSources: &media.GetAudioSourcesFunction{}, GetCompatibleAudioDecoderConfigurations: &media.GetCompatibleAudioDecoderConfigurationsFunction{}, GetCompatibleAudioEncoderConfigurations: &media.GetCompatibleAudioEncoderConfigurationsFunction{}, GetCompatibleAudioOutputConfigurations: &media.GetCompatibleAudioOutputConfigurationsFunction{}, GetCompatibleAudioSourceConfigurations: &media.GetCompatibleAudioSourceConfigurationsFunction{}, GetCompatibleMetadataConfigurations: &media.GetCompatibleMetadataConfigurationsFunction{}, GetCompatibleVideoAnalyticsConfigurations: &media.GetCompatibleVideoAnalyticsConfigurationsFunction{}, GetCompatibleVideoEncoderConfigurations: &media.GetCompatibleVideoEncoderConfigurationsFunction{}, GetCompatibleVideoSourceConfigurations: &media.GetCompatibleVideoSourceConfigurationsFunction{}, GetGuaranteedNumberOfVideoEncoderInstances: &media.GetGuaranteedNumberOfVideoEncoderInstancesFunction{}, GetMetadataConfiguration: &media.GetMetadataConfigurationFunction{}, GetMetadataConfigurationOptions: &media.GetMetadataConfigurationOptionsFunction{}, GetMetadataConfigurations: &media.GetMetadataConfigurationsFunction{}, GetOSD: &media.GetOSDFunction{}, GetOSDOptions: &media.GetOSDOptionsFunction{}, GetOSDs: &media.GetOSDsFunction{}, GetProfile: &media.GetProfileFunction{}, GetProfiles: &media.GetProfilesFunction{}, GetServiceCapabilities: &media.GetServiceCapabilitiesFunction{}, GetSnapshotUri: &media.GetSnapshotUriFunction{}, GetStreamUri: &media.GetStreamUriFunction{}, GetVideoAnalyticsConfiguration: &media.GetVideoAnalyticsConfigurationFunction{}, GetVideoAnalyticsConfigurations: &media.GetVideoAnalyticsConfigurationsFunction{}, GetVideoEncoderConfiguration: &media.GetVideoEncoderConfigurationFunction{}, GetVideoEncoderConfigurationOptions: &media.GetVideoEncoderConfigurationOptionsFunction{}, GetVideoEncoderConfigurations: &media.GetVideoEncoderConfigurationsFunction{}, GetVideoSourceConfiguration: &media.GetVideoSourceConfigurationFunction{}, GetVideoSourceConfigurationOptions: &media.GetVideoSourceConfigurationOptionsFunction{}, GetVideoSourceConfigurations: &media.GetVideoSourceConfigurationsFunction{}, GetVideoSourceModes: &media.GetVideoSourceModesFunction{}, GetVideoSources: &media.GetVideoSourcesFunction{}, RemoveAudioDecoderConfiguration: &media.RemoveAudioDecoderConfigurationFunction{}, RemoveAudioEncoderConfiguration: &media.RemoveAudioEncoderConfigurationFunction{}, RemoveAudioOutputConfiguration: &media.RemoveAudioOutputConfigurationFunction{}, RemoveAudioSourceConfiguration: &media.RemoveAudioSourceConfigurationFunction{}, RemoveMetadataConfiguration: &media.RemoveMetadataConfigurationFunction{}, RemovePTZConfiguration: &media.RemovePTZConfigurationFunction{}, RemoveVideoAnalyticsConfiguration: &media.RemoveVideoAnalyticsConfigurationFunction{}, RemoveVideoEncoderConfiguration: &media.RemoveVideoEncoderConfigurationFunction{}, RemoveVideoSourceConfiguration: &media.RemoveVideoSourceConfigurationFunction{}, SetAudioDecoderConfiguration: &media.SetAudioDecoderConfigurationFunction{}, SetAudioEncoderConfiguration: &media.SetAudioEncoderConfigurationFunction{}, SetAudioOutputConfiguration: &media.SetAudioOutputConfigurationFunction{}, SetAudioSourceConfiguration: &media.SetAudioSourceConfigurationFunction{}, SetMetadataConfiguration: &media.SetMetadataConfigurationFunction{}, SetOSD: &media.SetOSDFunction{}, SetSynchronizationPoint: &media.SetSynchronizationPointFunction{}, SetVideoAnalyticsConfiguration: &media.SetVideoAnalyticsConfigurationFunction{}, SetVideoEncoderConfiguration: &media.SetVideoEncoderConfigurationFunction{}, SetVideoSourceConfiguration: &media.SetVideoSourceConfigurationFunction{}, SetVideoSourceMode: &media.SetVideoSourceModeFunction{}, StartMulticastStreaming: &media.StartMulticastStreamingFunction{}, StopMulticastStreaming: &media.StopMulticastStreamingFunction{}, }
var PTZFunctionMap = map[string]Function{ AbsoluteMove: &ptz.AbsoluteMoveFunction{}, ContinuousMove: &ptz.ContinuousMoveFunction{}, CreatePresetTour: &ptz.CreatePresetTourFunction{}, GeoMove: &ptz.GeoMoveFunction{}, GetCompatibleConfigurations: &ptz.GetCompatibleConfigurationsFunction{}, GetConfiguration: &ptz.GetConfigurationFunction{}, GetConfigurationOptions: &ptz.GetConfigurationOptionsFunction{}, GetConfigurations: &ptz.GetConfigurationsFunction{}, GetNode: &ptz.GetNodeFunction{}, GetNodes: &ptz.GetNodesFunction{}, GetPresetTour: &ptz.GetPresetTourFunction{}, GetPresetTourOptions: &ptz.GetPresetTourOptionsFunction{}, GetPresetTours: &ptz.GetPresetToursFunction{}, GetPresets: &ptz.GetPresetsFunction{}, GetServiceCapabilities: &ptz.GetServiceCapabilitiesFunction{}, GetStatus: &ptz.GetStatusFunction{}, GotoHomePosition: &ptz.GotoHomePositionFunction{}, GotoPreset: &ptz.GotoPresetFunction{}, ModifyPresetTour: &ptz.ModifyPresetTourFunction{}, OperatePresetTour: &ptz.OperatePresetTourFunction{}, RelativeMove: &ptz.RelativeMoveFunction{}, RemovePreset: &ptz.RemovePresetFunction{}, RemovePresetTour: &ptz.RemovePresetTourFunction{}, SendAuxiliaryCommand: &ptz.SendAuxiliaryCommandFunction{}, SetConfiguration: &ptz.SetConfigurationFunction{}, SetHomePosition: &ptz.SetHomePositionFunction{}, SetPreset: &ptz.SetPresetFunction{}, Stop: &ptz.StopFunction{}, }
var Xlmns = map[string]string{
"onvif": "http://www.onvif.org/ver10/schema",
"tds": "http://www.onvif.org/ver10/device/wsdl",
"trt": "http://www.onvif.org/ver10/media/wsdl",
"tr2": "http://www.onvif.org/ver20/media/wsdl",
"tev": "http://www.onvif.org/ver10/events/wsdl",
"tptz": "http://www.onvif.org/ver20/ptz/wsdl",
"timg": "http://www.onvif.org/ver20/imaging/wsdl",
"tan": "http://www.onvif.org/ver20/analytics/wsdl",
"xmime": "http://www.w3.org/2005/05/xmlmime",
"wsnt": "http://docs.oasis-open.org/wsn/b-2",
"xop": "http://www.w3.org/2004/08/xop/include",
"wsa": "http://www.w3.org/2005/08/addressing",
"wstop": "http://docs.oasis-open.org/wsn/t-1",
"wsntw": "http://docs.oasis-open.org/wsn/bw-2",
"wsrf-rw": "http://docs.oasis-open.org/wsrf/rw-2",
"wsaw": "http://www.w3.org/2006/05/addressing/wsdl",
}
Xlmns XML Scheam
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
Device for a new device of onvif and DeviceInfo struct represents an abstract ONVIF device. It contains methods, which helps to communicate with ONVIF device
func NewDevice ¶
func NewDevice(params DeviceParams) (*Device, error)
NewDevice function construct a ONVIF Device entity
func (*Device) CallMethod ¶
CallMethod functions call an method, defined <method> struct. You should use Authenticate method to call authorized requests.
func (*Device) CallOnvifFunction ¶
func (*Device) GetDeviceInfo ¶
func (dev *Device) GetDeviceInfo() DeviceInfo
GetServices return available endpoints
func (*Device) GetDeviceParams ¶
func (dev *Device) GetDeviceParams() DeviceParams
func (*Device) GetEndpoint ¶
GetEndpoint returns specific ONVIF service endpoint address
func (*Device) GetEndpointByRequestStruct ¶
func (*Device) GetServices ¶
GetServices return available endpoints
func (*Device) SendGetSnapshotRequest ¶
SendGetSnapshotRequest sends the Get request to retrieve the snapshot from the Onvif camera The parameter url is come from the "GetSnapshotURI" command.
type DeviceInfo ¶
type DeviceInfo struct { Manufacturer string Model string FirmwareVersion string SerialNumber string HardwareId string }
DeviceInfo struct contains general information about ONVIF device
type DeviceParams ¶
type DeviceType ¶
type DeviceType int
DeviceType alias for int
const ( NVD DeviceType = iota NVS NVA NVT ContentType = "Content-Type" )
Onvif Device Tyoe
func (DeviceType) String ¶
func (devType DeviceType) String() string
type DigestClient ¶
type DigestClient struct {
// contains filtered or unexported fields
}
DigestClient represents an HTTP client used for making requests authenticated with http digest authentication.
func NewDigestClient ¶
func NewDigestClient(stdClient *http.Client, username string, password string) *DigestClient
NewDigestClient returns a DigestClient that wraps a given standard library http Client with the given username and password