Skip to content

Commit

Permalink
Merge pull request #2529 from owncloud/archiver_app_provider_capabili…
Browse files Browse the repository at this point in the history
…ties

Archiver  and app provider capabilities
  • Loading branch information
wkloucek authored Sep 23, 2021
2 parents 00f41cb + 1a7c829 commit b98b39f
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 174 deletions.
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

0 comments on commit b98b39f

Please sign in to comment.