Merge branch 'master' into MergeMasterIntoExperimental
This commit is contained in:
commit
78143f1074
175 files changed
+1560
-1501
No files matched your search
+2
-2
@@ -1,7 +1,7 @@
|
||||
# The test runner source for API tests
|
||||
CORE_COMMITID=76048f490ac50af03594d181c5baf49f87c18b6e
|
||||
CORE_COMMITID=db3913cd9ba67b2d603f8917017734903dfd432a
|
||||
CORE_BRANCH=master
|
||||
|
||||
# The test runner source for UI tests
|
||||
WEB_COMMITID=52c0a3e8d0c0a2a8a342ed2656254afe03725260
|
||||
WEB_COMMITID=4828c892d292dbccd382104c11486bc5d21340b0
|
||||
WEB_BRANCH=master
|
||||
+3
-3
@@ -33,7 +33,7 @@ PLUGINS_S3 = "plugins/s3:latest"
|
||||
PLUGINS_S3_CACHE = "plugins/s3-cache:1"
|
||||
PLUGINS_SLACK = "plugins/slack:1"
|
||||
REDIS = "redis:6-alpine"
|
||||
SELENIUM_STANDALONE_CHROME_DEBUG = "selenium/standalone-chrome-debug:3.141.59"
|
||||
SELENIUM_STANDALONE_CHROME = "selenium/standalone-chrome:104.0-20220812"
|
||||
SONARSOURCE_SONAR_SCANNER_CLI = "sonarsource/sonar-scanner-cli:latest"
|
||||
THEGEEKLAB_DRONE_GITHUB_COMMENT = "thegeeklab/drone-github-comment:1"
|
||||
|
||||
@@ -333,7 +333,7 @@ def testPipelines(ctx):
|
||||
pipelines += litmus(ctx, "ocis")
|
||||
|
||||
if "skip" not in config["cs3ApiTests"] or not config["cs3ApiTests"]["skip"]:
|
||||
pipelines += [cs3ApiTests(ctx, "ocis", "default")]
|
||||
pipelines.append(cs3ApiTests(ctx, "ocis", "default"))
|
||||
if "skip" not in config["localApiTests"] or not config["localApiTests"]["skip"]:
|
||||
pipelines += [
|
||||
localApiTests(ctx, "ocis", "apiAccountsHashDifficulty"),
|
||||
@@ -1955,7 +1955,7 @@ def selenium():
|
||||
return [
|
||||
{
|
||||
"name": "selenium",
|
||||
"image": SELENIUM_STANDALONE_CHROME_DEBUG,
|
||||
"image": SELENIUM_STANDALONE_CHROME,
|
||||
"volumes": [{
|
||||
"name": "uploads",
|
||||
"path": "/uploads",
|
||||
|
||||
+94
-5
@@ -6,15 +6,37 @@ The following sections list the changes for unreleased.
|
||||
|
||||
## Summary
|
||||
|
||||
* Bugfix - Fix configuration of mimetypes for the app registry: [#4411](https://github.com/owncloud/ocis/pull/4411)
|
||||
* Bugfix - Show help for some commands when unconfigured: [#4405](https://github.com/owncloud/ocis/pull/4405)
|
||||
* Bugfix - Autocreate IDP private key also if file exists but is empty: [#4394](https://github.com/owncloud/ocis/pull/4394)
|
||||
* Bugfix - Rename extensions to services (leftover occurences): [#4407](https://github.com/owncloud/ocis/pull/4407)
|
||||
* Change - Rename "uploads purge" command to "uploads clean": [#4403](https://github.com/owncloud/ocis/pull/4403)
|
||||
* Enhancement - Add /app/open-with-web endpoint: [#4376](https://github.com/owncloud/ocis/pull/4376)
|
||||
* Enhancement - Added language option to the app provider: [#4399](https://github.com/owncloud/ocis/pull/4399)
|
||||
* Enhancement - Add configuration options for mail authentication and encryption: [#4443](https://github.com/owncloud/ocis/pull/4443)
|
||||
* Enhancement - Added command to reset administrator password: [#4084](https://github.com/owncloud/ocis/issues/4084)
|
||||
* Enhancement - Update reva to vx.x.x: [#4376](https://github.com/owncloud/ocis/pull/4376)
|
||||
* Enhancement - Rewrite of the request authentication middleware: [#4374](https://github.com/owncloud/ocis/pull/4374)
|
||||
* Enhancement - Update reva to v2.8.0: [#4444](https://github.com/owncloud/ocis/pull/4444)
|
||||
* Enhancement - Update ownCloud Web to v5.7.0-rc.10: [#4439](https://github.com/owncloud/ocis/pull/4439)
|
||||
|
||||
## Details
|
||||
|
||||
* Bugfix - Fix configuration of mimetypes for the app registry: [#4411](https://github.com/owncloud/ocis/pull/4411)
|
||||
|
||||
We've fixed the configuration option for mimetypes in the app registry. Previously the
|
||||
default config would always be merged over the user provided configuration. Now the default
|
||||
mimetype configuration is only used if the user does not providy any mimetype configuration
|
||||
(like it is already done in the proxy with the routes configuration).
|
||||
|
||||
https://github.com/owncloud/ocis/pull/4411
|
||||
|
||||
* Bugfix - Show help for some commands when unconfigured: [#4405](https://github.com/owncloud/ocis/pull/4405)
|
||||
|
||||
We've fixed some commands to show the help also when oCIS is not yet configured. Previously the
|
||||
help was not displayed to the user but instead a configuration validation error.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/4405
|
||||
|
||||
* Bugfix - Autocreate IDP private key also if file exists but is empty: [#4394](https://github.com/owncloud/ocis/pull/4394)
|
||||
|
||||
We've fixed the behavior for the IDP private key generation so that a private key is also
|
||||
@@ -22,6 +44,13 @@ The following sections list the changes for unreleased.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/4394
|
||||
|
||||
* Bugfix - Rename extensions to services (leftover occurences): [#4407](https://github.com/owncloud/ocis/pull/4407)
|
||||
|
||||
We've already renamed extensions to services in previous PRs and this PR peforms this rename
|
||||
for leftover occurences.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/4407
|
||||
|
||||
* Change - Rename "uploads purge" command to "uploads clean": [#4403](https://github.com/owncloud/ocis/pull/4403)
|
||||
|
||||
We've renamed the storage-users service's "uploads purge" command to "upload clean".
|
||||
@@ -45,6 +74,18 @@ The following sections list the changes for unreleased.
|
||||
https://github.com/owncloud/ocis/pull/4399
|
||||
https://github.com/cs3org/reva/pull/3156
|
||||
|
||||
* Enhancement - Add configuration options for mail authentication and encryption: [#4443](https://github.com/owncloud/ocis/pull/4443)
|
||||
|
||||
We've added configuration options to configure the authentication and encryption for
|
||||
sending mails in the notifications service.
|
||||
|
||||
Furthermore there is now a distinguished configuration option for the username to use for
|
||||
authentication against the mail server. This allows you to customize the sender address to
|
||||
your liking. For example sender addresses like `my oCIS instance <ocis@owncloud.test>` are
|
||||
now possible, too.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/4443
|
||||
|
||||
* Enhancement - Added command to reset administrator password: [#4084](https://github.com/owncloud/ocis/issues/4084)
|
||||
|
||||
The new command `ocis idm resetpassword` allows to reset the administrator password when ocis
|
||||
@@ -53,13 +94,61 @@ The following sections list the changes for unreleased.
|
||||
https://github.com/owncloud/ocis/issues/4084
|
||||
https://github.com/owncloud/ocis/pull/4365
|
||||
|
||||
* Enhancement - Update reva to vx.x.x: [#4376](https://github.com/owncloud/ocis/pull/4376)
|
||||
* Enhancement - Rewrite of the request authentication middleware: [#4374](https://github.com/owncloud/ocis/pull/4374)
|
||||
|
||||
Updated reva to version x.x.x. This update includes:
|
||||
There were some flaws in the authentication middleware which were resolved by this rewrite.
|
||||
This rewrite also introduced the need to manually mark certain paths as "unprotected" if
|
||||
requests to these paths must not be authenticated.
|
||||
|
||||
* TODO:
|
||||
https://github.com/owncloud/ocis/pull/4374
|
||||
|
||||
https://github.com/owncloud/ocis/pull/4376
|
||||
* Enhancement - Update reva to v2.8.0: [#4444](https://github.com/owncloud/ocis/pull/4444)
|
||||
|
||||
Updated reva to version 2.8.0. This update includes:
|
||||
|
||||
* Bugfix [cs3org/reva#3158](https://github.com/cs3org/reva/pull/3158): Add name to the propfind response
|
||||
* Bugfix [cs3org/reva#3157](https://github.com/cs3org/reva/pull/3157): Fix locking response codes
|
||||
* Bugfix [cs3org/reva#3152](https://github.com/cs3org/reva/pull/3152): Disable caching of not found stat responses
|
||||
* Bugfix [cs3org/reva#4251](https://github.com/cs3org/reva/pull/4251): Disable caching
|
||||
* Enhancement [cs3org/reva#3154](https://github.com/cs3org/reva/pull/3154): Dataproviders now return file metadata
|
||||
* Enhancement [cs3org/reva#3143](https://github.com/cs3org/reva/pull/3143): Add /app/open-with-web endpoint
|
||||
* Enhancement [cs3org/reva#3156](https://github.com/cs3org/reva/pull/3156): Added language option to the app provider
|
||||
* Enhancement [cs3org/reva#3148](https://github.com/cs3org/reva/pull/3148): Add new jsoncs3 share manager
|
||||
|
||||
https://github.com/owncloud/ocis/pull/4444
|
||||
|
||||
* Enhancement - Update ownCloud Web to v5.7.0-rc.10: [#4439](https://github.com/owncloud/ocis/pull/4439)
|
||||
|
||||
Tags: web
|
||||
|
||||
We updated ownCloud Web to v5.7.0-rc.10. Please refer to the changelog (linked) for details on
|
||||
the web release.
|
||||
|
||||
* Bugfix [owncloud/web#7443](https://github.com/owncloud/web/pull/7443): Datetime formatting
|
||||
* Bugfix [owncloud/web#7437](https://github.com/owncloud/web/pull/7437): Default to user context
|
||||
* Bugfix [owncloud/web#7473](https://github.com/owncloud/web/pull/7473): Dragging a file causes no selection
|
||||
* Bugfix [owncloud/web#7469](https://github.com/owncloud/web/pull/7469): File size not updated while restoring file version
|
||||
* Bugfix [owncloud/web#7443](https://github.com/owncloud/web/pull/7443): File size formatting
|
||||
* Bugfix [owncloud/web#7474](https://github.com/owncloud/web/pull/7474): Load only supported thumbnails (configurable)
|
||||
* Bugfix [owncloud/web#7309](https://github.com/owncloud/web/pull/7309): SidebarNavItem icon flickering
|
||||
* Bugfix [owncloud/web#7425](https://github.com/owncloud/web/pull/7425): Open Folder in project space context menu
|
||||
* Bugfix [owncloud/web#7486](https://github.com/owncloud/web/issues/7486): Prevent unnecessary PROPFIND request during upload
|
||||
* Bugfix [owncloud/web#7415](https://github.com/owncloud/web/pull/7415): Re-fetch quota
|
||||
* Bugfix [owncloud/web#7478](https://github.com/owncloud/web/issues/7478): "Shared via"-indicator for links
|
||||
* Bugfix [owncloud/web#7480](https://github.com/owncloud/web/issues/7480): Missing space image in sidebar
|
||||
* Bugfix [owncloud/web#7436](https://github.com/owncloud/web/issues/7436): Hide share actions for space viewers/editors
|
||||
* Bugfix [owncloud/web#7445](https://github.com/owncloud/web/pull/7445): User management app close side bar throws error
|
||||
* Enhancement [owncloud/web#7309](https://github.com/owncloud/web/pull/7309): Keyboard shortcut indicators in ContextMenu
|
||||
* Enhancement [owncloud/web#7309](https://github.com/owncloud/web/pull/7309): Lowlight cut resources
|
||||
* Enhancement [owncloud/web#7133](https://github.com/owncloud/web/pull/7133): Permissionless (internal) link shares
|
||||
* Enhancement [owncloud/web#7309](https://github.com/owncloud/web/pull/7309): Replace locationpicker with clipboard actions
|
||||
* Enhancement [owncloud/web#7363](https://github.com/owncloud/web/pull/7363): Streamline UI sizings
|
||||
* Enhancement [owncloud/web#7355](https://github.com/owncloud/web/pull/7355): Update ODS to v14.0.0-alpha.16
|
||||
* Enhancement [owncloud/web#7476](https://github.com/owncloud/web/pull/7476): Users table on small screen
|
||||
* Enhancement [owncloud/web#7182](https://github.com/owncloud/web/pull/7182): User management app edit quota
|
||||
|
||||
https://github.com/owncloud/ocis/pull/4439
|
||||
https://github.com/owncloud/web/releases/tag/v5.7.0-rc.10
|
||||
# Changelog for [2.0.0-beta.6] (2022-08-11)
|
||||
|
||||
The following sections list the changes for 2.0.0-beta.6.
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
Bugfix: Fix configuration of mimetypes for the app registry
|
||||
|
||||
We've fixed the configuration option for mimetypes in the app registry.
|
||||
Previously the default config would always be merged over the user provided
|
||||
configuration. Now the default mimetype configuration is only used if the user does not
|
||||
providy any mimetype configuration (like it is already done in the proxy with the routes configuration).
|
||||
|
||||
https://github.com/owncloud/ocis/pull/4411
|
||||
@@ -0,0 +1,6 @@
|
||||
Bugfix: Show help for some commands when unconfigured
|
||||
|
||||
We've fixed some commands to show the help also when oCIS is not yet configured.
|
||||
Previously the help was not displayed to the user but instead a configuration validation error.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/4405
|
||||
File renamed without changes.
@@ -0,0 +1,6 @@
|
||||
Bugfix: Rename extensions to services (leftover occurences)
|
||||
|
||||
We've already renamed extensions to services in previous PRs and this
|
||||
PR peforms this rename for leftover occurences.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/4407
|
||||
@@ -0,0 +1,10 @@
|
||||
Enhancement: Add configuration options for mail authentication and encryption
|
||||
|
||||
We've added configuration options to configure the authentication and encryption
|
||||
for sending mails in the notifications service.
|
||||
|
||||
Furthermore there is now a distinguished configuration option for the username to use
|
||||
for authentication against the mail server. This allows you to customize the sender address
|
||||
to your liking. For example sender addresses like `my oCIS instance <ocis@owncloud.test>` are now possible, too.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/4443
|
||||
@@ -0,0 +1,7 @@
|
||||
Enhancement: Rewrite of the request authentication middleware
|
||||
|
||||
There were some flaws in the authentication middleware which were resolved by this rewrite.
|
||||
This rewrite also introduced the need to manually mark certain paths as "unprotected" if
|
||||
requests to these paths must not be authenticated.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/4374
|
||||
@@ -1,7 +1,14 @@
|
||||
Enhancement: update reva to vx.x.x
|
||||
Enhancement: update reva to v2.8.0
|
||||
|
||||
Updated reva to version x.x.x. This update includes:
|
||||
Updated reva to version 2.8.0. This update includes:
|
||||
|
||||
* TODO:
|
||||
* Bugfix [cs3org/reva#3158](https://github.com/cs3org/reva/pull/3158): Add name to the propfind response
|
||||
* Bugfix [cs3org/reva#3157](https://github.com/cs3org/reva/pull/3157): Fix locking response codes
|
||||
* Bugfix [cs3org/reva#3152](https://github.com/cs3org/reva/pull/3152): Disable caching of not found stat responses
|
||||
* Bugfix [cs3org/reva#4251](https://github.com/cs3org/reva/pull/4251): Disable caching
|
||||
* Enhancement [cs3org/reva#3154](https://github.com/cs3org/reva/pull/3154): Dataproviders now return file metadata
|
||||
* Enhancement [cs3org/reva#3143](https://github.com/cs3org/reva/pull/3143): Add /app/open-with-web endpoint
|
||||
* Enhancement [cs3org/reva#3156](https://github.com/cs3org/reva/pull/3156): Added language option to the app provider
|
||||
* Enhancement [cs3org/reva#3148](https://github.com/cs3org/reva/pull/3148): Add new jsoncs3 share manager
|
||||
|
||||
https://github.com/owncloud/ocis/pull/4376
|
||||
https://github.com/owncloud/ocis/pull/4444
|
||||
@@ -0,0 +1,31 @@
|
||||
Enhancement: Update ownCloud Web to v5.7.0-rc.10
|
||||
|
||||
Tags: web
|
||||
|
||||
We updated ownCloud Web to v5.7.0-rc.10. Please refer to the changelog (linked) for details on the web release.
|
||||
|
||||
* Bugfix [owncloud/web#7443](https://github.com/owncloud/web/pull/7443): Datetime formatting
|
||||
* Bugfix [owncloud/web#7437](https://github.com/owncloud/web/pull/7437): Default to user context
|
||||
* Bugfix [owncloud/web#7473](https://github.com/owncloud/web/pull/7473): Dragging a file causes no selection
|
||||
* Bugfix [owncloud/web#7469](https://github.com/owncloud/web/pull/7469): File size not updated while restoring file version
|
||||
* Bugfix [owncloud/web#7443](https://github.com/owncloud/web/pull/7443): File size formatting
|
||||
* Bugfix [owncloud/web#7474](https://github.com/owncloud/web/pull/7474): Load only supported thumbnails (configurable)
|
||||
* Bugfix [owncloud/web#7309](https://github.com/owncloud/web/pull/7309): SidebarNavItem icon flickering
|
||||
* Bugfix [owncloud/web#7425](https://github.com/owncloud/web/pull/7425): Open Folder in project space context menu
|
||||
* Bugfix [owncloud/web#7486](https://github.com/owncloud/web/issues/7486): Prevent unnecessary PROPFIND request during upload
|
||||
* Bugfix [owncloud/web#7415](https://github.com/owncloud/web/pull/7415): Re-fetch quota
|
||||
* Bugfix [owncloud/web#7478](https://github.com/owncloud/web/issues/7478): "Shared via"-indicator for links
|
||||
* Bugfix [owncloud/web#7480](https://github.com/owncloud/web/issues/7480): Missing space image in sidebar
|
||||
* Bugfix [owncloud/web#7436](https://github.com/owncloud/web/issues/7436): Hide share actions for space viewers/editors
|
||||
* Bugfix [owncloud/web#7445](https://github.com/owncloud/web/pull/7445): User management app close side bar throws error
|
||||
* Enhancement [owncloud/web#7309](https://github.com/owncloud/web/pull/7309): Keyboard shortcut indicators in ContextMenu
|
||||
* Enhancement [owncloud/web#7309](https://github.com/owncloud/web/pull/7309): Lowlight cut resources
|
||||
* Enhancement [owncloud/web#7133](https://github.com/owncloud/web/pull/7133): Permissionless (internal) link shares
|
||||
* Enhancement [owncloud/web#7309](https://github.com/owncloud/web/pull/7309): Replace locationpicker with clipboard actions
|
||||
* Enhancement [owncloud/web#7363](https://github.com/owncloud/web/pull/7363): Streamline UI sizings
|
||||
* Enhancement [owncloud/web#7355](https://github.com/owncloud/web/pull/7355): Update ODS to v14.0.0-alpha.16
|
||||
* Enhancement [owncloud/web#7476](https://github.com/owncloud/web/pull/7476): Users table on small screen
|
||||
* Enhancement [owncloud/web#7182](https://github.com/owncloud/web/pull/7182): User management app edit quota
|
||||
|
||||
https://github.com/owncloud/ocis/pull/4439
|
||||
https://github.com/owncloud/web/releases/tag/v5.7.0-rc.10
|
||||
@@ -68,7 +68,8 @@ services:
|
||||
# email server (in this case inbucket acts as mail catcher)
|
||||
NOTIFICATIONS_SMTP_HOST: inbucket
|
||||
NOTIFICATIONS_SMTP_PORT: 2500
|
||||
NOTIFICATIONS_SMTP_SENDER: notifications@${OCIS_DOMAIN:-ocis.owncloud.test}
|
||||
NOTIFICATIONS_SMTP_SENDER: oCIS notifications <notifications@${OCIS_DOMAIN:-ocis.owncloud.test}>
|
||||
NOTIFICATIONS_SMTP_USERNAME: notifications@${OCIS_DOMAIN:-ocis.owncloud.test}
|
||||
NOTIFICATIONS_SMTP_INSECURE: true # the mail catcher uses self signed certificates
|
||||
volumes:
|
||||
- ocis-config:/etc/ocis
|
||||
|
||||
@@ -200,9 +200,9 @@ HTTP status code: 200
|
||||
**Request examples**:
|
||||
|
||||
```bash
|
||||
curl -X POST 'https://ocis.test/app/open?file_id=ZmlsZTppZAo='
|
||||
curl -X POST 'https://ocis.test/app/open-with-web?file_id=ZmlsZTppZAo='
|
||||
|
||||
curl -X POST 'https://ocis.test/app/open?file_id=ZmlsZTppZAo=&app_name=Collabora'
|
||||
curl -X POST 'https://ocis.test/app/open-with-web?file_id=ZmlsZTppZAo=&app_name=Collabora'
|
||||
```
|
||||
|
||||
**Response examples**:
|
||||
|
||||
@@ -5,13 +5,13 @@ go 1.18
|
||||
require (
|
||||
github.com/CiscoM31/godata v1.0.5
|
||||
github.com/Masterminds/semver v1.5.0
|
||||
github.com/MicahParks/keyfunc v1.2.0
|
||||
github.com/MicahParks/keyfunc v1.2.2
|
||||
github.com/ReneKroon/ttlcache/v2 v2.11.0
|
||||
github.com/bbalet/stopwords v1.0.0
|
||||
github.com/blevesearch/bleve/v2 v2.3.3
|
||||
github.com/coreos/go-oidc/v3 v3.2.0
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20220719130120-361e9f987d64
|
||||
github.com/cs3org/reva/v2 v2.7.5-0.20220818115656-164699f71ceb
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20220818202316-e92afdddac6d
|
||||
github.com/cs3org/reva/v2 v2.8.1-0.20220824102334-b4d7245016f3
|
||||
github.com/disintegration/imaging v1.6.2
|
||||
github.com/ggwhite/go-masker v1.0.9
|
||||
github.com/go-chi/chi/v5 v5.0.7
|
||||
@@ -62,9 +62,9 @@ require (
|
||||
github.com/test-go/testify v1.1.4
|
||||
github.com/thejerf/suture/v4 v4.0.2
|
||||
github.com/tus/tusd v1.9.0
|
||||
github.com/urfave/cli/v2 v2.11.1
|
||||
github.com/urfave/cli/v2 v2.11.2
|
||||
github.com/xhit/go-simple-mail/v2 v2.11.0
|
||||
go-micro.dev/v4 v4.8.0
|
||||
go-micro.dev/v4 v4.8.1
|
||||
go.etcd.io/bbolt v1.3.6
|
||||
go.opencensus.io v0.23.0
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.34.0
|
||||
@@ -78,6 +78,7 @@ require (
|
||||
golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e
|
||||
golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c
|
||||
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035
|
||||
golang.org/x/text v0.3.7
|
||||
google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58
|
||||
google.golang.org/grpc v1.48.0
|
||||
google.golang.org/protobuf v1.28.1
|
||||
@@ -270,7 +271,6 @@ require (
|
||||
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 // indirect
|
||||
golang.org/x/tools v0.1.10 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
|
||||
|
||||
@@ -99,8 +99,8 @@ github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3Q
|
||||
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
|
||||
github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60=
|
||||
github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o=
|
||||
github.com/MicahParks/keyfunc v1.2.0 h1:qiUfvtvvcoS0JXcHtoqglT29WyvuL0l3tkBlzp0QmsU=
|
||||
github.com/MicahParks/keyfunc v1.2.0/go.mod h1:a4yfunv77gZ0RgTNw7tOYS+bjtHk5565e+1dPz+YJI8=
|
||||
github.com/MicahParks/keyfunc v1.2.2 h1:MtA/6bnmhcyDMarVF9QRQmfKg1ssKxH1C+k3Gw8DY1g=
|
||||
github.com/MicahParks/keyfunc v1.2.2/go.mod h1:GWZYIBflWXRPShQPMFRrUg+8buvyD0IWeg3Fi2rcrME=
|
||||
github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
|
||||
github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
|
||||
github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84=
|
||||
@@ -291,10 +291,10 @@ github.com/crewjam/httperr v0.2.0 h1:b2BfXR8U3AlIHwNeFFvZ+BV1LFvKLlzMjzaTnZMybNo
|
||||
github.com/crewjam/httperr v0.2.0/go.mod h1:Jlz+Sg/XqBQhyMjdDiC+GNNRzZTD7x39Gu3pglZ5oH4=
|
||||
github.com/crewjam/saml v0.4.6 h1:XCUFPkQSJLvzyl4cW9OvpWUbRf0gE7VUpU8ZnilbeM4=
|
||||
github.com/crewjam/saml v0.4.6/go.mod h1:ZBOXnNPFzB3CgOkRm7Nd6IVdkG+l/wF+0ZXLqD96t1A=
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20220719130120-361e9f987d64 h1:cFnankJOCWndnOns4sKRG7yzH61ammK2Am6rEGWCK40=
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20220719130120-361e9f987d64/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
|
||||
github.com/cs3org/reva/v2 v2.7.5-0.20220818115656-164699f71ceb h1:yRbu+LAJbxHnzhzH13Sv5oMlsGixMGLxnXr3LjXd9uU=
|
||||
github.com/cs3org/reva/v2 v2.7.5-0.20220818115656-164699f71ceb/go.mod h1:79CY/x0samKw7azYn2gzTFv0jvr2WO4JTKZwCb/+SEU=
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20220818202316-e92afdddac6d h1:toyZ7IsXlUdEPZ/IG8fg7hbM8HcLPY0bkX4FKBmgLVI=
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20220818202316-e92afdddac6d/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
|
||||
github.com/cs3org/reva/v2 v2.8.1-0.20220824102334-b4d7245016f3 h1:Du36Xavn8tPFNqK6+3yF6u9QJXG4mtTUPWwJBPH4R7E=
|
||||
github.com/cs3org/reva/v2 v2.8.1-0.20220824102334-b4d7245016f3/go.mod h1:3KTFWS3y4SjaQ5RpRQcVxKmY98Sb/E//Qgw+AFx5GfM=
|
||||
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=
|
||||
@@ -1187,8 +1187,8 @@ github.com/uber-go/atomic v1.3.2/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex
|
||||
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
|
||||
github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
||||
github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
|
||||
github.com/urfave/cli/v2 v2.11.1 h1:UKK6SP7fV3eKOefbS87iT9YHefv7iB/53ih6e+GNAsE=
|
||||
github.com/urfave/cli/v2 v2.11.1/go.mod h1:f8iq5LtQ/bLxafbdBSLPPNsgaW0l/2fYYEHhAyPlwvo=
|
||||
github.com/urfave/cli/v2 v2.11.2 h1:FVfNg4m3vbjbBpLYxW//WjxUoHvJ9TlppXcqY9Q9ZfA=
|
||||
github.com/urfave/cli/v2 v2.11.2/go.mod h1:f8iq5LtQ/bLxafbdBSLPPNsgaW0l/2fYYEHhAyPlwvo=
|
||||
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
||||
github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
|
||||
github.com/valyala/fasttemplate v1.1.0/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
|
||||
@@ -1230,8 +1230,8 @@ github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q
|
||||
github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk=
|
||||
github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8=
|
||||
github.com/zenazn/goji v1.0.1/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
|
||||
go-micro.dev/v4 v4.8.0 h1:4rrKpGHUTnrD2k2eVUVayJgWDoFlDcB/Ijkga8dZMNc=
|
||||
go-micro.dev/v4 v4.8.0/go.mod h1:Ju8HrZ5hQSF+QguZ2QUs9Kbe42MHP1tJa/fpP5g07Cs=
|
||||
go-micro.dev/v4 v4.8.1 h1:6/3YtUQ+ofkMJh98lC8TkpuMGoFS8kVcj0cnkQhzwDY=
|
||||
go-micro.dev/v4 v4.8.1/go.mod h1:Ju8HrZ5hQSF+QguZ2QUs9Kbe42MHP1tJa/fpP5g07Cs=
|
||||
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
|
||||
go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU=
|
||||
|
||||
@@ -49,10 +49,10 @@ type Mode int
|
||||
|
||||
// Runtime configures the oCIS runtime when running in supervised mode.
|
||||
type Runtime struct {
|
||||
Port string `yaml:"port" env:"OCIS_RUNTIME_PORT"`
|
||||
Host string `yaml:"host" env:"OCIS_RUNTIME_HOST"`
|
||||
Extensions string `yaml:"services" env:"OCIS_RUN_EXTENSIONS;OCIS_RUN_SERVICES" desc:"Expects a comma separated list of service names. Will start only the listed services."`
|
||||
Disabled string `yaml:"disabled_services" env:"OCIS_EXCLUDE_RUN_SERVICES" desc:"Expects a comma separated list of service names. Will start all services except of the ones listed. Has no effect when OCIS_RUN_SERVICES is set."`
|
||||
Port string `yaml:"port" env:"OCIS_RUNTIME_PORT"`
|
||||
Host string `yaml:"host" env:"OCIS_RUNTIME_HOST"`
|
||||
Services string `yaml:"services" env:"OCIS_RUN_EXTENSIONS;OCIS_RUN_SERVICES" desc:"Expects a comma separated list of service names. Will start only the listed services."`
|
||||
Disabled string `yaml:"disabled_services" env:"OCIS_EXCLUDE_RUN_SERVICES" desc:"Expects a comma separated list of service names. Will start all services except of the ones listed. Has no effect when OCIS_RUN_SERVICES is set."`
|
||||
}
|
||||
|
||||
// Config combines all available configuration parts.
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package configlog
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
// Error logs the error
|
||||
func Error(err error) {
|
||||
if err != nil {
|
||||
fmt.Printf("%v\n", err)
|
||||
}
|
||||
}
|
||||
|
||||
// ReturnError logs the error and returns it unchanged
|
||||
func ReturnError(err error) error {
|
||||
if err != nil {
|
||||
fmt.Printf("%v\n", err)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// ReturnFatal logs the error and calls os.Exit(1) and returns nil if no error is passed
|
||||
func ReturnFatal(err error) error {
|
||||
if err != nil {
|
||||
fmt.Printf("%v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -17,14 +17,14 @@ var (
|
||||
|
||||
// BindSourcesToStructs assigns any config value from a config file / env variable to struct `dst`. Its only purpose
|
||||
// is to solely modify `dst`, not dealing with the config structs; and do so in a thread safe manner.
|
||||
func BindSourcesToStructs(extension string, dst interface{}) (*gofig.Config, error) {
|
||||
cnf := gofig.NewWithOptions(extension)
|
||||
func BindSourcesToStructs(service string, dst interface{}) (*gofig.Config, error) {
|
||||
cnf := gofig.NewWithOptions(service)
|
||||
cnf.WithOptions(func(options *gofig.Options) {
|
||||
options.DecoderConfig.TagName = decoderConfigTagName
|
||||
})
|
||||
cnf.AddDriver(gooyaml.Driver)
|
||||
|
||||
cfgFile := path.Join(defaults.BaseConfigPath(), extension+".yaml")
|
||||
cfgFile := path.Join(defaults.BaseConfigPath(), service+".yaml")
|
||||
_ = cnf.LoadFiles([]string{cfgFile}...)
|
||||
|
||||
err := cnf.BindStruct("", &dst)
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
// ParseConfig loads the ocis configuration and
|
||||
// copies applicable parts into the commons part, from
|
||||
// where the extensions can copy it into their own config
|
||||
// where the services can copy it into their own config
|
||||
func ParseConfig(cfg *config.Config, skipValidate bool) error {
|
||||
_, err := config.BindSourcesToStructs("ocis", cfg)
|
||||
if err != nil {
|
||||
@@ -37,7 +37,7 @@ func ParseConfig(cfg *config.Config, skipValidate bool) error {
|
||||
}
|
||||
|
||||
// EnsureDefaults, ensures that all pointers in the
|
||||
// oCIS config (not the extensions configs) are initialized
|
||||
// oCIS config (not the services configs) are initialized
|
||||
func EnsureDefaults(cfg *config.Config) {
|
||||
if cfg.Tracing == nil {
|
||||
cfg.Tracing = &shared.Tracing{}
|
||||
|
||||
@@ -2,7 +2,7 @@ package flags
|
||||
|
||||
// OverrideDefaultString checks whether the default value of v is the zero value, if so, ensure the flag has a correct
|
||||
// value by providing one. A value different than zero would mean that it was read from a config file either from an
|
||||
// extension or from a higher source (i.e: ocis command).
|
||||
// service or from a higher source (i.e: ocis command).
|
||||
func OverrideDefaultString(v, def string) string {
|
||||
if v != "" {
|
||||
return v
|
||||
@@ -13,7 +13,7 @@ func OverrideDefaultString(v, def string) string {
|
||||
|
||||
// OverrideDefaultBool checks whether the default value of v is the zero value, if so, ensure the flag has a correct
|
||||
// value by providing one. A value different than zero would mean that it was read from a config file either from an
|
||||
// extension or from a higher source (i.e: ocis command).
|
||||
// service or from a higher source (i.e: ocis command).
|
||||
func OverrideDefaultBool(v, def bool) bool {
|
||||
if v {
|
||||
return v
|
||||
@@ -24,7 +24,7 @@ func OverrideDefaultBool(v, def bool) bool {
|
||||
|
||||
// OverrideDefaultInt checks whether the default value of v is the zero value, if so, ensure the flag has a correct
|
||||
// value by providing one. A value different than zero would mean that it was read from a config file either from an
|
||||
// extension or from a higher source (i.e: ocis command).
|
||||
// service or from a higher source (i.e: ocis command).
|
||||
func OverrideDefaultInt(v, def int) int {
|
||||
if v != 0 {
|
||||
return v
|
||||
@@ -35,7 +35,7 @@ func OverrideDefaultInt(v, def int) int {
|
||||
|
||||
// OverrideDefaultInt64 checks whether the default value of v is the zero value, if so, ensure the flag has a correct
|
||||
// value by providing one. A value different than zero would mean that it was read from a config file either from an
|
||||
// extension or from a higher source (i.e: ocis command).
|
||||
// service or from a higher source (i.e: ocis command).
|
||||
func OverrideDefaultInt64(v, def int64) int64 {
|
||||
if v != 0 {
|
||||
return v
|
||||
@@ -46,7 +46,7 @@ func OverrideDefaultInt64(v, def int64) int64 {
|
||||
|
||||
// OverrideDefaultUint64 checks whether the default value of v is the zero value, if so, ensure the flag has a correct
|
||||
// value by providing one. A value different than zero would mean that it was read from a config file either from an
|
||||
// extension or from a higher source (i.e: ocis command).
|
||||
// service or from a higher source (i.e: ocis command).
|
||||
func OverrideDefaultUint64(v, def uint64) uint64 {
|
||||
if v != 0 {
|
||||
return v
|
||||
|
||||
@@ -34,7 +34,7 @@ type Reva struct {
|
||||
Address string `yaml:"address" env:"REVA_GATEWAY" desc:"The CS3 gateway endpoint."`
|
||||
}
|
||||
|
||||
// Commons holds configuration that are common to all extensions. Each extension can then decide whether
|
||||
// Commons holds configuration that are common to all services. Each service can then decide whether
|
||||
// to overwrite its values.
|
||||
type Commons struct {
|
||||
Log *Log `yaml:"log"`
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func AppProviderCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.AppProvider.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.AppProvider.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func AppRegistryCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.AppRegistry.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.AppRegistry.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func AuditCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.Audit.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.Audit.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func AuthBasicCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.AuthBasic.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.AuthBasic.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func AuthBearerCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.AuthBearer.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.AuthBearer.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func AuthMachineCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.AuthMachine.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.AuthMachine.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func FrontendCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.Frontend.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.Frontend.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func GatewayCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.Gateway.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.Gateway.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func GraphExplorerCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.GraphExplorer.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.GraphExplorer.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func GraphCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.Graph.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.Graph.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func GroupsCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.Groups.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.Groups.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -5,5 +5,5 @@ import (
|
||||
)
|
||||
|
||||
func SubcommandDescription(serviceName string) string {
|
||||
return fmt.Sprintf("%s extension commands", serviceName)
|
||||
return fmt.Sprintf("%s service commands", serviceName)
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func IDMCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.IDM.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.IDM.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func IDPCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.IDP.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.IDP.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
+21
-16
@@ -2,7 +2,6 @@ package command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"sync"
|
||||
|
||||
@@ -13,6 +12,7 @@ import (
|
||||
"github.com/cs3org/reva/v2/pkg/share/manager/registry"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
sharing "github.com/owncloud/ocis/v2/services/sharing/pkg/config"
|
||||
@@ -27,21 +27,6 @@ func Migrate(cfg *config.Config) *cli.Command {
|
||||
Name: "migrate",
|
||||
Usage: "migrate data from an existing to another instance",
|
||||
Category: "migration",
|
||||
Before: func(c *cli.Context) error {
|
||||
// Parse base config
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
// Parse sharing config
|
||||
cfg.Sharing.Commons = cfg.Commons
|
||||
if err := sharingparser.ParseConfig(cfg.Sharing); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
},
|
||||
Subcommands: []*cli.Command{
|
||||
MigrateShares(cfg),
|
||||
MigratePublicShares(cfg),
|
||||
@@ -69,6 +54,16 @@ func MigrateShares(cfg *config.Config) *cli.Command {
|
||||
Usage: "Share manager to import the data into",
|
||||
},
|
||||
},
|
||||
Before: func(c *cli.Context) error {
|
||||
// Parse base config
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
return configlog.ReturnError(err)
|
||||
}
|
||||
|
||||
// Parse sharing config
|
||||
cfg.Sharing.Commons = cfg.Commons
|
||||
return configlog.ReturnError(sharingparser.ParseConfig(cfg.Sharing))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
log := zerolog.New(zerolog.ConsoleWriter{Out: os.Stderr}).With().Timestamp().Logger()
|
||||
ctx := log.WithContext(context.Background())
|
||||
@@ -154,6 +149,16 @@ func MigratePublicShares(cfg *config.Config) *cli.Command {
|
||||
Usage: "Public share manager to import the data into",
|
||||
},
|
||||
},
|
||||
Before: func(c *cli.Context) error {
|
||||
// Parse base config
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
return configlog.ReturnError(err)
|
||||
}
|
||||
|
||||
// Parse sharing config
|
||||
cfg.Sharing.Commons = cfg.Commons
|
||||
return configlog.ReturnError(sharingparser.ParseConfig(cfg.Sharing))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
log := zerolog.New(zerolog.ConsoleWriter{Out: os.Stderr}).With().Timestamp().Logger()
|
||||
ctx := log.WithContext(context.Background())
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func NatsCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.Nats.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.Nats.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func NotificationsCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.Notifications.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.Notifications.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func OCDavCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.OCDav.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.OCDav.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func OCSCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.OCS.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.OCS.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func ProxyCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.Proxy.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.Proxy.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func SearchCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.Search.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.Search.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/runtime"
|
||||
@@ -17,11 +16,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
Usage: "start a fullstack server (runtime and all services in supervised mode)",
|
||||
Category: "fullstack",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, false); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
return configlog.ReturnError(parser.ParseConfig(cfg, false))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
r := runtime.New(cfg)
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func SettingsCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.Settings.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.Settings.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func SharingCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.Sharing.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.Sharing.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func StoragePublicLinkCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.StoragePublicLink.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.StoragePublicLink.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func StorageSharesCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.StorageShares.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.StorageShares.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func StorageSystemCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.StorageSystem.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.StorageSystem.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func StorageUsersCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.StorageUsers.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.StorageUsers.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -19,9 +18,7 @@ func StoreCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.Store.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.Store.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func ThumbnailsCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.Thumbnails.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.Thumbnails.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func UsersCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.Users.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.Users.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
func VersionCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "version",
|
||||
Usage: "print the version of this binary and all running extension instances",
|
||||
Usage: "print the version of this binary and all running service instances",
|
||||
Category: "info",
|
||||
Action: func(c *cli.Context) error {
|
||||
fmt.Println("Version: " + version.GetString())
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -18,9 +17,7 @@ func WebCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.Web.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.Web.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/command/helper"
|
||||
"github.com/owncloud/ocis/v2/ocis/pkg/register"
|
||||
@@ -19,9 +18,7 @@ func WebDAVCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: helper.SubcommandDescription(cfg.WebDAV.Service.Name),
|
||||
Category: "services",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
configlog.Error(parser.ParseConfig(cfg, true))
|
||||
cfg.WebDAV.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
|
||||
+45
-45
@@ -23,24 +23,24 @@ type TokenManager struct {
|
||||
JWTSecret string `yaml:"jwt_secret"`
|
||||
}
|
||||
|
||||
type InsecureExtension struct {
|
||||
type InsecureService struct {
|
||||
Insecure bool
|
||||
}
|
||||
|
||||
type InsecureProxyExtension struct {
|
||||
type InsecureProxyService struct {
|
||||
InsecureBackends bool `yaml:"insecure_backends"`
|
||||
}
|
||||
|
||||
type LdapSettings struct {
|
||||
BindPassword string `yaml:"bind_password"`
|
||||
}
|
||||
type LdapBasedExtension struct {
|
||||
type LdapBasedService struct {
|
||||
Ldap LdapSettings
|
||||
}
|
||||
|
||||
type GraphExtension struct {
|
||||
Spaces InsecureExtension
|
||||
Identity LdapBasedExtension
|
||||
type GraphService struct {
|
||||
Spaces InsecureService
|
||||
Identity LdapBasedService
|
||||
}
|
||||
|
||||
type ServiceUserPasswordsSettings struct {
|
||||
@@ -49,27 +49,27 @@ type ServiceUserPasswordsSettings struct {
|
||||
RevaPassword string `yaml:"reva_password"`
|
||||
IdpPassword string `yaml:"idp_password"`
|
||||
}
|
||||
type IdmExtension struct {
|
||||
type IdmService struct {
|
||||
ServiceUserPasswords ServiceUserPasswordsSettings `yaml:"service_user_passwords"`
|
||||
}
|
||||
|
||||
type FrontendExtension struct {
|
||||
Archiver InsecureExtension
|
||||
type FrontendService struct {
|
||||
Archiver InsecureService
|
||||
}
|
||||
|
||||
type AuthbasicExtension struct {
|
||||
AuthProviders LdapBasedExtension `yaml:"auth_providers"`
|
||||
type AuthbasicService struct {
|
||||
AuthProviders LdapBasedService `yaml:"auth_providers"`
|
||||
}
|
||||
|
||||
type AuthProviderSettings struct {
|
||||
Oidc InsecureExtension
|
||||
Oidc InsecureService
|
||||
}
|
||||
type AuthbearerExtension struct {
|
||||
type AuthbearerService struct {
|
||||
AuthProviders AuthProviderSettings `yaml:"auth_providers"`
|
||||
}
|
||||
|
||||
type UsersAndGroupsExtension struct {
|
||||
Drivers LdapBasedExtension
|
||||
type UsersAndGroupsService struct {
|
||||
Drivers LdapBasedService
|
||||
}
|
||||
|
||||
type ThumbnailSettings struct {
|
||||
@@ -78,7 +78,7 @@ type ThumbnailSettings struct {
|
||||
Cs3AllowInsecure bool `yaml:"cs3_allow_insecure"`
|
||||
}
|
||||
|
||||
type ThumbnailExtension struct {
|
||||
type ThumbnailService struct {
|
||||
Thumbnail ThumbnailSettings
|
||||
}
|
||||
|
||||
@@ -101,17 +101,17 @@ type OcisConfig struct {
|
||||
TransferSecret string `yaml:"transfer_secret"`
|
||||
SystemUserID string `yaml:"system_user_id"`
|
||||
AdminUserID string `yaml:"admin_user_id"`
|
||||
Graph GraphExtension
|
||||
Idp LdapBasedExtension
|
||||
Idm IdmExtension
|
||||
Proxy InsecureProxyExtension
|
||||
Frontend FrontendExtension
|
||||
AuthBasic AuthbasicExtension `yaml:"auth_basic"`
|
||||
AuthBearer AuthbearerExtension `yaml:"auth_bearer"`
|
||||
Users UsersAndGroupsExtension
|
||||
Groups UsersAndGroupsExtension
|
||||
Ocdav InsecureExtension
|
||||
Thumbnails ThumbnailExtension
|
||||
Graph GraphService
|
||||
Idp LdapBasedService
|
||||
Idm IdmService
|
||||
Proxy InsecureProxyService
|
||||
Frontend FrontendService
|
||||
AuthBasic AuthbasicService `yaml:"auth_basic"`
|
||||
AuthBearer AuthbearerService `yaml:"auth_bearer"`
|
||||
Users UsersAndGroupsService
|
||||
Groups UsersAndGroupsService
|
||||
Ocdav InsecureService
|
||||
Thumbnails ThumbnailService
|
||||
}
|
||||
|
||||
func checkConfigPath(configPath string) error {
|
||||
@@ -213,7 +213,7 @@ func CreateConfig(insecure, forceOverwrite bool, configPath, adminPassword strin
|
||||
TransferSecret: revaTransferSecret,
|
||||
SystemUserID: systemUserID,
|
||||
AdminUserID: adminUserID,
|
||||
Idm: IdmExtension{
|
||||
Idm: IdmService{
|
||||
ServiceUserPasswords: ServiceUserPasswordsSettings{
|
||||
AdminPassword: ocisAdminServicePassword,
|
||||
IdpPassword: idpServicePassword,
|
||||
@@ -221,40 +221,40 @@ func CreateConfig(insecure, forceOverwrite bool, configPath, adminPassword strin
|
||||
IdmPassword: idmServicePassword,
|
||||
},
|
||||
},
|
||||
Idp: LdapBasedExtension{
|
||||
Idp: LdapBasedService{
|
||||
Ldap: LdapSettings{
|
||||
BindPassword: idpServicePassword,
|
||||
},
|
||||
},
|
||||
AuthBasic: AuthbasicExtension{
|
||||
AuthProviders: LdapBasedExtension{
|
||||
AuthBasic: AuthbasicService{
|
||||
AuthProviders: LdapBasedService{
|
||||
Ldap: LdapSettings{
|
||||
BindPassword: revaServicePassword,
|
||||
},
|
||||
},
|
||||
},
|
||||
Groups: UsersAndGroupsExtension{
|
||||
Drivers: LdapBasedExtension{
|
||||
Groups: UsersAndGroupsService{
|
||||
Drivers: LdapBasedService{
|
||||
Ldap: LdapSettings{
|
||||
BindPassword: revaServicePassword,
|
||||
},
|
||||
},
|
||||
},
|
||||
Users: UsersAndGroupsExtension{
|
||||
Drivers: LdapBasedExtension{
|
||||
Users: UsersAndGroupsService{
|
||||
Drivers: LdapBasedService{
|
||||
Ldap: LdapSettings{
|
||||
BindPassword: revaServicePassword,
|
||||
},
|
||||
},
|
||||
},
|
||||
Graph: GraphExtension{
|
||||
Identity: LdapBasedExtension{
|
||||
Graph: GraphService{
|
||||
Identity: LdapBasedService{
|
||||
Ldap: LdapSettings{
|
||||
BindPassword: idmServicePassword,
|
||||
},
|
||||
},
|
||||
},
|
||||
Thumbnails: ThumbnailExtension{
|
||||
Thumbnails: ThumbnailService{
|
||||
Thumbnail: ThumbnailSettings{
|
||||
TransferSecret: thumbnailsTransferSecret,
|
||||
},
|
||||
@@ -262,25 +262,25 @@ func CreateConfig(insecure, forceOverwrite bool, configPath, adminPassword strin
|
||||
}
|
||||
|
||||
if insecure {
|
||||
cfg.AuthBearer = AuthbearerExtension{
|
||||
cfg.AuthBearer = AuthbearerService{
|
||||
AuthProviders: AuthProviderSettings{
|
||||
Oidc: InsecureExtension{
|
||||
Oidc: InsecureService{
|
||||
Insecure: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
cfg.Frontend = FrontendExtension{
|
||||
Archiver: InsecureExtension{
|
||||
cfg.Frontend = FrontendService{
|
||||
Archiver: InsecureService{
|
||||
Insecure: true,
|
||||
},
|
||||
}
|
||||
cfg.Graph.Spaces = InsecureExtension{
|
||||
cfg.Graph.Spaces = InsecureService{
|
||||
Insecure: true,
|
||||
}
|
||||
cfg.Ocdav = InsecureExtension{
|
||||
cfg.Ocdav = InsecureService{
|
||||
Insecure: true,
|
||||
}
|
||||
cfg.Proxy = InsecureProxyExtension{
|
||||
cfg.Proxy = InsecureProxyService{
|
||||
InsecureBackends: true,
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// List running extensions.
|
||||
// List running service.
|
||||
func List(cfg *config.Config) *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "list",
|
||||
|
||||
@@ -55,7 +55,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
// runset keeps track of which extensions to start supervised.
|
||||
// runset keeps track of which services to start supervised.
|
||||
runset map[string]struct{}
|
||||
)
|
||||
|
||||
@@ -142,7 +142,7 @@ func NewService(options ...Option) (*Service, error) {
|
||||
return s, nil
|
||||
}
|
||||
|
||||
// Start an rpc service. By default the package scope Start will run all default extensions to provide with a working
|
||||
// Start an rpc service. By default the package scope Start will run all default services to provide with a working
|
||||
// oCIS instance.
|
||||
func Start(o ...Option) error {
|
||||
// Start the runtime. Most likely this was called ONLY by the `ocis server` subcommand, but since we cannot protect
|
||||
@@ -241,12 +241,12 @@ func scheduleServiceTokens(s *Service, funcSet serviceFuncMap) {
|
||||
}
|
||||
}
|
||||
|
||||
// generateRunSet interprets the cfg.Runtime.Extensions config option to cherry-pick which services to start using
|
||||
// generateRunSet interprets the cfg.Runtime.Services config option to cherry-pick which services to start using
|
||||
// the runtime.
|
||||
func (s *Service) generateRunSet(cfg *ociscfg.Config) {
|
||||
runset = make(map[string]struct{})
|
||||
if cfg.Runtime.Extensions != "" {
|
||||
e := strings.Split(strings.ReplaceAll(cfg.Runtime.Extensions, " ", ""), ",")
|
||||
if cfg.Runtime.Services != "" {
|
||||
e := strings.Split(strings.ReplaceAll(cfg.Runtime.Services, " ", ""), ",")
|
||||
for _, name := range e {
|
||||
runset[name] = struct{}{}
|
||||
}
|
||||
@@ -273,7 +273,7 @@ func (s *Service) generateRunSet(cfg *ociscfg.Config) {
|
||||
func (s *Service) List(_ struct{}, reply *string) error {
|
||||
tableString := &strings.Builder{}
|
||||
table := tablewriter.NewWriter(tableString)
|
||||
table.SetHeader([]string{"Extension"})
|
||||
table.SetHeader([]string{"Service"})
|
||||
|
||||
names := []string{}
|
||||
for t := range s.serviceToken {
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/services/app-provider/pkg/config"
|
||||
"github.com/owncloud/ocis/v2/services/app-provider/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/services/app-provider/pkg/logging"
|
||||
@@ -17,11 +18,7 @@ func Health(cfg *config.Config) *cli.Command {
|
||||
Usage: "check health status",
|
||||
Category: "info",
|
||||
Before: func(c *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
return err
|
||||
return configlog.ReturnError(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/cs3org/reva/v2/cmd/revad/runtime"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/service/external"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/sync"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/version"
|
||||
@@ -25,15 +26,10 @@ import (
|
||||
func Server(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "server",
|
||||
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Category: "server",
|
||||
Before: func(c *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
return err
|
||||
return configlog.ReturnFatal(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
@@ -97,7 +93,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
}
|
||||
}
|
||||
|
||||
// defineContext sets the context for the extension. If there is a context configured it will create a new child from it,
|
||||
// defineContext sets the context for the service. If there is a context configured it will create a new child from it,
|
||||
// if not, it will create a root context that can be cancelled.
|
||||
func defineContext(cfg *config.Config) (context.Context, context.CancelFunc) {
|
||||
return func() (context.Context, context.CancelFunc) {
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
func Version(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "version",
|
||||
Usage: "print the version of this binary and the running extension instances",
|
||||
Usage: "print the version of this binary and the running service instances",
|
||||
Category: "info",
|
||||
Action: func(c *cli.Context) error {
|
||||
fmt.Println("Version: " + version.GetString())
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/services/app-registry/pkg/config"
|
||||
"github.com/owncloud/ocis/v2/services/app-registry/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/services/app-registry/pkg/logging"
|
||||
@@ -17,11 +18,7 @@ func Health(cfg *config.Config) *cli.Command {
|
||||
Usage: "check health status",
|
||||
Category: "info",
|
||||
Before: func(c *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
return err
|
||||
return configlog.ReturnError(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/cs3org/reva/v2/cmd/revad/runtime"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/service/external"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/version"
|
||||
"github.com/owncloud/ocis/v2/services/app-registry/pkg/config"
|
||||
@@ -24,15 +25,10 @@ import (
|
||||
func Server(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "server",
|
||||
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Category: "server",
|
||||
Before: func(c *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
return err
|
||||
return configlog.ReturnFatal(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
@@ -92,7 +88,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
}
|
||||
}
|
||||
|
||||
// defineContext sets the context for the extension. If there is a context configured it will create a new child from it,
|
||||
// defineContext sets the context for the service. If there is a context configured it will create a new child from it,
|
||||
// if not, it will create a root context that can be cancelled.
|
||||
func defineContext(cfg *config.Config) (context.Context, context.CancelFunc) {
|
||||
return func() (context.Context, context.CancelFunc) {
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
func Version(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "version",
|
||||
Usage: "print the version of this binary and the running extension instances",
|
||||
Usage: "print the version of this binary and the running service instances",
|
||||
Category: "info",
|
||||
Action: func(c *cli.Context) error {
|
||||
fmt.Println("Version: " + version.GetString())
|
||||
|
||||
@@ -30,9 +30,6 @@ func DefaultConfig() *config.Config {
|
||||
Reva: &config.Reva{
|
||||
Address: "127.0.0.1:9142",
|
||||
},
|
||||
AppRegistry: config.AppRegistry{
|
||||
MimeTypeConfig: defaultMimeTypeConfig(),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,6 +147,9 @@ func EnsureDefaults(cfg *config.Config) {
|
||||
|
||||
}
|
||||
|
||||
// Sanitize the config
|
||||
func Sanitize(cfg *config.Config) {
|
||||
// nothing to sanitize here atm
|
||||
if cfg.AppRegistry.MimeTypeConfig == nil {
|
||||
cfg.AppRegistry.MimeTypeConfig = defaultMimeTypeConfig()
|
||||
}
|
||||
}
|
||||
@@ -3,11 +3,11 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/cs3org/reva/v2/pkg/events"
|
||||
"github.com/cs3org/reva/v2/pkg/events/server"
|
||||
"github.com/go-micro/plugins/v4/events/natsjs"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/services/audit/pkg/config"
|
||||
"github.com/owncloud/ocis/v2/services/audit/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/services/audit/pkg/logging"
|
||||
@@ -20,15 +20,10 @@ import (
|
||||
func Server(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "server",
|
||||
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Category: "server",
|
||||
Before: func(c *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
return err
|
||||
return configlog.ReturnFatal(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
func Version(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "version",
|
||||
Usage: "print the version of this binary and the running extension instances",
|
||||
Usage: "print the version of this binary and the running service instances",
|
||||
Category: "info",
|
||||
Action: func(c *cli.Context) error {
|
||||
// not implemented
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/services/auth-basic/pkg/config"
|
||||
"github.com/owncloud/ocis/v2/services/auth-basic/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/services/auth-basic/pkg/logging"
|
||||
@@ -17,11 +18,7 @@ func Health(cfg *config.Config) *cli.Command {
|
||||
Usage: "check health status",
|
||||
Category: "info",
|
||||
Before: func(c *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
return err
|
||||
return configlog.ReturnError(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/cs3org/reva/v2/cmd/revad/runtime"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/ldap"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/service/external"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/sync"
|
||||
@@ -26,15 +27,10 @@ import (
|
||||
func Server(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "server",
|
||||
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Category: "server",
|
||||
Before: func(c *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
return err
|
||||
return configlog.ReturnFatal(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
@@ -110,7 +106,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
}
|
||||
}
|
||||
|
||||
// defineContext sets the context for the extension. If there is a context configured it will create a new child from it,
|
||||
// defineContext sets the context for the service. If there is a context configured it will create a new child from it,
|
||||
// if not, it will create a root context that can be cancelled.
|
||||
func defineContext(cfg *config.Config) (context.Context, context.CancelFunc) {
|
||||
return func() (context.Context, context.CancelFunc) {
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
func Version(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "version",
|
||||
Usage: "print the version of this binary and the running extension instances",
|
||||
Usage: "print the version of this binary and the running service instances",
|
||||
Category: "info",
|
||||
Action: func(c *cli.Context) error {
|
||||
fmt.Println("Version: " + version.GetString())
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/services/auth-bearer/pkg/config"
|
||||
"github.com/owncloud/ocis/v2/services/auth-bearer/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/services/auth-bearer/pkg/logging"
|
||||
@@ -17,11 +18,7 @@ func Health(cfg *config.Config) *cli.Command {
|
||||
Usage: "check health status",
|
||||
Category: "info",
|
||||
Before: func(c *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
return err
|
||||
return configlog.ReturnError(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/cs3org/reva/v2/cmd/revad/runtime"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/service/external"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/sync"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/version"
|
||||
@@ -25,15 +26,10 @@ import (
|
||||
func Server(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "server",
|
||||
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Category: "server",
|
||||
Before: func(c *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
return err
|
||||
return configlog.ReturnFatal(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
@@ -97,7 +93,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
}
|
||||
}
|
||||
|
||||
// defineContext sets the context for the extension. If there is a context configured it will create a new child from it,
|
||||
// defineContext sets the context for the service. If there is a context configured it will create a new child from it,
|
||||
// if not, it will create a root context that can be cancelled.
|
||||
func defineContext(cfg *config.Config) (context.Context, context.CancelFunc) {
|
||||
return func() (context.Context, context.CancelFunc) {
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
func Version(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "version",
|
||||
Usage: "print the version of this binary and the running extension instances",
|
||||
Usage: "print the version of this binary and the running services instances",
|
||||
Category: "info",
|
||||
Action: func(c *cli.Context) error {
|
||||
fmt.Println("Version: " + version.GetString())
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/services/auth-machine/pkg/config"
|
||||
"github.com/owncloud/ocis/v2/services/auth-machine/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/services/auth-machine/pkg/logging"
|
||||
@@ -17,11 +18,7 @@ func Health(cfg *config.Config) *cli.Command {
|
||||
Usage: "check health status",
|
||||
Category: "info",
|
||||
Before: func(c *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
return err
|
||||
return configlog.ReturnError(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/cs3org/reva/v2/cmd/revad/runtime"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/service/external"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/sync"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/version"
|
||||
@@ -25,15 +26,10 @@ import (
|
||||
func Server(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "server",
|
||||
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Category: "server",
|
||||
Before: func(c *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
return err
|
||||
return configlog.ReturnFatal(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
@@ -97,7 +93,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
}
|
||||
}
|
||||
|
||||
// defineContext sets the context for the extension. If there is a context configured it will create a new child from it,
|
||||
// defineContext sets the context for the service. If there is a context configured it will create a new child from it,
|
||||
// if not, it will create a root context that can be cancelled.
|
||||
func defineContext(cfg *config.Config) (context.Context, context.CancelFunc) {
|
||||
return func() (context.Context, context.CancelFunc) {
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
func Version(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "version",
|
||||
Usage: "print the version of this binary and the running extension instances",
|
||||
Usage: "print the version of this binary and the running service instances",
|
||||
Category: "info",
|
||||
Action: func(c *cli.Context) error {
|
||||
fmt.Println("Version: " + version.GetString())
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/services/frontend/pkg/config"
|
||||
"github.com/owncloud/ocis/v2/services/frontend/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/services/frontend/pkg/logging"
|
||||
@@ -17,11 +18,7 @@ func Health(cfg *config.Config) *cli.Command {
|
||||
Usage: "check health status",
|
||||
Category: "info",
|
||||
Before: func(c *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
return err
|
||||
return configlog.ReturnError(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/cs3org/reva/v2/cmd/revad/runtime"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/service/external"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/sync"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/version"
|
||||
@@ -25,15 +26,10 @@ import (
|
||||
func Server(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "server",
|
||||
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Category: "server",
|
||||
Before: func(c *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
return err
|
||||
return configlog.ReturnFatal(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
@@ -100,7 +96,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
}
|
||||
}
|
||||
|
||||
// defineContext sets the context for the extension. If there is a context configured it will create a new child from it,
|
||||
// defineContext sets the context for the service. If there is a context configured it will create a new child from it,
|
||||
// if not, it will create a root context that can be cancelled.
|
||||
func defineContext(cfg *config.Config) (context.Context, context.CancelFunc) {
|
||||
return func() (context.Context, context.CancelFunc) {
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
func Version(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "version",
|
||||
Usage: "print the version of this binary and the running extension instances",
|
||||
Usage: "print the version of this binary and the running service instances",
|
||||
Category: "info",
|
||||
Action: func(c *cli.Context) error {
|
||||
fmt.Println("Version: " + version.GetString())
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/services/gateway/pkg/config"
|
||||
"github.com/owncloud/ocis/v2/services/gateway/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/services/gateway/pkg/logging"
|
||||
@@ -17,11 +18,7 @@ func Health(cfg *config.Config) *cli.Command {
|
||||
Usage: "check health status",
|
||||
Category: "info",
|
||||
Before: func(c *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
return err
|
||||
return configlog.ReturnError(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/cs3org/reva/v2/cmd/revad/runtime"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/service/external"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/version"
|
||||
"github.com/owncloud/ocis/v2/services/gateway/pkg/config"
|
||||
@@ -24,15 +25,10 @@ import (
|
||||
func Server(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "server",
|
||||
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Category: "server",
|
||||
Before: func(c *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
return err
|
||||
return configlog.ReturnFatal(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
@@ -92,7 +88,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
}
|
||||
}
|
||||
|
||||
// defineContext sets the context for the extension. If there is a context configured it will create a new child from it,
|
||||
// defineContext sets the context for the service. If there is a context configured it will create a new child from it,
|
||||
// if not, it will create a root context that can be cancelled.
|
||||
func defineContext(cfg *config.Config) (context.Context, context.CancelFunc) {
|
||||
return func() (context.Context, context.CancelFunc) {
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
func Version(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "version",
|
||||
Usage: "print the version of this binary and the running extension instances",
|
||||
Usage: "print the version of this binary and the running service instances",
|
||||
Category: "info",
|
||||
Action: func(c *cli.Context) error {
|
||||
fmt.Println("Version: " + version.GetString())
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config"
|
||||
"github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/services/graph-explorer/pkg/logging"
|
||||
@@ -17,11 +18,7 @@ func Health(cfg *config.Config) *cli.Command {
|
||||
Usage: "check health status",
|
||||
Category: "info",
|
||||
Before: func(c *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
return err
|
||||
return configlog.ReturnError(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
|
||||
@@ -3,9 +3,9 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/version"
|
||||
"github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config"
|
||||
"github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config/parser"
|
||||
@@ -21,15 +21,10 @@ import (
|
||||
func Server(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "server",
|
||||
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Category: "server",
|
||||
Before: func(ctx *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
return err
|
||||
return configlog.ReturnFatal(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
func Version(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "version",
|
||||
Usage: "print the version of this binary and the running extension instances",
|
||||
Usage: "print the version of this binary and the running service instances",
|
||||
Category: "info",
|
||||
Action: func(c *cli.Context) error {
|
||||
fmt.Println("Version: " + version.GetString())
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config"
|
||||
)
|
||||
|
||||
// Service defines the extension handlers.
|
||||
// Service defines the service handlers.
|
||||
type Service interface {
|
||||
ServeHTTP(http.ResponseWriter, *http.Request)
|
||||
ConfigJs(http.ResponseWriter, *http.Request)
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/services/graph/pkg/config"
|
||||
"github.com/owncloud/ocis/v2/services/graph/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/services/graph/pkg/logging"
|
||||
@@ -17,11 +18,7 @@ func Health(cfg *config.Config) *cli.Command {
|
||||
Usage: "check health status",
|
||||
Category: "info",
|
||||
Before: func(c *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
return err
|
||||
return configlog.ReturnError(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
|
||||
@@ -3,9 +3,9 @@ package command
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/version"
|
||||
"github.com/owncloud/ocis/v2/services/graph/pkg/config"
|
||||
"github.com/owncloud/ocis/v2/services/graph/pkg/config/parser"
|
||||
@@ -21,15 +21,10 @@ import (
|
||||
func Server(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "server",
|
||||
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Category: "server",
|
||||
Before: func(c *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
return err
|
||||
return configlog.ReturnFatal(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
func Version(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "version",
|
||||
Usage: "print the version of this binary and the running extension instances",
|
||||
Usage: "print the version of this binary and the running service instances",
|
||||
Category: "info",
|
||||
Action: func(c *cli.Context) error {
|
||||
fmt.Println("Version: " + version.GetString())
|
||||
|
||||
@@ -28,7 +28,7 @@ const (
|
||||
HeaderPurge = "Purge"
|
||||
)
|
||||
|
||||
// Service defines the extension handlers.
|
||||
// Service defines the service handlers.
|
||||
type Service interface {
|
||||
ServeHTTP(http.ResponseWriter, *http.Request)
|
||||
GetMe(http.ResponseWriter, *http.Request)
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/services/groups/pkg/config"
|
||||
"github.com/owncloud/ocis/v2/services/groups/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/services/groups/pkg/logging"
|
||||
@@ -17,11 +18,7 @@ func Health(cfg *config.Config) *cli.Command {
|
||||
Usage: "check health status",
|
||||
Category: "info",
|
||||
Before: func(c *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
return err
|
||||
return configlog.ReturnError(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/cs3org/reva/v2/cmd/revad/runtime"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/ldap"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/service/external"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/sync"
|
||||
@@ -26,15 +27,10 @@ import (
|
||||
func Server(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "server",
|
||||
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Category: "server",
|
||||
Before: func(c *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
return err
|
||||
return configlog.ReturnFatal(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
@@ -110,7 +106,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
}
|
||||
}
|
||||
|
||||
// defineContext sets the context for the extension. If there is a context configured it will create a new child from it,
|
||||
// defineContext sets the context for the service. If there is a context configured it will create a new child from it,
|
||||
// if not, it will create a root context that can be cancelled.
|
||||
func defineContext(cfg *config.Config) (context.Context, context.CancelFunc) {
|
||||
return func() (context.Context, context.CancelFunc) {
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
func Version(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "version",
|
||||
Usage: "print the version of this binary and the running extension instances",
|
||||
Usage: "print the version of this binary and the running service instances",
|
||||
Category: "info",
|
||||
Action: func(c *cli.Context) error {
|
||||
fmt.Println("Version: " + version.GetString())
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/services/idm/pkg/config"
|
||||
"github.com/owncloud/ocis/v2/services/idm/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/services/idm/pkg/logging"
|
||||
@@ -17,11 +18,7 @@ func Health(cfg *config.Config) *cli.Command {
|
||||
Usage: "check health status",
|
||||
Category: "info",
|
||||
Before: func(c *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
return err
|
||||
return configlog.ReturnError(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
|
||||
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/go-ldap/ldap/v3"
|
||||
"github.com/libregraph/idm/pkg/ldbbolt"
|
||||
"github.com/libregraph/idm/server"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/log"
|
||||
"github.com/owncloud/ocis/v2/services/idm/pkg/config"
|
||||
"github.com/owncloud/ocis/v2/services/idm/pkg/config/parser"
|
||||
@@ -24,15 +25,10 @@ import (
|
||||
func ResetPassword(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "resetpassword",
|
||||
Usage: fmt.Sprintf("Reset admin password"),
|
||||
Usage: "Reset admin password",
|
||||
Category: "password reset",
|
||||
Before: func(c *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
return err
|
||||
return configlog.ReturnFatal(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
|
||||
@@ -13,6 +13,7 @@ import (
|
||||
"github.com/libregraph/idm/pkg/ldappassword"
|
||||
"github.com/libregraph/idm/pkg/ldbbolt"
|
||||
"github.com/libregraph/idm/server"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
pkgcrypto "github.com/owncloud/ocis/v2/ocis-pkg/crypto"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/log"
|
||||
"github.com/owncloud/ocis/v2/services/idm"
|
||||
@@ -26,15 +27,10 @@ import (
|
||||
func Server(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "server",
|
||||
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Category: "server",
|
||||
Before: func(c *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
return err
|
||||
return configlog.ReturnFatal(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
func Version(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "version",
|
||||
Usage: "print the version of this binary and the running extension instances",
|
||||
Usage: "print the version of this binary and the running service instances",
|
||||
Category: "info",
|
||||
Action: func(c *cli.Context) error {
|
||||
// not implemented
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/services/idp/pkg/config"
|
||||
"github.com/owncloud/ocis/v2/services/idp/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/services/idp/pkg/logging"
|
||||
@@ -17,11 +18,7 @@ func Health(cfg *config.Config) *cli.Command {
|
||||
Usage: "check health status",
|
||||
Category: "info",
|
||||
Before: func(c *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
}
|
||||
return err
|
||||
return configlog.ReturnError(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
|
||||
@@ -15,6 +15,7 @@ import (
|
||||
"path/filepath"
|
||||
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/version"
|
||||
"github.com/owncloud/ocis/v2/services/idp/pkg/config"
|
||||
"github.com/owncloud/ocis/v2/services/idp/pkg/config/parser"
|
||||
@@ -32,14 +33,10 @@ const _rsaKeySize = 4096
|
||||
func Server(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "server",
|
||||
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
Category: "server",
|
||||
Before: func(c *cli.Context) error {
|
||||
err := parser.ParseConfig(cfg)
|
||||
if err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
configlog.ReturnFatal(parser.ParseConfig(cfg))
|
||||
|
||||
if cfg.IDP.EncryptionSecretFile != "" {
|
||||
if err := ensureEncryptionSecretExists(cfg.IDP.EncryptionSecretFile); err != nil {
|
||||
@@ -49,7 +46,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return err
|
||||
return nil
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
func Version(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "version",
|
||||
Usage: "print the version of this binary and the running extension instances",
|
||||
Usage: "print the version of this binary and the running service instances",
|
||||
Category: "info",
|
||||
Action: func(c *cli.Context) error {
|
||||
fmt.Println("Version: " + version.GetString())
|
||||
|
||||
Loaded 100 of 175 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user