Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Archiver and app provider capabilities #2529

Merged
merged 5 commits into from
Sep 23, 2021
Merged
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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ require (
github.com/blevesearch/bleve/v2 v2.1.0
github.com/coreos/go-oidc/v3 v3.0.0
github.com/cs3org/go-cs3apis v0.0.0-20210916072651-dd30db9dbe58
github.com/cs3org/reva v1.13.1-0.20210921133241-ce466cb89fdc
github.com/cs3org/reva v1.13.1-0.20210923072026-e96fa872a8f5
github.com/disintegration/imaging v1.6.2
github.com/glauth/glauth v1.1.3-0.20210729125545-b9aecdfcac31
github.com/go-chi/chi/v5 v5.0.4
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ github.com/crewjam/saml v0.4.5/go.mod h1:qCJQpUtZte9R1ZjUBcW8qtCNlinbO363ooNl02S
github.com/cs3org/cato v0.0.0-20200828125504-e418fc54dd5e/go.mod h1:XJEZ3/EQuI3BXTp/6DUzFr850vlxq11I6satRtz0YQ4=
github.com/cs3org/go-cs3apis v0.0.0-20210916072651-dd30db9dbe58 h1:BxySl8qrPon7Yd98Ly8y45esk1zKaddnatKSgeoblXY=
github.com/cs3org/go-cs3apis v0.0.0-20210916072651-dd30db9dbe58/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
github.com/cs3org/reva v1.13.1-0.20210921133241-ce466cb89fdc h1:AS7xNqqxpsrg+xbTQU1GxBl0Tquiq7zH96iISsiXVVU=
github.com/cs3org/reva v1.13.1-0.20210921133241-ce466cb89fdc/go.mod h1:FQw3Asg4VbzthnQPRELjJPxGCSwvMq9FOWjJ1/r1ImU=
github.com/cs3org/reva v1.13.1-0.20210923072026-e96fa872a8f5 h1:qpmh61BjoH5GRg+XtLSW3J58QDa2sk58Ul9NXCAnqKE=
github.com/cs3org/reva v1.13.1-0.20210923072026-e96fa872a8f5/go.mod h1:FQw3Asg4VbzthnQPRELjJPxGCSwvMq9FOWjJ1/r1ImU=
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI=
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY=
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
Expand Down
171 changes: 0 additions & 171 deletions ocs/pkg/service/v0/data/capabilities.go

This file was deleted.

20 changes: 20 additions & 0 deletions storage/pkg/command/frontend.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,32 @@ func Frontend(cfg *config.Config) *cli.Command {
desktopRedirectURIs[port] = fmt.Sprintf("http://localhost:%d", (port + 1024))
}

archivers := []map[string]interface{}{
{
"enabled": true,
"version": "2.0.0",
"formats": []string{"tar", "zip"},
"archiver_url": cfg.Reva.Archiver.ArchiverURL,
},
}

appProviders := []map[string]interface{}{
{
"enabled": true,
"version": "1.0.0",
"apps_url": cfg.Reva.AppProvider.AppsURL,
"open_url": cfg.Reva.AppProvider.OpenURL,
},
}

filesCfg := map[string]interface{}{
"private_links": false,
"bigfilechunking": false,
"blacklisted_files": []string{},
"undelete": true,
"versioning": true,
"archivers": archivers,
"app_providers": appProviders,
}

if cfg.Reva.DefaultUploadProtocol == "tus" {
Expand Down
3 changes: 3 additions & 0 deletions storage/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ type AppProvider struct {
ExternalAddr string
Driver string
WopiDriver WopiDriver
AppsURL string
OpenURL string
}

type WopiDriver struct {
Expand Down Expand Up @@ -415,6 +417,7 @@ type OCDav struct {
type Archiver struct {
MaxNumFiles int64
MaxSize int64
ArchiverURL string
}

// Reva defines the available reva configuration.
Expand Down
25 changes: 25 additions & 0 deletions storage/pkg/flagset/frontend.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,31 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
Destination: &cfg.Reva.ChecksumPreferredUploadType,
},

// Archiver
&cli.StringFlag{
Name: "archiver-url",
Value: flags.OverrideDefaultString(cfg.Reva.Archiver.ArchiverURL, "/archiver"),
Usage: "URL where the archiver is reachable",
EnvVars: []string{"STORAGE_FRONTEND_ARCHIVER_URL"},
Destination: &cfg.Reva.Archiver.ArchiverURL,
},

// App Provider
&cli.StringFlag{
Name: "appprovider-apps-url",
Value: flags.OverrideDefaultString(cfg.Reva.AppProvider.AppsURL, "/app/list"),
Usage: "URL where the app listing of the app provider is reachable",
EnvVars: []string{"STORAGE_FRONTEND_APP_PROVIDER_APPS_URL"},
Destination: &cfg.Reva.AppProvider.AppsURL,
},
&cli.StringFlag{
Name: "appprovider-open-url",
Value: flags.OverrideDefaultString(cfg.Reva.AppProvider.OpenURL, "/app/open"),
Usage: "URL where files can be handed over to an application from the app provider",
EnvVars: []string{"STORAGE_FRONTEND_APP_PROVIDER_OPEN_URL"},
Destination: &cfg.Reva.AppProvider.OpenURL,
},

// Reva Middlewares Config
&cli.StringSliceFlag{
Name: "user-agent-whitelist-lock-in",
Expand Down