diff --git a/endpoints/drive/driveServer/file.go b/drives/davServer/file.go similarity index 99% rename from endpoints/drive/driveServer/file.go rename to drives/davServer/file.go index fbfacc81..762e605f 100644 --- a/endpoints/drive/driveServer/file.go +++ b/drives/davServer/file.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package driveServer +package davServer import ( "context" diff --git a/endpoints/drive/driveServer/file_test.go b/drives/davServer/file_test.go similarity index 99% rename from endpoints/drive/driveServer/file_test.go rename to drives/davServer/file_test.go index 834e08d7..c935d5a6 100644 --- a/endpoints/drive/driveServer/file_test.go +++ b/drives/davServer/file_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package driveServer +package davServer import ( "context" diff --git a/endpoints/drive/driveServer/if.go b/drives/davServer/if.go similarity index 99% rename from endpoints/drive/driveServer/if.go rename to drives/davServer/if.go index 5eedaeab..0697c540 100644 --- a/endpoints/drive/driveServer/if.go +++ b/drives/davServer/if.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package driveServer +package davServer // The If header is covered by Section 10.4. // http://www.webdav.org/specs/rfc4918.html#HEADER_If diff --git a/endpoints/drive/driveServer/if_test.go b/drives/davServer/if_test.go similarity index 99% rename from endpoints/drive/driveServer/if_test.go rename to drives/davServer/if_test.go index 1df7eeeb..b8cc8acf 100644 --- a/endpoints/drive/driveServer/if_test.go +++ b/drives/davServer/if_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package driveServer +package davServer import ( "reflect" diff --git a/endpoints/drive/driveServer/internal/xml/README b/drives/davServer/internal/xml/README similarity index 100% rename from endpoints/drive/driveServer/internal/xml/README rename to drives/davServer/internal/xml/README diff --git a/endpoints/drive/driveServer/internal/xml/atom_test.go b/drives/davServer/internal/xml/atom_test.go similarity index 100% rename from endpoints/drive/driveServer/internal/xml/atom_test.go rename to drives/davServer/internal/xml/atom_test.go diff --git a/endpoints/drive/driveServer/internal/xml/example_test.go b/drives/davServer/internal/xml/example_test.go similarity index 100% rename from endpoints/drive/driveServer/internal/xml/example_test.go rename to drives/davServer/internal/xml/example_test.go diff --git a/endpoints/drive/driveServer/internal/xml/marshal.go b/drives/davServer/internal/xml/marshal.go similarity index 100% rename from endpoints/drive/driveServer/internal/xml/marshal.go rename to drives/davServer/internal/xml/marshal.go diff --git a/endpoints/drive/driveServer/internal/xml/marshal_test.go b/drives/davServer/internal/xml/marshal_test.go similarity index 100% rename from endpoints/drive/driveServer/internal/xml/marshal_test.go rename to drives/davServer/internal/xml/marshal_test.go diff --git a/endpoints/drive/driveServer/internal/xml/read.go b/drives/davServer/internal/xml/read.go similarity index 100% rename from endpoints/drive/driveServer/internal/xml/read.go rename to drives/davServer/internal/xml/read.go diff --git a/endpoints/drive/driveServer/internal/xml/read_test.go b/drives/davServer/internal/xml/read_test.go similarity index 100% rename from endpoints/drive/driveServer/internal/xml/read_test.go rename to drives/davServer/internal/xml/read_test.go diff --git a/endpoints/drive/driveServer/internal/xml/typeinfo.go b/drives/davServer/internal/xml/typeinfo.go similarity index 100% rename from endpoints/drive/driveServer/internal/xml/typeinfo.go rename to drives/davServer/internal/xml/typeinfo.go diff --git a/endpoints/drive/driveServer/internal/xml/xml.go b/drives/davServer/internal/xml/xml.go similarity index 100% rename from endpoints/drive/driveServer/internal/xml/xml.go rename to drives/davServer/internal/xml/xml.go diff --git a/endpoints/drive/driveServer/internal/xml/xml_test.go b/drives/davServer/internal/xml/xml_test.go similarity index 100% rename from endpoints/drive/driveServer/internal/xml/xml_test.go rename to drives/davServer/internal/xml/xml_test.go diff --git a/endpoints/drive/driveServer/litmus_test_server.go b/drives/davServer/litmus_test_server.go similarity index 100% rename from endpoints/drive/driveServer/litmus_test_server.go rename to drives/davServer/litmus_test_server.go diff --git a/endpoints/drive/driveServer/lock.go b/drives/davServer/lock.go similarity index 99% rename from endpoints/drive/driveServer/lock.go rename to drives/davServer/lock.go index caff970e..871c7647 100644 --- a/endpoints/drive/driveServer/lock.go +++ b/drives/davServer/lock.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package driveServer +package davServer import ( "container/heap" diff --git a/endpoints/drive/driveServer/lock_test.go b/drives/davServer/lock_test.go similarity index 99% rename from endpoints/drive/driveServer/lock_test.go rename to drives/davServer/lock_test.go index 765b8044..1791c4e0 100644 --- a/endpoints/drive/driveServer/lock_test.go +++ b/drives/davServer/lock_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package driveServer +package davServer import ( "fmt" diff --git a/endpoints/drive/driveServer/prop.go b/drives/davServer/prop.go similarity index 99% rename from endpoints/drive/driveServer/prop.go rename to drives/davServer/prop.go index c38d961e..df812c7d 100644 --- a/endpoints/drive/driveServer/prop.go +++ b/drives/davServer/prop.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package driveServer +package davServer import ( "bytes" diff --git a/endpoints/drive/driveServer/prop_test.go b/drives/davServer/prop_test.go similarity index 99% rename from endpoints/drive/driveServer/prop_test.go rename to drives/davServer/prop_test.go index b7338e3f..e1ca3022 100644 --- a/endpoints/drive/driveServer/prop_test.go +++ b/drives/davServer/prop_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package driveServer +package davServer import ( "context" diff --git a/endpoints/drive/driveServer/webdav.go b/drives/davServer/webdav.go similarity index 99% rename from endpoints/drive/driveServer/webdav.go rename to drives/davServer/webdav.go index 5b43da2a..8e586b4d 100644 --- a/endpoints/drive/driveServer/webdav.go +++ b/drives/davServer/webdav.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Package driveServer provides a WebDAV server implementation. -package driveServer +// Package davServer provides a WebDAV server implementation. +package davServer import ( "errors" diff --git a/endpoints/drive/driveServer/webdav_test.go b/drives/davServer/webdav_test.go similarity index 99% rename from endpoints/drive/driveServer/webdav_test.go rename to drives/davServer/webdav_test.go index fbd5a43b..996eb797 100644 --- a/endpoints/drive/driveServer/webdav_test.go +++ b/drives/davServer/webdav_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package driveServer +package davServer import ( "context" diff --git a/endpoints/drive/driveServer/xml.go b/drives/davServer/xml.go similarity index 99% rename from endpoints/drive/driveServer/xml.go rename to drives/davServer/xml.go index ef76a2fe..fc73e12d 100644 --- a/endpoints/drive/driveServer/xml.go +++ b/drives/davServer/xml.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package driveServer +package davServer // The XML encoding is covered by Section 14. // http://www.webdav.org/specs/rfc4918.html#xml.element.definitions @@ -32,7 +32,7 @@ import ( // In the long term, this package should use the standard library's version // only, and the internal fork deleted, once // https://github.com/golang/go/issues/13400 is resolved. - ixml "github.com/openziti/zrok/endpoints/drive/driveServer/internal/xml" + ixml "github.com/openziti/zrok/drives/davServer/internal/xml" ) // http://www.webdav.org/specs/rfc4918.html#ELEMENT_lockinfo diff --git a/endpoints/drive/driveServer/xml_test.go b/drives/davServer/xml_test.go similarity index 99% rename from endpoints/drive/driveServer/xml_test.go rename to drives/davServer/xml_test.go index 1fb65329..09b7e317 100644 --- a/endpoints/drive/driveServer/xml_test.go +++ b/drives/davServer/xml_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package driveServer +package davServer import ( "bytes" @@ -16,7 +16,7 @@ import ( "strings" "testing" - ixml "github.com/openziti/zrok/endpoints/drive/driveServer/internal/xml" + ixml "github.com/openziti/zrok/drives/davServer/internal/xml" ) func TestReadLockInfo(t *testing.T) { diff --git a/endpoints/drive/backend.go b/endpoints/drive/backend.go index f7e5df97..a9e29fbb 100644 --- a/endpoints/drive/backend.go +++ b/endpoints/drive/backend.go @@ -4,8 +4,8 @@ import ( "fmt" "github.com/openziti/sdk-golang/ziti" "github.com/openziti/sdk-golang/ziti/edge" + "github.com/openziti/zrok/drives/davServer" "github.com/openziti/zrok/endpoints" - "github.com/openziti/zrok/endpoints/drive/driveServer" "github.com/pkg/errors" "net/http" "time" @@ -43,9 +43,9 @@ func NewBackend(cfg *BackendConfig) (*Backend, error) { return nil, err } - handler := &driveServer.Handler{ - FileSystem: driveServer.Dir(cfg.DriveRoot), - LockSystem: driveServer.NewMemLS(), + handler := &davServer.Handler{ + FileSystem: davServer.Dir(cfg.DriveRoot), + LockSystem: davServer.NewMemLS(), Logger: func(r *http.Request, err error) { if cfg.Requests != nil { cfg.Requests <- &endpoints.Request{ diff --git a/util/sync/filesystem.go b/util/sync/filesystem.go index 03eb549d..b4fa7c01 100644 --- a/util/sync/filesystem.go +++ b/util/sync/filesystem.go @@ -3,7 +3,7 @@ package sync import ( "context" "fmt" - "github.com/openziti/zrok/endpoints/drive/driveServer" + "github.com/openziti/zrok/drives/davServer" "io" "io/fs" "os" @@ -59,7 +59,7 @@ func (t *FilesystemTarget) recurse(path string, d fs.DirEntry, err error) error return err } etag := "" - if v, ok := fi.(driveServer.ETager); ok { + if v, ok := fi.(davServer.ETager); ok { etag, err = v.ETag(context.Background()) if err != nil { return err