Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@ driver = "localhome"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="drivers" type="map[string]map[string]interface{}" default="localhome" %}}
{{% dir name="drivers" type="map[string]map[string]interface{}" default="local" %}}
[[Ref]](https://github.com/cs3org/reva/tree/master/internal/grpc/services/storageprovider/storageprovider.go#L64)
{{< highlight toml >}}
[grpc.services.storageprovider.drivers.localhome]
[grpc.services.storageprovider.drivers.local]
root = "/var/tmp/reva/"
share_folder = "/MyShares"
user_layout = "{{.Username}}"

{{< /highlight >}}
{{% /dir %}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,19 @@ prefix = "data"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="driver" type="string" default="localhome" %}}
{{% dir name="driver" type="string" default="local" %}}
The storage driver to be used. [[Ref]](https://github.com/cs3org/reva/tree/master/internal/http/services/dataprovider/dataprovider.go#L41)
{{< highlight toml >}}
[http.services.dataprovider]
driver = "localhome"
driver = "local"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="drivers" type="map[string]map[string]interface{}" default="localhome" %}}
{{% dir name="drivers" type="map[string]map[string]interface{}" default="local" %}}
The configuration for the storage driver [[Ref]](https://github.com/cs3org/reva/tree/master/internal/http/services/dataprovider/dataprovider.go#L42)
{{< highlight toml >}}
[http.services.dataprovider.drivers.localhome]
[http.services.dataprovider.drivers.local]
root = "/var/tmp/reva/"
share_folder = "/MyShares"
user_layout = "{{.Username}}"

{{< /highlight >}}
{{% /dir %}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ insecure = false
{{% /dir %}}

{{% dir name="notifications" type="map[string]interface{}" default=Settingsg for the Notification Helper %}}
[[Ref]](https://github.com/cs3org/reva/tree/master/internal/http/services/owncloud/ocdav/ocdav.go#L122)
[[Ref]](https://github.com/cs3org/reva/tree/master/internal/http/services/owncloud/ocdav/ocdav.go#L123)
{{< highlight toml >}}
[http.services.owncloud.ocdav]
notifications = Settingsg for the Notification Helper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,3 @@ root = "/var/tmp/reva/"
{{< /highlight >}}
{{% /dir %}}

{{% dir name="share_folder" type="string" default="/MyShares" %}}
Path for storing share references. [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/fs/local/local.go#L36)
{{< highlight toml >}}
[storage.fs.local]
share_folder = "/MyShares"
{{< /highlight >}}
{{% /dir %}}

Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,26 @@ description: >
# _struct: config_

{{% dir name="rules" type="map[string]string" default=nil %}}
A map from mountID to provider address [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/registry/dynamic/dynamic.go#L53)
A map from mountID to provider address [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/registry/dynamic/dynamic.go#L56)
{{< highlight toml >}}
[storage.registry.dynamic]
rules = nil
{{< /highlight >}}
{{% /dir %}}

{{% dir name="rewrites" type="map[string]string" default=nil %}}
A map from a path to an template alias to use when resolving [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/registry/dynamic/dynamic.go#L54)
A map from a path to an template alias to use when resolving [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/registry/dynamic/dynamic.go#L57)
{{< highlight toml >}}
[storage.registry.dynamic]
rewrites = nil
{{< /highlight >}}
{{% /dir %}}

{{% dir name="aliases" type="map[string]string" default=nil %}}
A map containing storageID aliases, can contain simple brackets [[Ref]](https://github.com/cs3org/reva/tree/master/pkg/storage/registry/dynamic/dynamic.go#L58)
{{< highlight toml >}}
[storage.registry.dynamic]
aliases = nil
{{< /highlight >}}
{{% /dir %}}

Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ type config struct {
MountPath string `docs:"/;The path where the file system would be mounted." mapstructure:"mount_path"`
MountID string `docs:"-;The ID of the mounted file system." mapstructure:"mount_id"`
Driver string `docs:"localhome;The storage driver to be used." mapstructure:"driver"`
Drivers map[string]map[string]interface{} `docs:"url:pkg/storage/fs/localhome/localhome.go" mapstructure:"drivers"`
Drivers map[string]map[string]interface{} `docs:"url:pkg/storage/fs/local/local.go" mapstructure:"drivers"`
TmpFolder string `docs:"/var/tmp;Path to temporary folder." mapstructure:"tmp_folder"`
DataServerURL string `docs:"http://localhost/data;The URL for the data server." mapstructure:"data_server_url"`
ExposeDataServer bool `docs:"false;Whether to expose data server." mapstructure:"expose_data_server"` // if true the client will be able to upload/download directly to it
Expand Down
6 changes: 3 additions & 3 deletions internal/http/services/dataprovider/dataprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ func init() {

type config struct {
Prefix string `docs:"data;The prefix to be used for this HTTP service" mapstructure:"prefix"`
Driver string `docs:"localhome;The storage driver to be used." mapstructure:"driver"`
Drivers map[string]map[string]interface{} `docs:"url:pkg/storage/fs/localhome/localhome.go;The configuration for the storage driver" mapstructure:"drivers"`
Driver string `docs:"local;The storage driver to be used." mapstructure:"driver"`
Drivers map[string]map[string]interface{} `docs:"url:pkg/storage/fs/local/local.go;The configuration for the storage driver" mapstructure:"drivers"`
DataTXs map[string]map[string]interface{} `docs:"url:pkg/rhttp/datatx/manager/simple/simple.go;The configuration for the data tx protocols" mapstructure:"data_txs"`
Timeout int64 `mapstructure:"timeout"`
Insecure bool `docs:"false;Whether to skip certificate checks when sending requests." mapstructure:"insecure"`
Expand All @@ -50,7 +50,7 @@ func (c *config) ApplyDefaults() {
c.Prefix = "data"
}
if c.Driver == "" {
c.Driver = "localhome"
c.Driver = "local"
}
}

Expand Down
1 change: 0 additions & 1 deletion pkg/storage/fs/loader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
_ "github.com/cs3org/reva/pkg/storage/fs/eosgrpchome"
_ "github.com/cs3org/reva/pkg/storage/fs/eoshome"
_ "github.com/cs3org/reva/pkg/storage/fs/local"
_ "github.com/cs3org/reva/pkg/storage/fs/localhome"
_ "github.com/cs3org/reva/pkg/storage/fs/nextcloud"
// Add your own here.
)
12 changes: 3 additions & 9 deletions pkg/storage/fs/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,25 @@ func init() {
}

type config struct {
Root string `docs:"/var/tmp/reva/;Path of root directory for user storage." mapstructure:"root"`
ShareFolder string `docs:"/MyShares;Path for storing share references." mapstructure:"share_folder"`
Root string `docs:"/var/tmp/reva/;Path of root directory for user storage." mapstructure:"root"`
}

func (c *config) ApplyDefaults() {
if c.Root == "" {
c.Root = "/var/tmp/reva"
}
if c.ShareFolder == "" {
c.ShareFolder = "/MyShares"
}
}

// New returns an implementation to of the storage.FS interface that talks to
// a local filesystem with user homes disabled.
// a local filesystem.
func New(ctx context.Context, m map[string]interface{}) (storage.FS, error) {
var c config
if err := cfg.Decode(m, &c); err != nil {
return nil, err
}

conf := localfs.Config{
Root: c.Root,
ShareFolder: c.ShareFolder,
DisableHome: true,
Root: c.Root,
}
return localfs.NewLocalFS(&conf)
}
76 changes: 0 additions & 76 deletions pkg/storage/fs/localhome/localhome.go

This file was deleted.

Loading