mirror of
https://github.com/openziti/zrok.git
synced 2025-01-21 21:38:50 +01:00
util/sync/driveClient -> drives/davClient (#511)
This commit is contained in:
parent
a972c9fc2f
commit
34acc81822
@ -2,7 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/openziti/zrok/util/sync/driveClient"
|
||||
"github.com/openziti/zrok/drives/davClient"
|
||||
"github.com/spf13/cobra"
|
||||
"io"
|
||||
"net/http"
|
||||
@ -29,7 +29,7 @@ func newDavtestCommand() *davtestCommand {
|
||||
}
|
||||
|
||||
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 {
|
||||
panic(err)
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
package driveClient
|
||||
package davClient
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/openziti/zrok/util/sync/driveClient/internal"
|
||||
"github.com/openziti/zrok/drives/davClient/internal"
|
||||
"io"
|
||||
"net/http"
|
||||
"time"
|
@ -1,4 +1,4 @@
|
||||
package driveClient
|
||||
package davClient
|
||||
|
||||
import (
|
||||
"errors"
|
@ -2,7 +2,7 @@ package sync
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/openziti/zrok/util/sync/driveClient"
|
||||
"github.com/openziti/zrok/drives/davClient"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
@ -18,11 +18,11 @@ type WebDAVTargetConfig struct {
|
||||
|
||||
type WebDAVTarget struct {
|
||||
cfg *WebDAVTargetConfig
|
||||
dc *driveClient.Client
|
||||
dc *davClient.Client
|
||||
}
|
||||
|
||||
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 {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -2,9 +2,9 @@ package sync
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/openziti/zrok/drives/davClient"
|
||||
"github.com/openziti/zrok/environment/env_core"
|
||||
"github.com/openziti/zrok/sdk/golang/sdk"
|
||||
"github.com/openziti/zrok/util/sync/driveClient"
|
||||
"io"
|
||||
"net"
|
||||
"net/http"
|
||||
@ -24,7 +24,7 @@ type ZrokTargetConfig struct {
|
||||
|
||||
type ZrokTarget struct {
|
||||
cfg *ZrokTargetConfig
|
||||
dc *driveClient.Client
|
||||
dc *davClient.Client
|
||||
}
|
||||
|
||||
type zrokDialContext struct {
|
||||
@ -41,7 +41,7 @@ func NewZrokTarget(cfg *ZrokTargetConfig) (*ZrokTarget, error) {
|
||||
transport.DialContext = (&zrokDialContext{cfg.Root}).Dial
|
||||
transport.TLSClientConfig.InsecureSkipVerify = true
|
||||
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 {
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user