mirror of
https://github.com/openziti/zrok.git
synced 2024-11-07 16:54:23 +01:00
snapshot; starting 'driveClient'
This commit is contained in:
parent
7e1a42e8a1
commit
0c39cd8752
15
util/sync/driveClient/client.go
Normal file
15
util/sync/driveClient/client.go
Normal file
@ -0,0 +1,15 @@
|
||||
package driveClient
|
||||
|
||||
import "net/http"
|
||||
|
||||
type Client struct {
|
||||
client *http.Client
|
||||
}
|
||||
|
||||
func NewHttpClient(uri string) *Client {
|
||||
return &Client{&http.Client{}}
|
||||
}
|
||||
|
||||
func (c *Client) Connect() error {
|
||||
return nil
|
||||
}
|
@ -38,7 +38,8 @@ func NewWebDAVTarget(cfg *WebDAVTargetConfig) (*WebDAVTarget, error) {
|
||||
|
||||
func (t *WebDAVTarget) Inventory() ([]*Object, error) {
|
||||
fi, err := t.c.Stat("")
|
||||
if !fi.IsDir() {
|
||||
|
||||
if fi != nil && !fi.IsDir() {
|
||||
t.isDir = false
|
||||
return []*Object{{
|
||||
Path: fi.Name(),
|
||||
|
Loading…
Reference in New Issue
Block a user