util/sync/driveClient -> drives/davClient (#511)

This commit is contained in:
Michael Quigley 2024-01-10 11:44:06 -05:00
parent a972c9fc2f
commit 34acc81822
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
9 changed files with 11 additions and 11 deletions

View File

@ -2,7 +2,7 @@ package main
import ( import (
"context" "context"
"github.com/openziti/zrok/util/sync/driveClient" "github.com/openziti/zrok/drives/davClient"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"io" "io"
"net/http" "net/http"
@ -29,7 +29,7 @@ func newDavtestCommand() *davtestCommand {
} }
func (cmd *davtestCommand) run(_ *cobra.Command, args []string) { func (cmd *davtestCommand) run(_ *cobra.Command, args []string) {
client, err := driveClient.NewClient(http.DefaultClient, args[0]) client, err := davClient.NewClient(http.DefaultClient, args[0])
if err != nil { if err != nil {
panic(err) panic(err)
} }

View File

@ -1,9 +1,9 @@
package driveClient package davClient
import ( import (
"context" "context"
"fmt" "fmt"
"github.com/openziti/zrok/util/sync/driveClient/internal" "github.com/openziti/zrok/drives/davClient/internal"
"io" "io"
"net/http" "net/http"
"time" "time"

View File

@ -1,4 +1,4 @@
package driveClient package davClient
import ( import (
"errors" "errors"

View File

@ -2,7 +2,7 @@ package sync
import ( import (
"context" "context"
"github.com/openziti/zrok/util/sync/driveClient" "github.com/openziti/zrok/drives/davClient"
"io" "io"
"net/http" "net/http"
"net/url" "net/url"
@ -18,11 +18,11 @@ type WebDAVTargetConfig struct {
type WebDAVTarget struct { type WebDAVTarget struct {
cfg *WebDAVTargetConfig cfg *WebDAVTargetConfig
dc *driveClient.Client dc *davClient.Client
} }
func NewWebDAVTarget(cfg *WebDAVTargetConfig) (*WebDAVTarget, error) { func NewWebDAVTarget(cfg *WebDAVTargetConfig) (*WebDAVTarget, error) {
dc, err := driveClient.NewClient(http.DefaultClient, cfg.URL.String()) dc, err := davClient.NewClient(http.DefaultClient, cfg.URL.String())
if err != nil { if err != nil {
return nil, err return nil, err
} }

View File

@ -2,9 +2,9 @@ package sync
import ( import (
"context" "context"
"github.com/openziti/zrok/drives/davClient"
"github.com/openziti/zrok/environment/env_core" "github.com/openziti/zrok/environment/env_core"
"github.com/openziti/zrok/sdk/golang/sdk" "github.com/openziti/zrok/sdk/golang/sdk"
"github.com/openziti/zrok/util/sync/driveClient"
"io" "io"
"net" "net"
"net/http" "net/http"
@ -24,7 +24,7 @@ type ZrokTargetConfig struct {
type ZrokTarget struct { type ZrokTarget struct {
cfg *ZrokTargetConfig cfg *ZrokTargetConfig
dc *driveClient.Client dc *davClient.Client
} }
type zrokDialContext struct { type zrokDialContext struct {
@ -41,7 +41,7 @@ func NewZrokTarget(cfg *ZrokTargetConfig) (*ZrokTarget, error) {
transport.DialContext = (&zrokDialContext{cfg.Root}).Dial transport.DialContext = (&zrokDialContext{cfg.Root}).Dial
transport.TLSClientConfig.InsecureSkipVerify = true transport.TLSClientConfig.InsecureSkipVerify = true
httpUrl := strings.Replace(cfg.URL.String(), "zrok:", "http:", 1) httpUrl := strings.Replace(cfg.URL.String(), "zrok:", "http:", 1)
dc, err := driveClient.NewClient(&http.Client{Transport: transport}, httpUrl) dc, err := davClient.NewClient(&http.Client{Transport: transport}, httpUrl)
if err != nil { if err != nil {
return nil, err return nil, err
} }