Skip to content

Commit

Permalink
Rename client package to gonvif.
Browse files Browse the repository at this point in the history
  • Loading branch information
osery committed Sep 27, 2022
1 parent 9f715d6 commit 7822de1
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ gonvif completion bash
import (
"log"

"github.com/eyetowers/gonvif/pkg/client"
"github.com/eyetowers/gonvif/pkg/gonvif"
)

func main() {
// Connect to the Onvif device.
onvif, err := client.New("http://IP[:PORT]", "USERNAME", "PASSWORD")
client, err := gonvif.New("http://IP[:PORT]", "USERNAME", "PASSWORD")
if err != nil {
log.Fatal(err)
}
// Get the Media2 service client.
media, err := onvif.Media2()
media, err := client.Media2()
if err != nil {
log.Fatal(err)
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/gonvif/device/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"github.com/spf13/cobra"

"github.com/eyetowers/gonvif/cmd/gonvif/root"
"github.com/eyetowers/gonvif/pkg/client"
"github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver10/device/wsdl"
"github.com/eyetowers/gonvif/pkg/gonvif"
)

var cmd = &cobra.Command{
Expand All @@ -22,7 +22,7 @@ func init() {
}

func ServiceClient(url, username, password string, verbose bool) (wsdl.Device, error) {
onvif, err := client.New(url, username, password, verbose)
onvif, err := gonvif.New(url, username, password, verbose)
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/gonvif/imaging/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"github.com/spf13/cobra"

"github.com/eyetowers/gonvif/cmd/gonvif/root"
"github.com/eyetowers/gonvif/pkg/client"
"github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver20/imaging/wsdl"
"github.com/eyetowers/gonvif/pkg/gonvif"
)

var cmd = &cobra.Command{
Expand All @@ -28,7 +28,7 @@ func init() {
}

func ServiceClient(url, username, password string, verbose bool) (wsdl.ImagingPort, error) {
onvif, err := client.New(url, username, password, verbose)
onvif, err := gonvif.New(url, username, password, verbose)
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/gonvif/media/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"github.com/spf13/cobra"

"github.com/eyetowers/gonvif/cmd/gonvif/root"
"github.com/eyetowers/gonvif/pkg/client"
"github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver20/media/wsdl"
"github.com/eyetowers/gonvif/pkg/gonvif"
)

var cmd = &cobra.Command{
Expand All @@ -24,7 +24,7 @@ func init() {
}

func ServiceClient(url, username, password string, verbose bool) (wsdl.Media2, error) {
onvif, err := client.New(url, username, password, verbose)
onvif, err := gonvif.New(url, username, password, verbose)
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/gonvif/ptz/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"github.com/spf13/cobra"

"github.com/eyetowers/gonvif/cmd/gonvif/root"
"github.com/eyetowers/gonvif/pkg/client"
"github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver20/ptz/wsdl"
"github.com/eyetowers/gonvif/pkg/gonvif"
)

var cmd = &cobra.Command{
Expand All @@ -23,7 +23,7 @@ func init() {
}

func ServiceClient(url, username, password string, verbose bool) (wsdl.PTZ, error) {
onvif, err := client.New(url, username, password, verbose)
onvif, err := gonvif.New(url, username, password, verbose)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/client/client.go → pkg/gonvif/client.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package client
package gonvif

import (
"bytes"
Expand Down

0 comments on commit 7822de1

Please sign in to comment.