diff --git a/changelog/unreleased/rename-oc10-share-manager-driver.md b/changelog/unreleased/rename-oc10-share-manager-driver.md new file mode 100644 index 0000000000..4a44858a4a --- /dev/null +++ b/changelog/unreleased/rename-oc10-share-manager-driver.md @@ -0,0 +1,5 @@ +Change: rename oc10 share manager driver + +We aligned the oc10 SQL share manager driver name with all other owncloud spacific SQL drivers by renaming the package `pkg/share/manager/sql` to `pkg/share/manager/owncloudsql` and changing the name from `oc10-sql` to `owncloudsql`. + +https://github.com/cs3org/reva/pull/2740 diff --git a/pkg/share/manager/loader/loader.go b/pkg/share/manager/loader/loader.go index 50c5f3fa29..b29c6ad31a 100644 --- a/pkg/share/manager/loader/loader.go +++ b/pkg/share/manager/loader/loader.go @@ -23,6 +23,6 @@ import ( _ "github.com/cs3org/reva/v2/pkg/share/manager/cs3" _ "github.com/cs3org/reva/v2/pkg/share/manager/json" _ "github.com/cs3org/reva/v2/pkg/share/manager/memory" - _ "github.com/cs3org/reva/v2/pkg/share/manager/sql" + _ "github.com/cs3org/reva/v2/pkg/share/manager/owncloudsql" // Add your own here ) diff --git a/pkg/share/manager/sql/conversions.go b/pkg/share/manager/owncloudsql/conversions.go similarity index 99% rename from pkg/share/manager/sql/conversions.go rename to pkg/share/manager/owncloudsql/conversions.go index 9a1dbf6fae..ee34dbefbb 100644 --- a/pkg/share/manager/sql/conversions.go +++ b/pkg/share/manager/owncloudsql/conversions.go @@ -16,7 +16,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -package sql +package owncloudsql import ( "context" diff --git a/pkg/share/manager/sql/mocks/UserConverter.go b/pkg/share/manager/owncloudsql/mocks/UserConverter.go similarity index 100% rename from pkg/share/manager/sql/mocks/UserConverter.go rename to pkg/share/manager/owncloudsql/mocks/UserConverter.go diff --git a/pkg/share/manager/sql/sql.go b/pkg/share/manager/owncloudsql/owncloudsql.go similarity index 99% rename from pkg/share/manager/sql/sql.go rename to pkg/share/manager/owncloudsql/owncloudsql.go index 64ff5791b1..ba7af7c550 100644 --- a/pkg/share/manager/sql/sql.go +++ b/pkg/share/manager/owncloudsql/owncloudsql.go @@ -16,7 +16,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -package sql +package owncloudsql import ( "context" @@ -49,7 +49,7 @@ const ( ) func init() { - registry.Register("oc10-sql", NewMysql) + registry.Register("owncloudsql", NewMysql) } type config struct { @@ -112,7 +112,7 @@ func (m *mgr) Share(ctx context.Context, md *provider.ResourceInfo, g *collabora // TODO(labkode): should not this be caught already at the gw level? if g.Grantee.Type == provider.GranteeType_GRANTEE_TYPE_USER && (utils.UserEqual(g.Grantee.GetUserId(), user.Id) || utils.UserEqual(g.Grantee.GetUserId(), md.Owner)) { - return nil, errors.New("sql: owner/creator and grantee are the same") + return nil, errors.New("owncloudsql: owner/creator and grantee are the same") } // check if share already exists. diff --git a/pkg/share/manager/sql/sql_suite_test.go b/pkg/share/manager/owncloudsql/owncloudsql_suite_test.go similarity index 89% rename from pkg/share/manager/sql/sql_suite_test.go rename to pkg/share/manager/owncloudsql/owncloudsql_suite_test.go index e890f1cb17..f5715038da 100644 --- a/pkg/share/manager/sql/sql_suite_test.go +++ b/pkg/share/manager/owncloudsql/owncloudsql_suite_test.go @@ -16,7 +16,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -package sql_test +package owncloudsql_test import ( "testing" @@ -25,7 +25,7 @@ import ( . "github.com/onsi/gomega" ) -func TestSql(t *testing.T) { +func TestOwnCloudSQL(t *testing.T) { RegisterFailHandler(Fail) - RunSpecs(t, "Sql Suite") + RunSpecs(t, "ownCloudSQL share manager Suite") } diff --git a/pkg/share/manager/sql/sql_test.go b/pkg/share/manager/owncloudsql/owncloudsql_test.go similarity index 99% rename from pkg/share/manager/sql/sql_test.go rename to pkg/share/manager/owncloudsql/owncloudsql_test.go index bd2d38a7fe..173b65c93e 100644 --- a/pkg/share/manager/sql/sql_test.go +++ b/pkg/share/manager/owncloudsql/owncloudsql_test.go @@ -16,7 +16,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -package sql_test +package owncloudsql_test import ( "context" @@ -31,8 +31,8 @@ import ( provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" ruser "github.com/cs3org/reva/v2/pkg/ctx" "github.com/cs3org/reva/v2/pkg/share" - sqlmanager "github.com/cs3org/reva/v2/pkg/share/manager/sql" - mocks "github.com/cs3org/reva/v2/pkg/share/manager/sql/mocks" + sqlmanager "github.com/cs3org/reva/v2/pkg/share/manager/owncloudsql" + mocks "github.com/cs3org/reva/v2/pkg/share/manager/owncloudsql/mocks" "google.golang.org/protobuf/types/known/fieldmaskpb" _ "github.com/mattn/go-sqlite3" diff --git a/pkg/share/manager/sql/test.db b/pkg/share/manager/owncloudsql/test.db similarity index 100% rename from pkg/share/manager/sql/test.db rename to pkg/share/manager/owncloudsql/test.db