mirror of
https://github.com/kerberos-io/onvif.git
synced 2026-08-23 15:08:33 +00:00
fix package using in current repository
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package analytics
|
||||
|
||||
import (
|
||||
"github.com/yakovlevdmv/goonvif/xsd"
|
||||
"github.com/yakovlevdmv/goonvif/xsd/onvif"
|
||||
"github.com/use-go/goonvif/xsd"
|
||||
"github.com/use-go/goonvif/xsd/onvif"
|
||||
)
|
||||
|
||||
type GetSupportedRules struct {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package device
|
||||
|
||||
import (
|
||||
"github.com/yakovlevdmv/goonvif/xsd"
|
||||
"github.com/yakovlevdmv/goonvif/xsd/onvif"
|
||||
"github.com/use-go/goonvif/xsd"
|
||||
"github.com/use-go/goonvif/xsd/onvif"
|
||||
)
|
||||
|
||||
type Service struct {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package event
|
||||
|
||||
import (
|
||||
"github.com/yakovlevdmv/goonvif/xsd"
|
||||
"github.com/use-go/goonvif/xsd"
|
||||
)
|
||||
|
||||
type FilterType xsd.String
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package imaging
|
||||
|
||||
import (
|
||||
"github.com/yakovlevdmv/goonvif/xsd"
|
||||
"github.com/yakovlevdmv/goonvif/xsd/onvif"
|
||||
"github.com/use-go/goonvif/xsd"
|
||||
"github.com/use-go/goonvif/xsd/onvif"
|
||||
)
|
||||
|
||||
type GetServiceCapabilities struct {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package media
|
||||
|
||||
import (
|
||||
"github.com/yakovlevdmv/goonvif/xsd"
|
||||
"github.com/yakovlevdmv/goonvif/xsd/onvif"
|
||||
"github.com/use-go/goonvif/xsd"
|
||||
"github.com/use-go/goonvif/xsd/onvif"
|
||||
)
|
||||
|
||||
type Capabilities struct {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package ptz
|
||||
|
||||
import (
|
||||
"github.com/yakovlevdmv/goonvif/xsd"
|
||||
"github.com/yakovlevdmv/goonvif/xsd/onvif"
|
||||
"github.com/use-go/goonvif/xsd"
|
||||
"github.com/use-go/goonvif/xsd/onvif"
|
||||
)
|
||||
|
||||
type Capabilities struct {
|
||||
|
||||
@@ -7,7 +7,7 @@ Simple management of onvif IP-devices cameras. Goonvif is an implementation of
|
||||
To install the library, use **go get**:
|
||||
|
||||
```go
|
||||
go get github.com/yakovlevdmv/goonvif
|
||||
go get github.com/use-go/goonvif
|
||||
```
|
||||
|
||||
## Supported services
|
||||
|
||||
@@ -13,8 +13,8 @@ import (
|
||||
"github.com/beevik/etree"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/yakovlevdmv/WS-Discovery"
|
||||
"github.com/yakovlevdmv/goonvif"
|
||||
"github.com/yakovlevdmv/goonvif/networking"
|
||||
"github.com/use-go/goonvif"
|
||||
"github.com/use-go/goonvif/networking"
|
||||
"github.com/yakovlevdmv/gosoap"
|
||||
)
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"github.com/yakovlevdmv/goonvif/PTZ"
|
||||
"github.com/use-go/goonvif/ptz"
|
||||
"errors"
|
||||
"github.com/yakovlevdmv/goonvif/Device"
|
||||
"github.com/yakovlevdmv/goonvif/Media"
|
||||
"github.com/use-go/goonvif/device"
|
||||
"github.com/use-go/goonvif/Media"
|
||||
)
|
||||
|
||||
func getPTZStructByName(name string) (interface{}, error) {
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/yakovlevdmv/goonvif"
|
||||
"net/http"
|
||||
"io/ioutil"
|
||||
"github.com/yakovlevdmv/goonvif/Device"
|
||||
"github.com/yakovlevdmv/goonvif/xsd/onvif"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/use-go/goonvif"
|
||||
"github.com/use-go/goonvif/device"
|
||||
"github.com/use-go/goonvif/xsd/onvif"
|
||||
"github.com/yakovlevdmv/gosoap"
|
||||
)
|
||||
|
||||
const (
|
||||
login = "admin"
|
||||
login = "admin"
|
||||
password = "Supervisor"
|
||||
)
|
||||
|
||||
@@ -32,18 +33,17 @@ func main() {
|
||||
}
|
||||
//Authorization
|
||||
dev.Authenticate(login, password)
|
||||
|
||||
|
||||
//Preparing commands
|
||||
systemDateAndTyme := Device.GetSystemDateAndTime{}
|
||||
getCapabilities := Device.GetCapabilities{Category:"All"}
|
||||
createUser := Device.CreateUsers{User:
|
||||
onvif.User{
|
||||
Username: "TestUser",
|
||||
Password: "TestPassword",
|
||||
UserLevel: "User",
|
||||
},
|
||||
}
|
||||
|
||||
systemDateAndTyme := device.GetSystemDateAndTime{}
|
||||
getCapabilities := device.GetCapabilities{Category: "All"}
|
||||
createUser := device.CreateUsers{User: onvif.User{
|
||||
Username: "TestUser",
|
||||
Password: "TestPassword",
|
||||
UserLevel: "User",
|
||||
},
|
||||
}
|
||||
|
||||
//Commands execution
|
||||
systemDateAndTymeResponse, err := dev.CallMethod(systemDateAndTyme)
|
||||
if err != nil {
|
||||
@@ -62,11 +62,9 @@ func main() {
|
||||
log.Println(err)
|
||||
} else {
|
||||
/*
|
||||
You could use https://github.com/yakovlevdmv/gosoap for pretty printing response
|
||||
*/
|
||||
You could use https://github.com/yakovlevdmv/gosoap for pretty printing response
|
||||
*/
|
||||
fmt.Println(gosoap.SoapMessage(readResponse(createUserResponse)).StringIndent())
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package onvif
|
||||
|
||||
import (
|
||||
"github.com/yakovlevdmv/goonvif/xsd"
|
||||
"github.com/use-go/goonvif/xsd"
|
||||
)
|
||||
|
||||
// BUG(r): Enum types implemented as simple string
|
||||
|
||||
Reference in New Issue
Block a user