Merge pull request #10833 from kobergj/7.1Backport
[full-ci] Backport 7.1 Features
This commit is contained in:
190 files changed
+9084
-2320
No files matched your search
+4
-4
@@ -1,4 +1,4 @@
|
||||
services/settings/ @kulmann
|
||||
services/web/ @kulmann
|
||||
.drone.star @wkloucek @micbar @phil-davis @individual-it
|
||||
assets/End-User-License-Agreement-for-ownCloud-Infinite-Scale.pdf @micbar @dragotin @tbsbdr
|
||||
services/settings/ @lukashirt
|
||||
services/web/ @lukashirt
|
||||
.drone.star @kobergj @phil-davis @individual-it
|
||||
assets/End-User-License-Agreement-for-ownCloud-Infinite-Scale.pdf @kobergj @hodyroff
|
||||
+15
-1
@@ -12,6 +12,20 @@ $finder = PhpCsFixer\Finder::create()
|
||||
->exclude($excludeDirs)
|
||||
->in(__DIR__);
|
||||
|
||||
$config = new OC\CodingStandard\Config();
|
||||
$ocRule = (new OC\CodingStandard\Config())->getRules();
|
||||
$config = new PhpCsFixer\Config();
|
||||
$config->setFinder($finder)
|
||||
->setIndent("\t")
|
||||
->setRules(
|
||||
array_merge(
|
||||
$ocRule,
|
||||
[
|
||||
"return_type_declaration" => [
|
||||
"space_before" => "none",
|
||||
],
|
||||
'single_space_around_construct' => true
|
||||
]
|
||||
)
|
||||
);
|
||||
$config->setFinder($finder);
|
||||
return $config;
|
||||
@@ -1,5 +1,6 @@
|
||||
# Table of Contents
|
||||
|
||||
* [Changelog for unreleased](#changelog-for-unreleased-unreleased)
|
||||
* [Changelog for 7.0.0](#changelog-for-700-2024-12-17)
|
||||
* [Changelog for 5.0.9](#changelog-for-509-2024-11-14)
|
||||
* [Changelog for 6.6.1](#changelog-for-661-2024-10-24)
|
||||
@@ -52,6 +53,72 @@
|
||||
* [Changelog for 1.1.0](#changelog-for-110-2021-01-22)
|
||||
* [Changelog for 1.0.0](#changelog-for-100-2020-12-17)
|
||||
|
||||
# Changelog for [unreleased] (UNRELEASED)
|
||||
|
||||
The following sections list the changes for unreleased.
|
||||
|
||||
[unreleased]: https://github.com/owncloud/ocis/compare/v7.0.0...master
|
||||
|
||||
## Summary
|
||||
|
||||
* Bugfix - Share creation date is missing in invite response: [#10780](https://github.com/owncloud/ocis/pull/10780)
|
||||
* Bugfix - Bump some golang dependencies: [#10795](https://github.com/owncloud/ocis/pull/10795)
|
||||
* Enhancement - Part I: The user settings are extended by notifications preferences: [#10706](https://github.com/owncloud/ocis/pull/10706)
|
||||
* Enhancement - Part II: Filtering of in-app notifications: [#10779](https://github.com/owncloud/ocis/pull/10779)
|
||||
* Enhancement - Part III: Filtering of mail notifications: [#10792](https://github.com/owncloud/ocis/pull/10792)
|
||||
* Enhancement - Translate Notification Settings: [#10812](https://github.com/owncloud/ocis/pull/10812)
|
||||
* Enhancement - Bump Reva: [#10830](https://github.com/owncloud/ocis/pull/10830)
|
||||
|
||||
## Details
|
||||
|
||||
* Bugfix - Share creation date is missing in invite response: [#10780](https://github.com/owncloud/ocis/pull/10780)
|
||||
|
||||
The graph drives invite response now includes the `createdDateTime` field.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/10739
|
||||
https://github.com/owncloud/ocis/pull/10780
|
||||
|
||||
* Bugfix - Bump some golang dependencies: [#10795](https://github.com/owncloud/ocis/pull/10795)
|
||||
|
||||
Bump dependencies "golang.org/x/crypto" and "golang.org/x/net"
|
||||
|
||||
https://github.com/owncloud/ocis/pull/10795
|
||||
|
||||
* Enhancement - Part I: The user settings are extended by notifications preferences: [#10706](https://github.com/owncloud/ocis/pull/10706)
|
||||
|
||||
Part I: Users can now store their notifications preferences in the user settings
|
||||
|
||||
https://github.com/owncloud/ocis/issues/10669
|
||||
https://github.com/owncloud/ocis/pull/10706
|
||||
|
||||
* Enhancement - Part II: Filtering of in-app notifications: [#10779](https://github.com/owncloud/ocis/pull/10779)
|
||||
|
||||
Part II: In-app notifications are now filtered based on the notification
|
||||
preferences in the user settings
|
||||
|
||||
https://github.com/owncloud/ocis/issues/10769
|
||||
https://github.com/owncloud/ocis/pull/10779
|
||||
|
||||
* Enhancement - Part III: Filtering of mail notifications: [#10792](https://github.com/owncloud/ocis/pull/10792)
|
||||
|
||||
Part III: Mail notifications are now filtered based on the notification
|
||||
preferences in the user settings
|
||||
|
||||
https://github.com/owncloud/ocis/issues/10790
|
||||
https://github.com/owncloud/ocis/pull/10792
|
||||
|
||||
* Enhancement - Translate Notification Settings: [#10812](https://github.com/owncloud/ocis/pull/10812)
|
||||
|
||||
Translates the notification settings according to the users language preference.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/10812
|
||||
|
||||
* Enhancement - Bump Reva: [#10830](https://github.com/owncloud/ocis/pull/10830)
|
||||
|
||||
Bumps the reva version
|
||||
|
||||
https://github.com/owncloud/ocis/pull/10830
|
||||
|
||||
# Changelog for [7.0.0] (2024-12-17)
|
||||
|
||||
The following sections list the changes for 7.0.0.
|
||||
|
||||
@@ -17,7 +17,8 @@ L10N_MODULES := \
|
||||
services/activitylog \
|
||||
services/graph \
|
||||
services/notifications \
|
||||
services/userlog
|
||||
services/userlog \
|
||||
services/settings
|
||||
|
||||
# if you add a module here please also add it to the .drone.star file
|
||||
OCIS_MODULES = \
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
Bugfix: Bump some golang dependencies
|
||||
|
||||
Bump dependencies "golang.org/x/crypto" and "golang.org/x/net"
|
||||
|
||||
https://github.com/owncloud/ocis/pull/10795
|
||||
@@ -0,0 +1,5 @@
|
||||
Enhancement: Bump Reva
|
||||
|
||||
Bumps the reva version
|
||||
|
||||
https://github.com/owncloud/ocis/pull/10830
|
||||
@@ -0,0 +1,6 @@
|
||||
Enhancement: Part I: The user settings are extended by notifications preferences
|
||||
|
||||
Part I: Users can now store their notifications preferences in the user settings
|
||||
|
||||
https://github.com/owncloud/ocis/pull/10706
|
||||
https://github.com/owncloud/ocis/issues/10669
|
||||
@@ -0,0 +1,6 @@
|
||||
Enhancement: Part II: Filtering of in-app notifications
|
||||
|
||||
Part II: In-app notifications are now filtered based on the notification preferences in the user settings
|
||||
|
||||
https://github.com/owncloud/ocis/pull/10779
|
||||
https://github.com/owncloud/ocis/issues/10769
|
||||
@@ -0,0 +1,6 @@
|
||||
Enhancement: Part III: Filtering of mail notifications
|
||||
|
||||
Part III: Mail notifications are now filtered based on the notification preferences in the user settings
|
||||
|
||||
https://github.com/owncloud/ocis/pull/10792
|
||||
https://github.com/owncloud/ocis/issues/10790
|
||||
@@ -0,0 +1,6 @@
|
||||
Bugfix: Share creation date is missing in invite response
|
||||
|
||||
The graph drives invite response now includes the `createdDateTime` field.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/10780
|
||||
https://github.com/owncloud/ocis/issues/10739
|
||||
@@ -0,0 +1,5 @@
|
||||
Enhancement: Translate Notification Settings
|
||||
|
||||
Translates the notification settings according to the users language preference.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/10812
|
||||
@@ -18,10 +18,9 @@
|
||||
|
||||
vars:
|
||||
ssh_authorized_keys:
|
||||
- https://github.com/butonic.keys
|
||||
- https://github.com/fschade.keys
|
||||
- https://github.com/kulmann.keys
|
||||
- https://github.com/micbar.keys
|
||||
- https://github.com/kobergj.keys
|
||||
- https://github.com/2403905.keys
|
||||
- https://github.com/d7oc.keys
|
||||
- https://github.com/wkloucek.keys
|
||||
docker_compose_projects:
|
||||
- name: ocis
|
||||
@@ -30,7 +29,7 @@
|
||||
docker_compose_path: deployments/examples/ocis_full
|
||||
env:
|
||||
INSECURE: "false"
|
||||
TRAEFIK_ACME_MAIL: mbarz@owncloud.com
|
||||
TRAEFIK_ACME_MAIL: julian.koberg@kiteworks.com
|
||||
OCIS_DOCKER_TAG: master
|
||||
OCIS_DOCKER_IMAGE: owncloud/ocis-rolling
|
||||
OCIS_DOMAIN: ocis.ocis.master.owncloud.works
|
||||
|
||||
@@ -18,10 +18,9 @@
|
||||
|
||||
vars:
|
||||
ssh_authorized_keys:
|
||||
- https://github.com/butonic.keys
|
||||
- https://github.com/fschade.keys
|
||||
- https://github.com/kulmann.keys
|
||||
- https://github.com/micbar.keys
|
||||
- https://github.com/kobergj.keys
|
||||
- https://github.com/2403905.keys
|
||||
- https://github.com/d7oc.keys
|
||||
- https://github.com/wkloucek.keys
|
||||
docker_compose_projects:
|
||||
- name: ocis
|
||||
@@ -30,7 +29,7 @@
|
||||
docker_compose_path: deployments/examples/ocis_full
|
||||
env:
|
||||
INSECURE: "false"
|
||||
TRAEFIK_ACME_MAIL: mbarz@owncloud.com
|
||||
TRAEFIK_ACME_MAIL: julian.koberg@kiteworks.com
|
||||
OCIS_DOCKER_TAG: master
|
||||
OCIS_DOCKER_IMAGE: owncloud/ocis-rolling
|
||||
OCIS_DOMAIN: ocis.ocis-onlyoffice.master.owncloud.works
|
||||
|
||||
@@ -18,10 +18,9 @@
|
||||
|
||||
vars:
|
||||
ssh_authorized_keys:
|
||||
- https://github.com/butonic.keys
|
||||
- https://github.com/fschade.keys
|
||||
- https://github.com/kulmann.keys
|
||||
- https://github.com/micbar.keys
|
||||
- https://github.com/kobergj.keys
|
||||
- https://github.com/2403905.keys
|
||||
- https://github.com/d7oc.keys
|
||||
- https://github.com/wkloucek.keys
|
||||
docker_compose_projects:
|
||||
- name: ocis
|
||||
@@ -30,7 +29,7 @@
|
||||
docker_compose_path: deployments/examples/ocis_full
|
||||
env:
|
||||
INSECURE: "false"
|
||||
TRAEFIK_ACME_MAIL: mbarz@owncloud.com
|
||||
TRAEFIK_ACME_MAIL: julian.koberg@kiteworks.com
|
||||
OCIS_DOCKER_TAG: 6.6.1
|
||||
OCIS_DOCKER_IMAGE: owncloud/ocis-rolling
|
||||
OCIS_DOMAIN: ocis.ocis-onlyoffice.rolling.owncloud.works
|
||||
|
||||
@@ -18,10 +18,9 @@
|
||||
|
||||
vars:
|
||||
ssh_authorized_keys:
|
||||
- https://github.com/butonic.keys
|
||||
- https://github.com/fschade.keys
|
||||
- https://github.com/kulmann.keys
|
||||
- https://github.com/micbar.keys
|
||||
- https://github.com/kobergj.keys
|
||||
- https://github.com/2403905.keys
|
||||
- https://github.com/d7oc.keys
|
||||
- https://github.com/wkloucek.keys
|
||||
docker_compose_projects:
|
||||
- name: ocis
|
||||
@@ -30,7 +29,7 @@
|
||||
docker_compose_path: deployments/examples/ocis_full
|
||||
env:
|
||||
INSECURE: "false"
|
||||
TRAEFIK_ACME_MAIL: mbarz@owncloud.com
|
||||
TRAEFIK_ACME_MAIL: julian.koberg@kiteworks.com
|
||||
OCIS_DOCKER_TAG: 7.0.0
|
||||
OCIS_DOMAIN: ocis.ocis.production.owncloud.works
|
||||
COMPANION_DOMAIN: companion.ocis.production.owncloud.works
|
||||
|
||||
@@ -18,10 +18,9 @@
|
||||
|
||||
vars:
|
||||
ssh_authorized_keys:
|
||||
- https://github.com/butonic.keys
|
||||
- https://github.com/fschade.keys
|
||||
- https://github.com/kulmann.keys
|
||||
- https://github.com/micbar.keys
|
||||
- https://github.com/kobergj.keys
|
||||
- https://github.com/2403905.keys
|
||||
- https://github.com/d7oc.keys
|
||||
- https://github.com/wkloucek.keys
|
||||
docker_compose_projects:
|
||||
- name: ocis
|
||||
@@ -30,7 +29,7 @@
|
||||
docker_compose_path: deployments/examples/ocis_full
|
||||
env:
|
||||
INSECURE: "false"
|
||||
TRAEFIK_ACME_MAIL: mbarz@owncloud.com
|
||||
TRAEFIK_ACME_MAIL: julian.koberg@kiteworks.com
|
||||
OCIS_DOCKER_TAG: 6.6.1
|
||||
OCIS_DOCKER_IMAGE: owncloud/ocis-rolling
|
||||
OCIS_DOMAIN: ocis.ocis.rolling.owncloud.works
|
||||
|
||||
@@ -18,10 +18,9 @@
|
||||
|
||||
vars:
|
||||
ssh_authorized_keys:
|
||||
- https://github.com/butonic.keys
|
||||
- https://github.com/fschade.keys
|
||||
- https://github.com/kulmann.keys
|
||||
- https://github.com/micbar.keys
|
||||
- https://github.com/kobergj.keys
|
||||
- https://github.com/2403905.keys
|
||||
- https://github.com/d7oc.keys
|
||||
- https://github.com/wkloucek.keys
|
||||
docker_compose_projects:
|
||||
- name: ocis
|
||||
@@ -30,7 +29,7 @@
|
||||
docker_compose_path: deployments/examples/ocis_full
|
||||
env:
|
||||
INSECURE: "false"
|
||||
TRAEFIK_ACME_MAIL: mbarz@owncloud.com
|
||||
TRAEFIK_ACME_MAIL: julian.koberg@kiteworks.com
|
||||
OCIS_DOCKER_TAG: 6.6.1
|
||||
OCIS_DOCKER_IMAGE: owncloud/ocis-rolling
|
||||
OCIS_DOMAIN: ocis.ocis-s3.rolling.owncloud.works
|
||||
|
||||
@@ -18,10 +18,9 @@
|
||||
|
||||
vars:
|
||||
ssh_authorized_keys:
|
||||
- https://github.com/butonic.keys
|
||||
- https://github.com/fschade.keys
|
||||
- https://github.com/kulmann.keys
|
||||
- https://github.com/micbar.keys
|
||||
- https://github.com/kobergj.keys
|
||||
- https://github.com/2403905.keys
|
||||
- https://github.com/d7oc.keys
|
||||
- https://github.com/wkloucek.keys
|
||||
docker_compose_projects:
|
||||
- name: ocis
|
||||
@@ -30,7 +29,7 @@
|
||||
docker_compose_path: deployments/examples/ocis_keycloak
|
||||
env:
|
||||
INSECURE: "false"
|
||||
TRAEFIK_ACME_MAIL: mbarz@owncloud.com
|
||||
TRAEFIK_ACME_MAIL: julian.koberg@kiteworks.com
|
||||
OCIS_DOCKER_TAG: 6.6.1
|
||||
OCIS_DOCKER_IMAGE: owncloud/ocis-rolling
|
||||
OCIS_DOMAIN: ocis.ocis-keycloak.rolling.owncloud.works
|
||||
|
||||
@@ -18,10 +18,9 @@
|
||||
|
||||
vars:
|
||||
ssh_authorized_keys:
|
||||
- https://github.com/butonic.keys
|
||||
- https://github.com/fschade.keys
|
||||
- https://github.com/kulmann.keys
|
||||
- https://github.com/micbar.keys
|
||||
- https://github.com/kobergj.keys
|
||||
- https://github.com/2403905.keys
|
||||
- https://github.com/d7oc.keys
|
||||
- https://github.com/wkloucek.keys
|
||||
docker_compose_projects:
|
||||
- name: ocis
|
||||
@@ -30,7 +29,7 @@
|
||||
docker_compose_path: deployments/examples/ocis_ldap
|
||||
env:
|
||||
INSECURE: "false"
|
||||
TRAEFIK_ACME_MAIL: mbarz@owncloud.com
|
||||
TRAEFIK_ACME_MAIL: julian.koberg@kiteworks.com
|
||||
OCIS_DOCKER_TAG: 6.6.1
|
||||
OCIS_DOCKER_IMAGE: owncloud/ocis-rolling
|
||||
OCIS_DOMAIN: ocis.ocis-ldap.rolling.owncloud.works
|
||||
|
||||
@@ -29,7 +29,13 @@ Translations have a `context` and a `translatable string`. The context is shown
|
||||
* Add the `OCIS_DEFAULT_LANGUAGE` envvar in `services/<service-name>/pkg/config/config.go`.\
|
||||
For details see the userlog or notifications service code.
|
||||
|
||||
* Use `"github.com/owncloud/ocis/v2/ocis-pkg/l10n"` for the translation.
|
||||
* Add the `<SERVICE_NAME>_TRANSLATION_PATH` envvar in `services/<service-name>/pkg/config/config.go`.\
|
||||
For details see the userlog or notifications service code.
|
||||
|
||||
* Use `"github.com/owncloud/ocis/v2/ocis-pkg/l10n"` for the translation.\
|
||||
Use `l10n.Template` to define the translation string.\
|
||||
Use `l10n.NewTranslator` or `l10n.NewTranslatorFromCommonConfig` to get the translator.\
|
||||
Use `t.Get` to translate the string. See package for more advanced usage.
|
||||
|
||||
* Create a config in `services/<service-name>/pkg/service/l10n/.tx/config` with the following content. Note that it is important to stick with `ocis-<service-name>` to easily identify all ocis translations on Transifex:
|
||||
```
|
||||
@@ -46,9 +52,11 @@ Translations have a `context` and a `translatable string`. The context is shown
|
||||
```
|
||||
Note: o: organization, p: project, r: resource
|
||||
|
||||
* Create a go file like `templates.go` in `ocis/services/<service-name>/pkg/service` that will define your translation sources like the following:
|
||||
* Create an empty file `services/<service-name>/pkg/service/l10n/locale/en/LC_MESSAGES/<service-name>.po`. This is required for ocis to build. This file will be replaced nightly with the latest translations from Transifex.
|
||||
|
||||
* Create a go file like `templates.go` in e.g. `ocis/services/<service-name>/pkg/service` that will define your translation sources like the following:
|
||||
```
|
||||
// context string
|
||||
// this comment will appear in transifex as context
|
||||
var yourString = l10n.Template("Translation String")
|
||||
```
|
||||
|
||||
@@ -85,7 +93,7 @@ Translations have a `context` and a `translatable string`. The context is shown
|
||||
l10n-read: $(GO_XGETTEXT)
|
||||
go-xgettext -o $(OUTPUT_DIR)/<service-name>.pot \
|
||||
--keyword=l10n.Template --add-comments -s \
|
||||
ocis/services/<service-name>/pkg/service/templates.go
|
||||
pkg/service/templates.go
|
||||
|
||||
.PHONY: l10n-write
|
||||
l10n-write:
|
||||
|
||||
@@ -17,7 +17,7 @@ require (
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible
|
||||
github.com/coreos/go-oidc/v3 v3.11.0
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20241105092511-3ad35d174fc1
|
||||
github.com/cs3org/reva/v2 v2.27.0
|
||||
github.com/cs3org/reva/v2 v2.27.1-0.20250107124628-bd76241aa776
|
||||
github.com/davidbyttow/govips/v2 v2.15.0
|
||||
github.com/dhowden/tag v0.0.0-20240417053706-3d75831295e8
|
||||
github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e
|
||||
@@ -98,10 +98,10 @@ require (
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.32.0
|
||||
go.opentelemetry.io/otel/sdk v1.32.0
|
||||
go.opentelemetry.io/otel/trace v1.32.0
|
||||
golang.org/x/crypto v0.30.0
|
||||
golang.org/x/crypto v0.31.0
|
||||
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c
|
||||
golang.org/x/image v0.22.0
|
||||
golang.org/x/net v0.32.0
|
||||
golang.org/x/net v0.33.0
|
||||
golang.org/x/oauth2 v0.24.0
|
||||
golang.org/x/sync v0.10.0
|
||||
golang.org/x/term v0.27.0
|
||||
@@ -340,7 +340,7 @@ require (
|
||||
sigs.k8s.io/yaml v1.4.0 // indirect
|
||||
)
|
||||
|
||||
replace github.com/studio-b12/gowebdav => github.com/aduffeck/gowebdav v0.0.0-20231215102054-212d4a4374f6
|
||||
replace github.com/studio-b12/gowebdav => github.com/kobergj/gowebdav v0.0.0-20250102091030-aa65266db202
|
||||
|
||||
replace github.com/egirna/icap-client => github.com/fschade/icap-client v0.0.0-20240802074440-aade4a234387
|
||||
|
||||
|
||||
@@ -93,8 +93,6 @@ github.com/RoaringBitmap/roaring v1.9.3 h1:t4EbC5qQwnisr5PrP9nt0IRhRTb9gMUgQF4t4
|
||||
github.com/RoaringBitmap/roaring v1.9.3/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90=
|
||||
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
|
||||
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
|
||||
github.com/aduffeck/gowebdav v0.0.0-20231215102054-212d4a4374f6 h1:ws0yvsikTQdmheKINP16tBzAHdttrHwbz/q3Fgl9X1Y=
|
||||
github.com/aduffeck/gowebdav v0.0.0-20231215102054-212d4a4374f6/go.mod h1:bHA7t77X/QFExdeAnDzK6vKM34kEZAcE1OX4MfiwjkE=
|
||||
github.com/agnivade/levenshtein v1.2.0 h1:U9L4IOT0Y3i0TIlUIDJ7rVUziKi/zPbrJGaFrtYH3SY=
|
||||
github.com/agnivade/levenshtein v1.2.0/go.mod h1:QVVI16kDrtSuwcpd0p1+xMC6Z/VfhtCyDIjcwga4/DU=
|
||||
github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU=
|
||||
@@ -255,8 +253,8 @@ github.com/crewjam/saml v0.4.14 h1:g9FBNx62osKusnFzs3QTN5L9CVA/Egfgm+stJShzw/c=
|
||||
github.com/crewjam/saml v0.4.14/go.mod h1:UVSZCf18jJkk6GpWNVqcyQJMD5HsRugBPf4I1nl2mME=
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20241105092511-3ad35d174fc1 h1:RU6LT6mkD16xZs011+8foU7T3LrPvTTSWeTQ9OgfhkA=
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20241105092511-3ad35d174fc1/go.mod h1:DedpcqXl193qF/08Y04IO0PpxyyMu8+GrkD6kWK2MEQ=
|
||||
github.com/cs3org/reva/v2 v2.27.0 h1:Lq8VBRjQmyCfCO6+wC80Z4vH2Q1MfgORggg1e6mEcdM=
|
||||
github.com/cs3org/reva/v2 v2.27.0/go.mod h1:fJWmn7EkttWOWphZfiKdFOcHuthcUsU55aSN1VeTOhU=
|
||||
github.com/cs3org/reva/v2 v2.27.1-0.20250107124628-bd76241aa776 h1:tNLN9UCR9OHhZUHftWKfJyNPPaS0HaT0QOH4zGln/UE=
|
||||
github.com/cs3org/reva/v2 v2.27.1-0.20250107124628-bd76241aa776/go.mod h1:OrCNgIFkp3ROHiEjNCj8eZHACmYCD4owtFRuYFlYZkU=
|
||||
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
|
||||
github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg=
|
||||
github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=
|
||||
@@ -704,6 +702,8 @@ github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90
|
||||
github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||
github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM=
|
||||
github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
|
||||
github.com/kobergj/gowebdav v0.0.0-20250102091030-aa65266db202 h1:A1xJ2NKgiYFiaHiLl9B5yw/gUBACSs9crDykTS3GuQI=
|
||||
github.com/kobergj/gowebdav v0.0.0-20250102091030-aa65266db202/go.mod h1:bHA7t77X/QFExdeAnDzK6vKM34kEZAcE1OX4MfiwjkE=
|
||||
github.com/kobergj/plugins/v4/store/nats-js-kv v0.0.0-20240807130109-f62bb67e8c90 h1:pfI8Z5yavO6fU6vDGlWhZ4BgDlvj8c6xB7J57HfTPwA=
|
||||
github.com/kobergj/plugins/v4/store/nats-js-kv v0.0.0-20240807130109-f62bb67e8c90/go.mod h1:pjcozWijkNPbEtX5SIQaxEW/h8VAVZYTLx+70bmB3LY=
|
||||
github.com/kolo/xmlrpc v0.0.0-20200310150728-e0350524596b/go.mod h1:o03bZfuBwAXHetKXuInt4S7omeXUu62/A845kiycsSQ=
|
||||
@@ -1229,8 +1229,8 @@ golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU
|
||||
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
|
||||
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
|
||||
golang.org/x/crypto v0.30.0 h1:RwoQn3GkWiMkzlX562cLB7OxWvjH1L8xutO2WoJcRoY=
|
||||
golang.org/x/crypto v0.30.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
|
||||
golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
|
||||
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
@@ -1327,8 +1327,8 @@ golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
|
||||
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
|
||||
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
|
||||
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
|
||||
golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI=
|
||||
golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs=
|
||||
golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
|
||||
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
|
||||
@@ -11,7 +11,6 @@ import (
|
||||
"github.com/leonelquinteros/gotext"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/middleware"
|
||||
settingssvc "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/settings/v0"
|
||||
"github.com/owncloud/ocis/v2/services/settings/pkg/store/defaults"
|
||||
micrometadata "go-micro.dev/v4/metadata"
|
||||
)
|
||||
|
||||
@@ -140,7 +139,8 @@ func GetUserLocale(ctx context.Context, userID string, vc settingssvc.ValueServi
|
||||
micrometadata.Set(ctx, middleware.AccountID, userID),
|
||||
&settingssvc.GetValueByUniqueIdentifiersRequest{
|
||||
AccountUuid: userID,
|
||||
SettingId: defaults.SettingUUIDProfileLanguage,
|
||||
// this defaults.SettingUUIDProfileLanguage. Copied here to avoid import cycles.
|
||||
SettingId: "aa8cfbe5-95d4-4f7e-a032-c3c01f5f062f",
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
@@ -19,10 +19,6 @@
|
||||
<exclude name="Generic.WhiteSpace.DisallowTabIndent.NonIndentTabsUsed" />
|
||||
</rule>
|
||||
|
||||
<rule ref="Generic.Files.LineLength">
|
||||
<exclude name="Generic.Files.LineLength.TooLong" />
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR">
|
||||
<exclude name="Generic.Commenting.DocComment.ShortNotCapital" />
|
||||
<exclude name="Generic.Commenting.DocComment.SpacingAfter" />
|
||||
@@ -77,4 +73,18 @@
|
||||
<exclude-pattern>*/lib/storagewrapper.php</exclude-pattern>
|
||||
</rule>
|
||||
|
||||
<rule ref="Generic.Commenting.Todo">
|
||||
<message>Please review this TODO comment: %s</message>
|
||||
<type>error</type>
|
||||
</rule>
|
||||
<rule ref="Squiz.PHP.NonExecutableCode" />
|
||||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" />
|
||||
<rule ref="Generic.Files.LineLength">
|
||||
<properties>
|
||||
<property name="ignoreComments" value="true" />
|
||||
<type>error</type>
|
||||
<property name="lineLimit" value="120" />
|
||||
<property name="absoluteLineLimit" value="120" />
|
||||
</properties>
|
||||
</rule>
|
||||
</ruleset>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -478,6 +478,114 @@ func (m *ListOption) UnmarshalJSON(b []byte) error {
|
||||
|
||||
var _ json.Unmarshaler = (*ListOption)(nil)
|
||||
|
||||
// MultiChoiceCollectionJSONMarshaler describes the default jsonpb.Marshaler used by all
|
||||
// instances of MultiChoiceCollection. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var MultiChoiceCollectionJSONMarshaler = new(jsonpb.Marshaler)
|
||||
|
||||
// MarshalJSON satisfies the encoding/json Marshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly marshal the message.
|
||||
func (m *MultiChoiceCollection) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return json.Marshal(nil)
|
||||
}
|
||||
|
||||
buf := &bytes.Buffer{}
|
||||
|
||||
if err := MultiChoiceCollectionJSONMarshaler.Marshal(buf, m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
var _ json.Marshaler = (*MultiChoiceCollection)(nil)
|
||||
|
||||
// MultiChoiceCollectionJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all
|
||||
// instances of MultiChoiceCollection. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var MultiChoiceCollectionJSONUnmarshaler = new(jsonpb.Unmarshaler)
|
||||
|
||||
// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly unmarshal the message.
|
||||
func (m *MultiChoiceCollection) UnmarshalJSON(b []byte) error {
|
||||
return MultiChoiceCollectionJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m)
|
||||
}
|
||||
|
||||
var _ json.Unmarshaler = (*MultiChoiceCollection)(nil)
|
||||
|
||||
// MultiChoiceCollectionOptionJSONMarshaler describes the default jsonpb.Marshaler used by all
|
||||
// instances of MultiChoiceCollectionOption. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var MultiChoiceCollectionOptionJSONMarshaler = new(jsonpb.Marshaler)
|
||||
|
||||
// MarshalJSON satisfies the encoding/json Marshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly marshal the message.
|
||||
func (m *MultiChoiceCollectionOption) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return json.Marshal(nil)
|
||||
}
|
||||
|
||||
buf := &bytes.Buffer{}
|
||||
|
||||
if err := MultiChoiceCollectionOptionJSONMarshaler.Marshal(buf, m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
var _ json.Marshaler = (*MultiChoiceCollectionOption)(nil)
|
||||
|
||||
// MultiChoiceCollectionOptionJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all
|
||||
// instances of MultiChoiceCollectionOption. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var MultiChoiceCollectionOptionJSONUnmarshaler = new(jsonpb.Unmarshaler)
|
||||
|
||||
// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly unmarshal the message.
|
||||
func (m *MultiChoiceCollectionOption) UnmarshalJSON(b []byte) error {
|
||||
return MultiChoiceCollectionOptionJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m)
|
||||
}
|
||||
|
||||
var _ json.Unmarshaler = (*MultiChoiceCollectionOption)(nil)
|
||||
|
||||
// MultiChoiceCollectionOptionValueJSONMarshaler describes the default jsonpb.Marshaler used by all
|
||||
// instances of MultiChoiceCollectionOptionValue. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var MultiChoiceCollectionOptionValueJSONMarshaler = new(jsonpb.Marshaler)
|
||||
|
||||
// MarshalJSON satisfies the encoding/json Marshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly marshal the message.
|
||||
func (m *MultiChoiceCollectionOptionValue) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return json.Marshal(nil)
|
||||
}
|
||||
|
||||
buf := &bytes.Buffer{}
|
||||
|
||||
if err := MultiChoiceCollectionOptionValueJSONMarshaler.Marshal(buf, m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
var _ json.Marshaler = (*MultiChoiceCollectionOptionValue)(nil)
|
||||
|
||||
// MultiChoiceCollectionOptionValueJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all
|
||||
// instances of MultiChoiceCollectionOptionValue. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var MultiChoiceCollectionOptionValueJSONUnmarshaler = new(jsonpb.Unmarshaler)
|
||||
|
||||
// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly unmarshal the message.
|
||||
func (m *MultiChoiceCollectionOptionValue) UnmarshalJSON(b []byte) error {
|
||||
return MultiChoiceCollectionOptionValueJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m)
|
||||
}
|
||||
|
||||
var _ json.Unmarshaler = (*MultiChoiceCollectionOptionValue)(nil)
|
||||
|
||||
// PermissionJSONMarshaler describes the default jsonpb.Marshaler used by all
|
||||
// instances of Permission. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
@@ -621,3 +729,75 @@ func (m *ListOptionValue) UnmarshalJSON(b []byte) error {
|
||||
}
|
||||
|
||||
var _ json.Unmarshaler = (*ListOptionValue)(nil)
|
||||
|
||||
// CollectionValueJSONMarshaler describes the default jsonpb.Marshaler used by all
|
||||
// instances of CollectionValue. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var CollectionValueJSONMarshaler = new(jsonpb.Marshaler)
|
||||
|
||||
// MarshalJSON satisfies the encoding/json Marshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly marshal the message.
|
||||
func (m *CollectionValue) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return json.Marshal(nil)
|
||||
}
|
||||
|
||||
buf := &bytes.Buffer{}
|
||||
|
||||
if err := CollectionValueJSONMarshaler.Marshal(buf, m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
var _ json.Marshaler = (*CollectionValue)(nil)
|
||||
|
||||
// CollectionValueJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all
|
||||
// instances of CollectionValue. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var CollectionValueJSONUnmarshaler = new(jsonpb.Unmarshaler)
|
||||
|
||||
// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly unmarshal the message.
|
||||
func (m *CollectionValue) UnmarshalJSON(b []byte) error {
|
||||
return CollectionValueJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m)
|
||||
}
|
||||
|
||||
var _ json.Unmarshaler = (*CollectionValue)(nil)
|
||||
|
||||
// CollectionOptionJSONMarshaler describes the default jsonpb.Marshaler used by all
|
||||
// instances of CollectionOption. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var CollectionOptionJSONMarshaler = new(jsonpb.Marshaler)
|
||||
|
||||
// MarshalJSON satisfies the encoding/json Marshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly marshal the message.
|
||||
func (m *CollectionOption) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return json.Marshal(nil)
|
||||
}
|
||||
|
||||
buf := &bytes.Buffer{}
|
||||
|
||||
if err := CollectionOptionJSONMarshaler.Marshal(buf, m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
var _ json.Marshaler = (*CollectionOption)(nil)
|
||||
|
||||
// CollectionOptionJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all
|
||||
// instances of CollectionOption. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var CollectionOptionJSONUnmarshaler = new(jsonpb.Unmarshaler)
|
||||
|
||||
// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly unmarshal the message.
|
||||
func (m *CollectionOption) UnmarshalJSON(b []byte) error {
|
||||
return CollectionOptionJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m)
|
||||
}
|
||||
|
||||
var _ json.Unmarshaler = (*CollectionOption)(nil)
|
||||
@@ -157,9 +157,9 @@ var file_ocis_services_policies_v0_policies_proto_rawDesc = []byte{
|
||||
0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6f, 0x63, 0x69,
|
||||
0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63,
|
||||
0x69, 0x65, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x22,
|
||||
0x19, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65,
|
||||
0x73, 0x2f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x42, 0xe2, 0x02,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a,
|
||||
0x01, 0x2a, 0x22, 0x19, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x70, 0x6f, 0x6c, 0x69,
|
||||
0x63, 0x69, 0x65, 0x73, 0x2f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x42, 0xe2, 0x02,
|
||||
0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e,
|
||||
0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x67, 0x65, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x73, 0x65, 0x72,
|
||||
|
||||
@@ -468,17 +468,17 @@ var file_ocis_services_search_v0_search_proto_rawDesc = []byte{
|
||||
0x1a, 0x27, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
|
||||
0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63,
|
||||
0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02,
|
||||
0x1a, 0x22, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63,
|
||||
0x68, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x3a, 0x01, 0x2a, 0x12, 0x8c, 0x01, 0x0a, 0x0a,
|
||||
0x1a, 0x3a, 0x01, 0x2a, 0x22, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65,
|
||||
0x61, 0x72, 0x63, 0x68, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x8c, 0x01, 0x0a, 0x0a,
|
||||
0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2a, 0x2e, 0x6f, 0x63, 0x69,
|
||||
0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63,
|
||||
0x68, 0x2e, 0x76, 0x30, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x70, 0x61, 0x63, 0x65, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x30,
|
||||
0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x22, 0x1a, 0x2f, 0x61, 0x70,
|
||||
0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x69, 0x6e, 0x64, 0x65,
|
||||
0x78, 0x2d, 0x73, 0x70, 0x61, 0x63, 0x65, 0x3a, 0x01, 0x2a, 0x32, 0x9d, 0x01, 0x0a, 0x0d, 0x49,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a,
|
||||
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x69,
|
||||
0x6e, 0x64, 0x65, 0x78, 0x2d, 0x73, 0x70, 0x61, 0x63, 0x65, 0x32, 0x9d, 0x01, 0x0a, 0x0d, 0x49,
|
||||
0x6e, 0x64, 0x65, 0x78, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x8b, 0x01, 0x0a,
|
||||
0x06, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x2b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76,
|
||||
@@ -486,9 +486,9 @@ var file_ocis_services_search_v0_search_proto_rawDesc = []byte{
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x30, 0x2e, 0x53,
|
||||
0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69,
|
||||
0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78,
|
||||
0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x3a, 0x01, 0x2a, 0x42, 0xdc, 0x02, 0x5a, 0x3c, 0x67,
|
||||
0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f,
|
||||
0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x69, 0x6e,
|
||||
0x64, 0x65, 0x78, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x42, 0xdc, 0x02, 0x5a, 0x3c, 0x67,
|
||||
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f,
|
||||
0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e,
|
||||
0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
|
||||
@@ -1555,27 +1555,27 @@ var file_ocis_services_settings_v0_settings_proto_rawDesc = []byte{
|
||||
0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74,
|
||||
0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x42, 0x75, 0x6e,
|
||||
0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4,
|
||||
0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74,
|
||||
0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2d, 0x73, 0x61, 0x76,
|
||||
0x65, 0x3a, 0x01, 0x2a, 0x12, 0x8e, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64,
|
||||
0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f,
|
||||
0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2d,
|
||||
0x73, 0x61, 0x76, 0x65, 0x12, 0x8e, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64,
|
||||
0x6c, 0x65, 0x12, 0x2b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47,
|
||||
0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x2c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e,
|
||||
0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x42,
|
||||
0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82,
|
||||
0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73,
|
||||
0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2d, 0x67,
|
||||
0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x96, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75,
|
||||
0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76,
|
||||
0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c,
|
||||
0x65, 0x2d, 0x67, 0x65, 0x74, 0x12, 0x96, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75,
|
||||
0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76,
|
||||
0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30,
|
||||
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x22, 0x1d, 0x2f, 0x61,
|
||||
0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62,
|
||||
0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xb2,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22,
|
||||
0x1d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
|
||||
0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x12, 0xb2,
|
||||
0x01, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42,
|
||||
0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x34, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76,
|
||||
@@ -1584,20 +1584,20 @@ var file_ocis_services_settings_v0_settings_proto_rawDesc = []byte{
|
||||
0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69,
|
||||
0x6e, 0x67, 0x54, 0x6f, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x22, 0x24, 0x2f, 0x61, 0x70, 0x69,
|
||||
0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, 0x6e,
|
||||
0x64, 0x6c, 0x65, 0x73, 0x2d, 0x61, 0x64, 0x64, 0x2d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
|
||||
0x3a, 0x01, 0x2a, 0x12, 0xa0, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65,
|
||||
0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f,
|
||||
0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f,
|
||||
0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x2d, 0x61, 0x64, 0x64, 0x2d, 0x73, 0x65, 0x74, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x12, 0xa0, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65,
|
||||
0x74, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12,
|
||||
0x39, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e,
|
||||
0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x6d, 0x6f,
|
||||
0x76, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x75, 0x6e,
|
||||
0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
|
||||
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
|
||||
0x74, 0x79, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x22, 0x27, 0x2f, 0x61, 0x70, 0x69,
|
||||
0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, 0x6e,
|
||||
0x64, 0x6c, 0x65, 0x73, 0x2d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x2d, 0x73, 0x65, 0x74, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x3a, 0x01, 0x2a, 0x32, 0x8d, 0x05, 0x0a, 0x0c, 0x56, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x74, 0x79, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x3a, 0x01, 0x2a, 0x22, 0x27, 0x2f,
|
||||
0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f,
|
||||
0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x2d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x2d, 0x73,
|
||||
0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x32, 0x8d, 0x05, 0x0a, 0x0c, 0x56, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8f, 0x01, 0x0a, 0x09, 0x53, 0x61, 0x76, 0x65,
|
||||
0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76,
|
||||
@@ -1605,27 +1605,27 @@ var file_ocis_services_settings_v0_settings_proto_rawDesc = []byte{
|
||||
0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x53,
|
||||
0x61, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76,
|
||||
0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x73, 0x2d, 0x73, 0x61, 0x76, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x8b, 0x01, 0x0a, 0x08, 0x47, 0x65,
|
||||
0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x61, 0x70,
|
||||
0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61,
|
||||
0x6c, 0x75, 0x65, 0x73, 0x2d, 0x73, 0x61, 0x76, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x08, 0x47, 0x65,
|
||||
0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2a, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e,
|
||||
0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47,
|
||||
0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||
0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30,
|
||||
0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73,
|
||||
0x2d, 0x67, 0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x92, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69,
|
||||
0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x73, 0x2d, 0x67, 0x65, 0x74, 0x12, 0x92, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e,
|
||||
0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30,
|
||||
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, 0x70,
|
||||
0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61,
|
||||
0x6c, 0x75, 0x65, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xc7, 0x01, 0x0a,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c,
|
||||
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,
|
||||
0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x12, 0xc7, 0x01, 0x0a,
|
||||
0x1b, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x79, 0x55, 0x6e, 0x69, 0x71, 0x75,
|
||||
0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x12, 0x3d, 0x2e, 0x6f,
|
||||
0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74,
|
||||
@@ -1635,10 +1635,10 @@ var file_ocis_services_settings_v0_settings_proto_rawDesc = []byte{
|
||||
0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36,
|
||||
0x22, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e,
|
||||
0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2d, 0x67, 0x65, 0x74, 0x2d, 0x62, 0x79,
|
||||
0x2d, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x2d, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69,
|
||||
0x65, 0x72, 0x73, 0x3a, 0x01, 0x2a, 0x32, 0xe5, 0x06, 0x0a, 0x0b, 0x52, 0x6f, 0x6c, 0x65, 0x53,
|
||||
0x3a, 0x01, 0x2a, 0x22, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74,
|
||||
0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2d, 0x67, 0x65, 0x74,
|
||||
0x2d, 0x62, 0x79, 0x2d, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x2d, 0x69, 0x64, 0x65, 0x6e, 0x74,
|
||||
0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x32, 0xe5, 0x06, 0x0a, 0x0b, 0x52, 0x6f, 0x6c, 0x65, 0x53,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x52,
|
||||
0x6f, 0x6c, 0x65, 0x73, 0x12, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30,
|
||||
@@ -1646,9 +1646,9 @@ var file_ocis_services_settings_v0_settings_proto_rawDesc = []byte{
|
||||
0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, 0x70,
|
||||
0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x72, 0x6f,
|
||||
0x6c, 0x65, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xb2, 0x01, 0x0a, 0x13,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b,
|
||||
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,
|
||||
0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x12, 0xb2, 0x01, 0x0a, 0x13,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x73, 0x12, 0x35, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e,
|
||||
@@ -1657,9 +1657,9 @@ var file_ocis_services_settings_v0_settings_proto_rawDesc = []byte{
|
||||
0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69,
|
||||
0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x41,
|
||||
0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x22, 0x21, 0x2f, 0x61, 0x70, 0x69,
|
||||
0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x61, 0x73, 0x73,
|
||||
0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a,
|
||||
0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x3a, 0x01, 0x2a, 0x22, 0x21, 0x2f,
|
||||
0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f,
|
||||
0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74,
|
||||
0x12, 0xcb, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73,
|
||||
0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64,
|
||||
0x12, 0x3d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
|
||||
@@ -1669,10 +1669,10 @@ var file_ocis_services_settings_v0_settings_proto_rawDesc = []byte{
|
||||
0x36, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e,
|
||||
0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x52, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x22,
|
||||
0x2a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
|
||||
0x73, 0x2f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2d, 0x6c, 0x69,
|
||||
0x73, 0x74, 0x2d, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x3a, 0x01, 0x2a, 0x12, 0xa8,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x3a,
|
||||
0x01, 0x2a, 0x22, 0x2a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73,
|
||||
0x2d, 0x6c, 0x69, 0x73, 0x74, 0x2d, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x12, 0xa8,
|
||||
0x01, 0x0a, 0x10, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x55,
|
||||
0x73, 0x65, 0x72, 0x12, 0x32, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e,
|
||||
@@ -1681,18 +1681,18 @@ var file_ocis_services_settings_v0_settings_proto_rawDesc = []byte{
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,
|
||||
0x2e, 0x76, 0x30, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f,
|
||||
0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3,
|
||||
0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65,
|
||||
0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x73, 0x2d, 0x61, 0x64, 0x64, 0x3a, 0x01, 0x2a, 0x12, 0x92, 0x01, 0x0a, 0x12, 0x52, 0x65,
|
||||
0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30,
|
||||
0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2d, 0x61, 0x64, 0x64, 0x12, 0x92, 0x01, 0x0a, 0x12, 0x52, 0x65,
|
||||
0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72,
|
||||
0x12, 0x34, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
|
||||
0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x6d,
|
||||
0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2e,
|
||||
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x22, 0x23, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f,
|
||||
0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0x73, 0x2d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x3a, 0x01, 0x2a, 0x32, 0xc3,
|
||||
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x01, 0x2a, 0x22, 0x23, 0x2f, 0x61, 0x70, 0x69, 0x2f,
|
||||
0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x69,
|
||||
0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x32, 0xc3,
|
||||
0x04, 0x0a, 0x11, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x12, 0xa6, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72,
|
||||
0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x31, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e,
|
||||
@@ -1702,9 +1702,9 @@ var file_ocis_services_settings_v0_settings_proto_rawDesc = []byte{
|
||||
0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d,
|
||||
0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||
0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x22, 0x21, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30,
|
||||
0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xd0, 0x01,
|
||||
0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x3a, 0x01, 0x2a, 0x22, 0x21, 0x2f, 0x61, 0x70, 0x69,
|
||||
0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x70, 0x65, 0x72,
|
||||
0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x12, 0xd0, 0x01,
|
||||
0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3b, 0x2e, 0x6f, 0x63,
|
||||
0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74,
|
||||
@@ -1714,10 +1714,10 @@ var file_ocis_services_settings_v0_settings_proto_rawDesc = []byte{
|
||||
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
|
||||
0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x22, 0x2d,
|
||||
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,
|
||||
0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x6c, 0x69, 0x73,
|
||||
0x74, 0x2d, 0x62, 0x79, 0x2d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x01, 0x2a,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x3a, 0x01,
|
||||
0x2a, 0x22, 0x2d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69,
|
||||
0x6e, 0x67, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2d,
|
||||
0x6c, 0x69, 0x73, 0x74, 0x2d, 0x62, 0x79, 0x2d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
||||
0x12, 0xb1, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69,
|
||||
0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, 0x12, 0x33, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e,
|
||||
@@ -1726,10 +1726,10 @@ var file_ocis_services_settings_v0_settings_proto_rawDesc = []byte{
|
||||
0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69,
|
||||
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x22, 0x26, 0x2f, 0x61, 0x70, 0x69, 0x2f,
|
||||
0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x6d,
|
||||
0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x67, 0x65, 0x74, 0x2d, 0x62, 0x79, 0x2d, 0x69,
|
||||
0x64, 0x3a, 0x01, 0x2a, 0x42, 0xe3, 0x02, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
|
||||
0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x3a, 0x01, 0x2a, 0x22, 0x26, 0x2f, 0x61,
|
||||
0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x70,
|
||||
0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x67, 0x65, 0x74, 0x2d, 0x62,
|
||||
0x79, 0x2d, 0x69, 0x64, 0x42, 0xe3, 0x02, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
|
||||
0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69,
|
||||
0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6f,
|
||||
0x63, 0x69, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x73, 0x65, 0x74,
|
||||
|
||||
@@ -674,6 +674,10 @@
|
||||
"listValue": {
|
||||
"$ref": "#/definitions/settingsv0ListValue",
|
||||
"title": "@gotags: yaml:\"list_value\""
|
||||
},
|
||||
"collectionValue": {
|
||||
"$ref": "#/definitions/v0CollectionValue",
|
||||
"title": "@gotags: yaml:\"collection_value\""
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -774,6 +778,41 @@
|
||||
],
|
||||
"default": "TYPE_UNKNOWN"
|
||||
},
|
||||
"v0CollectionOption": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "@gotags: yaml:\"key\"",
|
||||
"title": "required"
|
||||
},
|
||||
"intValue": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "@gotags: yaml:\"int_value\""
|
||||
},
|
||||
"stringValue": {
|
||||
"type": "string",
|
||||
"title": "@gotags: yaml:\"string_value\""
|
||||
},
|
||||
"boolValue": {
|
||||
"type": "boolean",
|
||||
"title": "@gotags: yaml:\"bool_value\""
|
||||
}
|
||||
}
|
||||
},
|
||||
"v0CollectionValue": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"values": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v0CollectionOption"
|
||||
},
|
||||
"title": "@gotags: yaml:\"values\""
|
||||
}
|
||||
}
|
||||
},
|
||||
"v0GetBundleRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -926,6 +965,10 @@
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "@gotags: yaml:\"int_value\""
|
||||
},
|
||||
"boolValue": {
|
||||
"type": "boolean",
|
||||
"title": "@gotags: yaml:\"bool_value\""
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1019,6 +1062,56 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"v0MultiChoiceCollection": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"options": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v0MultiChoiceCollectionOption"
|
||||
},
|
||||
"title": "@gotags: yaml:\"options\""
|
||||
}
|
||||
}
|
||||
},
|
||||
"v0MultiChoiceCollectionOption": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"value": {
|
||||
"$ref": "#/definitions/v0MultiChoiceCollectionOptionValue",
|
||||
"title": "@gotags: yaml:\"value\""
|
||||
},
|
||||
"key": {
|
||||
"type": "string",
|
||||
"title": "@gotags: yaml:\"key\""
|
||||
},
|
||||
"attribute": {
|
||||
"type": "string",
|
||||
"title": "@gotags: yaml:\"attribute\""
|
||||
},
|
||||
"displayValue": {
|
||||
"type": "string",
|
||||
"title": "@gotags: yaml:\"display_value\""
|
||||
}
|
||||
}
|
||||
},
|
||||
"v0MultiChoiceCollectionOptionValue": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"intValue": {
|
||||
"$ref": "#/definitions/v0Int",
|
||||
"title": "@gotags: yaml:\"int_value\""
|
||||
},
|
||||
"stringValue": {
|
||||
"$ref": "#/definitions/v0String",
|
||||
"title": "@gotags: yaml:\"string_value\""
|
||||
},
|
||||
"boolValue": {
|
||||
"$ref": "#/definitions/v0Bool",
|
||||
"title": "@gotags: yaml:\"bool_value\""
|
||||
}
|
||||
}
|
||||
},
|
||||
"v0MultiChoiceList": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -1178,6 +1271,10 @@
|
||||
"$ref": "#/definitions/v0Permission",
|
||||
"title": "@gotags: yaml:\"permission_value\""
|
||||
},
|
||||
"multiChoiceCollectionValue": {
|
||||
"$ref": "#/definitions/v0MultiChoiceCollection",
|
||||
"title": "@gotags: yaml:\"multi_choice_collection_value\""
|
||||
},
|
||||
"resource": {
|
||||
"$ref": "#/definitions/v0Resource",
|
||||
"title": "@gotags: yaml:\"resource\""
|
||||
|
||||
@@ -0,0 +1,929 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc (unknown)
|
||||
// source: ocis/services/store/v0/store.proto
|
||||
|
||||
package v0
|
||||
|
||||
import (
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
v0 "github.com/owncloud/ocis/v2/protogen/gen/ocis/messages/store/v0"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type ReadRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Options *v0.ReadOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ReadRequest) Reset() {
|
||||
*x = ReadRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ocis_services_store_v0_store_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ReadRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ReadRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ReadRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ocis_services_store_v0_store_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ReadRequest) Descriptor() ([]byte, []int) {
|
||||
return file_ocis_services_store_v0_store_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ReadRequest) GetKey() string {
|
||||
if x != nil {
|
||||
return x.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ReadRequest) GetOptions() *v0.ReadOptions {
|
||||
if x != nil {
|
||||
return x.Options
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ReadResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Records []*v0.Record `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ReadResponse) Reset() {
|
||||
*x = ReadResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ocis_services_store_v0_store_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ReadResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ReadResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ReadResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ocis_services_store_v0_store_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ReadResponse) Descriptor() ([]byte, []int) {
|
||||
return file_ocis_services_store_v0_store_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *ReadResponse) GetRecords() []*v0.Record {
|
||||
if x != nil {
|
||||
return x.Records
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type WriteRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Record *v0.Record `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"`
|
||||
Options *v0.WriteOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
|
||||
}
|
||||
|
||||
func (x *WriteRequest) Reset() {
|
||||
*x = WriteRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ocis_services_store_v0_store_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *WriteRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*WriteRequest) ProtoMessage() {}
|
||||
|
||||
func (x *WriteRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ocis_services_store_v0_store_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use WriteRequest.ProtoReflect.Descriptor instead.
|
||||
func (*WriteRequest) Descriptor() ([]byte, []int) {
|
||||
return file_ocis_services_store_v0_store_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *WriteRequest) GetRecord() *v0.Record {
|
||||
if x != nil {
|
||||
return x.Record
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *WriteRequest) GetOptions() *v0.WriteOptions {
|
||||
if x != nil {
|
||||
return x.Options
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type WriteResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *WriteResponse) Reset() {
|
||||
*x = WriteResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ocis_services_store_v0_store_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *WriteResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*WriteResponse) ProtoMessage() {}
|
||||
|
||||
func (x *WriteResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ocis_services_store_v0_store_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use WriteResponse.ProtoReflect.Descriptor instead.
|
||||
func (*WriteResponse) Descriptor() ([]byte, []int) {
|
||||
return file_ocis_services_store_v0_store_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
type DeleteRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Options *v0.DeleteOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DeleteRequest) Reset() {
|
||||
*x = DeleteRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ocis_services_store_v0_store_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DeleteRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ocis_services_store_v0_store_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteRequest) Descriptor() ([]byte, []int) {
|
||||
return file_ocis_services_store_v0_store_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *DeleteRequest) GetKey() string {
|
||||
if x != nil {
|
||||
return x.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DeleteRequest) GetOptions() *v0.DeleteOptions {
|
||||
if x != nil {
|
||||
return x.Options
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeleteResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *DeleteResponse) Reset() {
|
||||
*x = DeleteResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ocis_services_store_v0_store_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DeleteResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ocis_services_store_v0_store_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteResponse) Descriptor() ([]byte, []int) {
|
||||
return file_ocis_services_store_v0_store_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
type ListRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Options *v0.ListOptions `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListRequest) Reset() {
|
||||
*x = ListRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ocis_services_store_v0_store_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ListRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ocis_services_store_v0_store_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListRequest) Descriptor() ([]byte, []int) {
|
||||
return file_ocis_services_store_v0_store_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *ListRequest) GetOptions() *v0.ListOptions {
|
||||
if x != nil {
|
||||
return x.Options
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ListResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Keys []string `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListResponse) Reset() {
|
||||
*x = ListResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ocis_services_store_v0_store_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ListResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ocis_services_store_v0_store_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListResponse) Descriptor() ([]byte, []int) {
|
||||
return file_ocis_services_store_v0_store_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *ListResponse) GetKeys() []string {
|
||||
if x != nil {
|
||||
return x.Keys
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DatabasesRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *DatabasesRequest) Reset() {
|
||||
*x = DatabasesRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ocis_services_store_v0_store_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DatabasesRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DatabasesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DatabasesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ocis_services_store_v0_store_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DatabasesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DatabasesRequest) Descriptor() ([]byte, []int) {
|
||||
return file_ocis_services_store_v0_store_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
type DatabasesResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Databases []string `protobuf:"bytes,1,rep,name=databases,proto3" json:"databases,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DatabasesResponse) Reset() {
|
||||
*x = DatabasesResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ocis_services_store_v0_store_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DatabasesResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DatabasesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DatabasesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ocis_services_store_v0_store_proto_msgTypes[9]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DatabasesResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DatabasesResponse) Descriptor() ([]byte, []int) {
|
||||
return file_ocis_services_store_v0_store_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *DatabasesResponse) GetDatabases() []string {
|
||||
if x != nil {
|
||||
return x.Databases
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type TablesRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"`
|
||||
}
|
||||
|
||||
func (x *TablesRequest) Reset() {
|
||||
*x = TablesRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ocis_services_store_v0_store_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *TablesRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TablesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *TablesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ocis_services_store_v0_store_proto_msgTypes[10]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use TablesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*TablesRequest) Descriptor() ([]byte, []int) {
|
||||
return file_ocis_services_store_v0_store_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *TablesRequest) GetDatabase() string {
|
||||
if x != nil {
|
||||
return x.Database
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type TablesResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Tables []string `protobuf:"bytes,1,rep,name=tables,proto3" json:"tables,omitempty"`
|
||||
}
|
||||
|
||||
func (x *TablesResponse) Reset() {
|
||||
*x = TablesResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ocis_services_store_v0_store_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *TablesResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TablesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *TablesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ocis_services_store_v0_store_proto_msgTypes[11]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use TablesResponse.ProtoReflect.Descriptor instead.
|
||||
func (*TablesResponse) Descriptor() ([]byte, []int) {
|
||||
return file_ocis_services_store_v0_store_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
func (x *TablesResponse) GetTables() []string {
|
||||
if x != nil {
|
||||
return x.Tables
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_ocis_services_store_v0_store_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_ocis_services_store_v0_store_proto_rawDesc = []byte{
|
||||
0x0a, 0x22, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f,
|
||||
0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x1a, 0x22, 0x6f, 0x63,
|
||||
0x69, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72,
|
||||
0x65, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65,
|
||||
0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61,
|
||||
0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x22, 0x5e, 0x0a, 0x0b, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
|
||||
0x79, 0x12, 0x3d, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
||||
0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x61, 0x64,
|
||||
0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
|
||||
0x22, 0x48, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x38, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
||||
0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72,
|
||||
0x64, 0x52, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x86, 0x01, 0x0a, 0x0c, 0x57,
|
||||
0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x72,
|
||||
0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x63,
|
||||
0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72,
|
||||
0x65, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63,
|
||||
0x6f, 0x72, 0x64, 0x12, 0x3e, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73,
|
||||
0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x57, 0x72,
|
||||
0x69, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x73, 0x22, 0x0f, 0x0a, 0x0d, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x62, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e,
|
||||
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76,
|
||||
0x30, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52,
|
||||
0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x10, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4c, 0x0a, 0x0b, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x07, 0x6f, 0x70, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x63, 0x69,
|
||||
0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65,
|
||||
0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52,
|
||||
0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x28, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73,
|
||||
0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x4a, 0x04, 0x08, 0x01,
|
||||
0x10, 0x02, 0x22, 0x12, 0x0a, 0x10, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x31, 0x0a, 0x11, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61,
|
||||
0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64,
|
||||
0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09,
|
||||
0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x22, 0x2b, 0x0a, 0x0d, 0x54, 0x61, 0x62,
|
||||
0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61,
|
||||
0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61,
|
||||
0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x22, 0x28, 0x0a, 0x0e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c,
|
||||
0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73,
|
||||
0x32, 0xa5, 0x04, 0x0a, 0x05, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x53, 0x0a, 0x04, 0x52, 0x65,
|
||||
0x61, 0x64, 0x12, 0x23, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x61, 0x64,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30,
|
||||
0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
|
||||
0x56, 0x0a, 0x05, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x24, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e,
|
||||
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76,
|
||||
0x30, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25,
|
||||
0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73,
|
||||
0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x65, 0x12, 0x25, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e,
|
||||
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76,
|
||||
0x30, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x22, 0x00, 0x12, 0x55, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x23, 0x2e, 0x6f, 0x63, 0x69,
|
||||
0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65,
|
||||
0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x24, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e,
|
||||
0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x62, 0x0a, 0x09, 0x44, 0x61, 0x74,
|
||||
0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x12, 0x28, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e,
|
||||
0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x29, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
|
||||
0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61,
|
||||
0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a,
|
||||
0x06, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30,
|
||||
0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26,
|
||||
0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73,
|
||||
0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xd9, 0x02, 0x5a, 0x3b, 0x67, 0x69, 0x74,
|
||||
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64,
|
||||
0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x67,
|
||||
0x65, 0x6e, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
|
||||
0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x30, 0x92, 0x41, 0x98, 0x02, 0x12, 0xb3, 0x01, 0x0a,
|
||||
0x1d, 0x6f, 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x49, 0x6e, 0x66, 0x69, 0x6e, 0x69,
|
||||
0x74, 0x65, 0x20, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0x47,
|
||||
0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x47, 0x6d, 0x62, 0x48, 0x12,
|
||||
0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
|
||||
0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69,
|
||||
0x73, 0x1a, 0x14, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x40, 0x6f, 0x77, 0x6e, 0x63, 0x6c,
|
||||
0x6f, 0x75, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x2a, 0x42, 0x0a, 0x0a, 0x41, 0x70, 0x61, 0x63, 0x68,
|
||||
0x65, 0x2d, 0x32, 0x2e, 0x30, 0x12, 0x34, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67,
|
||||
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f,
|
||||
0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73,
|
||||
0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x05, 0x31, 0x2e, 0x30,
|
||||
0x2e, 0x30, 0x2a, 0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x72, 0x38, 0x0a, 0x10, 0x44, 0x65,
|
||||
0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x20, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x12, 0x24,
|
||||
0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64,
|
||||
0x2e, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x73, 0x74,
|
||||
0x6f, 0x72, 0x65, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_ocis_services_store_v0_store_proto_rawDescOnce sync.Once
|
||||
file_ocis_services_store_v0_store_proto_rawDescData = file_ocis_services_store_v0_store_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_ocis_services_store_v0_store_proto_rawDescGZIP() []byte {
|
||||
file_ocis_services_store_v0_store_proto_rawDescOnce.Do(func() {
|
||||
file_ocis_services_store_v0_store_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_services_store_v0_store_proto_rawDescData)
|
||||
})
|
||||
return file_ocis_services_store_v0_store_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_ocis_services_store_v0_store_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
|
||||
var file_ocis_services_store_v0_store_proto_goTypes = []interface{}{
|
||||
(*ReadRequest)(nil), // 0: ocis.services.store.v0.ReadRequest
|
||||
(*ReadResponse)(nil), // 1: ocis.services.store.v0.ReadResponse
|
||||
(*WriteRequest)(nil), // 2: ocis.services.store.v0.WriteRequest
|
||||
(*WriteResponse)(nil), // 3: ocis.services.store.v0.WriteResponse
|
||||
(*DeleteRequest)(nil), // 4: ocis.services.store.v0.DeleteRequest
|
||||
(*DeleteResponse)(nil), // 5: ocis.services.store.v0.DeleteResponse
|
||||
(*ListRequest)(nil), // 6: ocis.services.store.v0.ListRequest
|
||||
(*ListResponse)(nil), // 7: ocis.services.store.v0.ListResponse
|
||||
(*DatabasesRequest)(nil), // 8: ocis.services.store.v0.DatabasesRequest
|
||||
(*DatabasesResponse)(nil), // 9: ocis.services.store.v0.DatabasesResponse
|
||||
(*TablesRequest)(nil), // 10: ocis.services.store.v0.TablesRequest
|
||||
(*TablesResponse)(nil), // 11: ocis.services.store.v0.TablesResponse
|
||||
(*v0.ReadOptions)(nil), // 12: ocis.messages.store.v0.ReadOptions
|
||||
(*v0.Record)(nil), // 13: ocis.messages.store.v0.Record
|
||||
(*v0.WriteOptions)(nil), // 14: ocis.messages.store.v0.WriteOptions
|
||||
(*v0.DeleteOptions)(nil), // 15: ocis.messages.store.v0.DeleteOptions
|
||||
(*v0.ListOptions)(nil), // 16: ocis.messages.store.v0.ListOptions
|
||||
}
|
||||
var file_ocis_services_store_v0_store_proto_depIdxs = []int32{
|
||||
12, // 0: ocis.services.store.v0.ReadRequest.options:type_name -> ocis.messages.store.v0.ReadOptions
|
||||
13, // 1: ocis.services.store.v0.ReadResponse.records:type_name -> ocis.messages.store.v0.Record
|
||||
13, // 2: ocis.services.store.v0.WriteRequest.record:type_name -> ocis.messages.store.v0.Record
|
||||
14, // 3: ocis.services.store.v0.WriteRequest.options:type_name -> ocis.messages.store.v0.WriteOptions
|
||||
15, // 4: ocis.services.store.v0.DeleteRequest.options:type_name -> ocis.messages.store.v0.DeleteOptions
|
||||
16, // 5: ocis.services.store.v0.ListRequest.options:type_name -> ocis.messages.store.v0.ListOptions
|
||||
0, // 6: ocis.services.store.v0.Store.Read:input_type -> ocis.services.store.v0.ReadRequest
|
||||
2, // 7: ocis.services.store.v0.Store.Write:input_type -> ocis.services.store.v0.WriteRequest
|
||||
4, // 8: ocis.services.store.v0.Store.Delete:input_type -> ocis.services.store.v0.DeleteRequest
|
||||
6, // 9: ocis.services.store.v0.Store.List:input_type -> ocis.services.store.v0.ListRequest
|
||||
8, // 10: ocis.services.store.v0.Store.Databases:input_type -> ocis.services.store.v0.DatabasesRequest
|
||||
10, // 11: ocis.services.store.v0.Store.Tables:input_type -> ocis.services.store.v0.TablesRequest
|
||||
1, // 12: ocis.services.store.v0.Store.Read:output_type -> ocis.services.store.v0.ReadResponse
|
||||
3, // 13: ocis.services.store.v0.Store.Write:output_type -> ocis.services.store.v0.WriteResponse
|
||||
5, // 14: ocis.services.store.v0.Store.Delete:output_type -> ocis.services.store.v0.DeleteResponse
|
||||
7, // 15: ocis.services.store.v0.Store.List:output_type -> ocis.services.store.v0.ListResponse
|
||||
9, // 16: ocis.services.store.v0.Store.Databases:output_type -> ocis.services.store.v0.DatabasesResponse
|
||||
11, // 17: ocis.services.store.v0.Store.Tables:output_type -> ocis.services.store.v0.TablesResponse
|
||||
12, // [12:18] is the sub-list for method output_type
|
||||
6, // [6:12] is the sub-list for method input_type
|
||||
6, // [6:6] is the sub-list for extension type_name
|
||||
6, // [6:6] is the sub-list for extension extendee
|
||||
0, // [0:6] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_ocis_services_store_v0_store_proto_init() }
|
||||
func file_ocis_services_store_v0_store_proto_init() {
|
||||
if File_ocis_services_store_v0_store_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_ocis_services_store_v0_store_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ReadRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_ocis_services_store_v0_store_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ReadResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_ocis_services_store_v0_store_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WriteRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_ocis_services_store_v0_store_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WriteResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_ocis_services_store_v0_store_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_ocis_services_store_v0_store_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_ocis_services_store_v0_store_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_ocis_services_store_v0_store_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_ocis_services_store_v0_store_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DatabasesRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_ocis_services_store_v0_store_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DatabasesResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_ocis_services_store_v0_store_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TablesRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_ocis_services_store_v0_store_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TablesResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_ocis_services_store_v0_store_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 12,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_ocis_services_store_v0_store_proto_goTypes,
|
||||
DependencyIndexes: file_ocis_services_store_v0_store_proto_depIdxs,
|
||||
MessageInfos: file_ocis_services_store_v0_store_proto_msgTypes,
|
||||
}.Build()
|
||||
File_ocis_services_store_v0_store_proto = out.File
|
||||
file_ocis_services_store_v0_store_proto_rawDesc = nil
|
||||
file_ocis_services_store_v0_store_proto_goTypes = nil
|
||||
file_ocis_services_store_v0_store_proto_depIdxs = nil
|
||||
}
|
||||
@@ -0,0 +1,254 @@
|
||||
// Code generated by protoc-gen-micro. DO NOT EDIT.
|
||||
// source: ocis/services/store/v0/store.proto
|
||||
|
||||
package v0
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
_ "github.com/owncloud/ocis/v2/protogen/gen/ocis/messages/store/v0"
|
||||
proto "google.golang.org/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
|
||||
import (
|
||||
context "context"
|
||||
api "go-micro.dev/v4/api"
|
||||
client "go-micro.dev/v4/client"
|
||||
server "go-micro.dev/v4/server"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ api.Endpoint
|
||||
var _ context.Context
|
||||
var _ client.Option
|
||||
var _ server.Option
|
||||
|
||||
// Api Endpoints for Store service
|
||||
|
||||
func NewStoreEndpoints() []*api.Endpoint {
|
||||
return []*api.Endpoint{}
|
||||
}
|
||||
|
||||
// Client API for Store service
|
||||
|
||||
type StoreService interface {
|
||||
Read(ctx context.Context, in *ReadRequest, opts ...client.CallOption) (*ReadResponse, error)
|
||||
Write(ctx context.Context, in *WriteRequest, opts ...client.CallOption) (*WriteResponse, error)
|
||||
Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error)
|
||||
List(ctx context.Context, in *ListRequest, opts ...client.CallOption) (Store_ListService, error)
|
||||
Databases(ctx context.Context, in *DatabasesRequest, opts ...client.CallOption) (*DatabasesResponse, error)
|
||||
Tables(ctx context.Context, in *TablesRequest, opts ...client.CallOption) (*TablesResponse, error)
|
||||
}
|
||||
|
||||
type storeService struct {
|
||||
c client.Client
|
||||
name string
|
||||
}
|
||||
|
||||
func NewStoreService(name string, c client.Client) StoreService {
|
||||
return &storeService{
|
||||
c: c,
|
||||
name: name,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *storeService) Read(ctx context.Context, in *ReadRequest, opts ...client.CallOption) (*ReadResponse, error) {
|
||||
req := c.c.NewRequest(c.name, "Store.Read", in)
|
||||
out := new(ReadResponse)
|
||||
err := c.c.Call(ctx, req, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *storeService) Write(ctx context.Context, in *WriteRequest, opts ...client.CallOption) (*WriteResponse, error) {
|
||||
req := c.c.NewRequest(c.name, "Store.Write", in)
|
||||
out := new(WriteResponse)
|
||||
err := c.c.Call(ctx, req, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *storeService) Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error) {
|
||||
req := c.c.NewRequest(c.name, "Store.Delete", in)
|
||||
out := new(DeleteResponse)
|
||||
err := c.c.Call(ctx, req, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *storeService) List(ctx context.Context, in *ListRequest, opts ...client.CallOption) (Store_ListService, error) {
|
||||
req := c.c.NewRequest(c.name, "Store.List", &ListRequest{})
|
||||
stream, err := c.c.Stream(ctx, req, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := stream.Send(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &storeServiceList{stream}, nil
|
||||
}
|
||||
|
||||
type Store_ListService interface {
|
||||
Context() context.Context
|
||||
SendMsg(interface{}) error
|
||||
RecvMsg(interface{}) error
|
||||
CloseSend() error
|
||||
Close() error
|
||||
Recv() (*ListResponse, error)
|
||||
}
|
||||
|
||||
type storeServiceList struct {
|
||||
stream client.Stream
|
||||
}
|
||||
|
||||
func (x *storeServiceList) CloseSend() error {
|
||||
return x.stream.CloseSend()
|
||||
}
|
||||
|
||||
func (x *storeServiceList) Close() error {
|
||||
return x.stream.Close()
|
||||
}
|
||||
|
||||
func (x *storeServiceList) Context() context.Context {
|
||||
return x.stream.Context()
|
||||
}
|
||||
|
||||
func (x *storeServiceList) SendMsg(m interface{}) error {
|
||||
return x.stream.Send(m)
|
||||
}
|
||||
|
||||
func (x *storeServiceList) RecvMsg(m interface{}) error {
|
||||
return x.stream.Recv(m)
|
||||
}
|
||||
|
||||
func (x *storeServiceList) Recv() (*ListResponse, error) {
|
||||
m := new(ListResponse)
|
||||
err := x.stream.Recv(m)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *storeService) Databases(ctx context.Context, in *DatabasesRequest, opts ...client.CallOption) (*DatabasesResponse, error) {
|
||||
req := c.c.NewRequest(c.name, "Store.Databases", in)
|
||||
out := new(DatabasesResponse)
|
||||
err := c.c.Call(ctx, req, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *storeService) Tables(ctx context.Context, in *TablesRequest, opts ...client.CallOption) (*TablesResponse, error) {
|
||||
req := c.c.NewRequest(c.name, "Store.Tables", in)
|
||||
out := new(TablesResponse)
|
||||
err := c.c.Call(ctx, req, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Server API for Store service
|
||||
|
||||
type StoreHandler interface {
|
||||
Read(context.Context, *ReadRequest, *ReadResponse) error
|
||||
Write(context.Context, *WriteRequest, *WriteResponse) error
|
||||
Delete(context.Context, *DeleteRequest, *DeleteResponse) error
|
||||
List(context.Context, *ListRequest, Store_ListStream) error
|
||||
Databases(context.Context, *DatabasesRequest, *DatabasesResponse) error
|
||||
Tables(context.Context, *TablesRequest, *TablesResponse) error
|
||||
}
|
||||
|
||||
func RegisterStoreHandler(s server.Server, hdlr StoreHandler, opts ...server.HandlerOption) error {
|
||||
type store interface {
|
||||
Read(ctx context.Context, in *ReadRequest, out *ReadResponse) error
|
||||
Write(ctx context.Context, in *WriteRequest, out *WriteResponse) error
|
||||
Delete(ctx context.Context, in *DeleteRequest, out *DeleteResponse) error
|
||||
List(ctx context.Context, stream server.Stream) error
|
||||
Databases(ctx context.Context, in *DatabasesRequest, out *DatabasesResponse) error
|
||||
Tables(ctx context.Context, in *TablesRequest, out *TablesResponse) error
|
||||
}
|
||||
type Store struct {
|
||||
store
|
||||
}
|
||||
h := &storeHandler{hdlr}
|
||||
return s.Handle(s.NewHandler(&Store{h}, opts...))
|
||||
}
|
||||
|
||||
type storeHandler struct {
|
||||
StoreHandler
|
||||
}
|
||||
|
||||
func (h *storeHandler) Read(ctx context.Context, in *ReadRequest, out *ReadResponse) error {
|
||||
return h.StoreHandler.Read(ctx, in, out)
|
||||
}
|
||||
|
||||
func (h *storeHandler) Write(ctx context.Context, in *WriteRequest, out *WriteResponse) error {
|
||||
return h.StoreHandler.Write(ctx, in, out)
|
||||
}
|
||||
|
||||
func (h *storeHandler) Delete(ctx context.Context, in *DeleteRequest, out *DeleteResponse) error {
|
||||
return h.StoreHandler.Delete(ctx, in, out)
|
||||
}
|
||||
|
||||
func (h *storeHandler) List(ctx context.Context, stream server.Stream) error {
|
||||
m := new(ListRequest)
|
||||
if err := stream.Recv(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return h.StoreHandler.List(ctx, m, &storeListStream{stream})
|
||||
}
|
||||
|
||||
type Store_ListStream interface {
|
||||
Context() context.Context
|
||||
SendMsg(interface{}) error
|
||||
RecvMsg(interface{}) error
|
||||
Close() error
|
||||
Send(*ListResponse) error
|
||||
}
|
||||
|
||||
type storeListStream struct {
|
||||
stream server.Stream
|
||||
}
|
||||
|
||||
func (x *storeListStream) Close() error {
|
||||
return x.stream.Close()
|
||||
}
|
||||
|
||||
func (x *storeListStream) Context() context.Context {
|
||||
return x.stream.Context()
|
||||
}
|
||||
|
||||
func (x *storeListStream) SendMsg(m interface{}) error {
|
||||
return x.stream.Send(m)
|
||||
}
|
||||
|
||||
func (x *storeListStream) RecvMsg(m interface{}) error {
|
||||
return x.stream.Recv(m)
|
||||
}
|
||||
|
||||
func (x *storeListStream) Send(m *ListResponse) error {
|
||||
return x.stream.Send(m)
|
||||
}
|
||||
|
||||
func (h *storeHandler) Databases(ctx context.Context, in *DatabasesRequest, out *DatabasesResponse) error {
|
||||
return h.StoreHandler.Databases(ctx, in, out)
|
||||
}
|
||||
|
||||
func (h *storeHandler) Tables(ctx context.Context, in *TablesRequest, out *TablesResponse) error {
|
||||
return h.StoreHandler.Tables(ctx, in, out)
|
||||
}
|
||||
@@ -0,0 +1,242 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "ownCloud Infinite Scale store",
|
||||
"version": "1.0.0",
|
||||
"contact": {
|
||||
"name": "ownCloud GmbH",
|
||||
"url": "https://github.com/owncloud/ocis",
|
||||
"email": "support@owncloud.com"
|
||||
},
|
||||
"license": {
|
||||
"name": "Apache-2.0",
|
||||
"url": "https://github.com/owncloud/ocis/blob/master/LICENSE"
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "Store"
|
||||
}
|
||||
],
|
||||
"schemes": [
|
||||
"http",
|
||||
"https"
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {},
|
||||
"definitions": {
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"@type": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v0DatabasesResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"databases": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v0DeleteOptions": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"database": {
|
||||
"type": "string"
|
||||
},
|
||||
"table": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v0DeleteResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
"v0Field": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"title": "type of value e.g string, int, int64, bool, float64"
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"title": "the actual value"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v0ListOptions": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"database": {
|
||||
"type": "string"
|
||||
},
|
||||
"table": {
|
||||
"type": "string"
|
||||
},
|
||||
"prefix": {
|
||||
"type": "string"
|
||||
},
|
||||
"suffix": {
|
||||
"type": "string"
|
||||
},
|
||||
"limit": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"offset": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v0ListResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"keys": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v0ReadOptions": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"database": {
|
||||
"type": "string"
|
||||
},
|
||||
"table": {
|
||||
"type": "string"
|
||||
},
|
||||
"prefix": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"suffix": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"limit": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"offset": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"where": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/definitions/v0Field"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v0ReadResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"records": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v0Record"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v0Record": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string",
|
||||
"title": "key of the recorda"
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"format": "byte",
|
||||
"title": "value in the record"
|
||||
},
|
||||
"expiry": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "time.Duration (signed int64 nanoseconds)"
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/definitions/v0Field"
|
||||
},
|
||||
"title": "the associated metadata"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v0TablesResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"tables": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v0WriteOptions": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"database": {
|
||||
"type": "string"
|
||||
},
|
||||
"table": {
|
||||
"type": "string"
|
||||
},
|
||||
"expiry": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "time.Time"
|
||||
},
|
||||
"ttl": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "time.Duration"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v0WriteResponse": {
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"externalDocs": {
|
||||
"description": "Developer Manual",
|
||||
"url": "https://owncloud.dev/services/store/"
|
||||
}
|
||||
}
|
||||
@@ -94,6 +94,7 @@ message Setting {
|
||||
SingleChoiceList single_choice_value = 8; // @gotags: yaml:"single_choice_value"
|
||||
MultiChoiceList multi_choice_value = 9; // @gotags: yaml:"multi_choice_value"
|
||||
Permission permission_value = 10; // @gotags: yaml:"permission_value"
|
||||
MultiChoiceCollection multi_choice_collection_value = 12; // @gotags: yaml:"multi_choice_collection_value"
|
||||
}
|
||||
Resource resource = 11; // @gotags: yaml:"resource"
|
||||
}
|
||||
@@ -133,6 +134,25 @@ message ListOption {
|
||||
string display_value = 3; // @gotags: yaml:"display_value"
|
||||
}
|
||||
|
||||
message MultiChoiceCollection {
|
||||
repeated MultiChoiceCollectionOption options = 1; // @gotags: yaml:"options"
|
||||
}
|
||||
|
||||
message MultiChoiceCollectionOption {
|
||||
MultiChoiceCollectionOptionValue value = 1; // @gotags: yaml:"value"
|
||||
string key = 2; // @gotags: yaml:"key"
|
||||
string attribute = 3; // @gotags: yaml:"attribute"
|
||||
string display_value = 4; // @gotags: yaml:"display_value"
|
||||
}
|
||||
|
||||
message MultiChoiceCollectionOptionValue {
|
||||
oneof option {
|
||||
Int int_value = 1; // @gotags: yaml:"int_value"
|
||||
String string_value = 2; // @gotags: yaml:"string_value"
|
||||
Bool bool_value = 3; // @gotags: yaml:"bool_value"
|
||||
}
|
||||
}
|
||||
|
||||
message Permission {
|
||||
enum Operation {
|
||||
OPERATION_UNKNOWN = 0;
|
||||
@@ -170,6 +190,7 @@ message Value {
|
||||
int64 int_value = 7; // @gotags: yaml:"int_value"
|
||||
string string_value = 8; // @gotags: yaml:"string_value"
|
||||
ListValue list_value = 9; // @gotags: yaml:"list_value"
|
||||
CollectionValue collection_value = 10; // @gotags: yaml:"collection_value"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,5 +202,20 @@ message ListOptionValue {
|
||||
oneof option {
|
||||
string string_value = 1; // @gotags: yaml:"string_value"
|
||||
int64 int_value = 2; // @gotags: yaml:"int_value"
|
||||
bool bool_value = 3; // @gotags: yaml:"bool_value"
|
||||
}
|
||||
}
|
||||
|
||||
message CollectionValue {
|
||||
repeated CollectionOption values = 1; // @gotags: yaml:"values"
|
||||
}
|
||||
|
||||
message CollectionOption {
|
||||
// required
|
||||
string key = 1; // @gotags: yaml:"key"
|
||||
oneof option {
|
||||
int64 int_value = 2; // @gotags: yaml:"int_value"
|
||||
string string_value = 3; // @gotags: yaml:"string_value"
|
||||
bool bool_value = 4; // @gotags: yaml:"bool_value"
|
||||
}
|
||||
}
|
||||
@@ -168,6 +168,7 @@ message GetBundleResponse {
|
||||
|
||||
message ListBundlesRequest {
|
||||
repeated string bundle_ids = 1;
|
||||
string locale = 2;
|
||||
}
|
||||
|
||||
message ListBundlesResponse {
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-11-30 00:18+0000\n"
|
||||
"POT-Creation-Date: 2024-12-20 00:46+0000\n"
|
||||
"PO-Revision-Date: 2024-08-20 10:13+0000\n"
|
||||
"Last-Translator: Martin <github@diemattels.at>, 2024\n"
|
||||
"Language-Team: German (https://app.transifex.com/owncloud-org/teams/6149/de/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-08 00:19+0000\n"
|
||||
"POT-Creation-Date: 2024-12-29 00:04+0000\n"
|
||||
"PO-Revision-Date: 2024-08-20 10:13+0000\n"
|
||||
"Last-Translator: Andi Chandler <andi@gowling.com>, 2024\n"
|
||||
"Language-Team: English (United Kingdom) (https://app.transifex.com/owncloud-org/teams/6149/en_GB/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-16 00:19+0000\n"
|
||||
"POT-Creation-Date: 2025-01-06 00:03+0000\n"
|
||||
"PO-Revision-Date: 2024-08-20 10:13+0000\n"
|
||||
"Last-Translator: Jesús Recio <jrecio@solidgear.es>, 2024\n"
|
||||
"Language-Team: Spanish (https://app.transifex.com/owncloud-org/teams/6149/es/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-12 00:51+0000\n"
|
||||
"POT-Creation-Date: 2025-01-02 00:05+0000\n"
|
||||
"PO-Revision-Date: 2024-08-20 10:13+0000\n"
|
||||
"Last-Translator: hoshi1800 <hoshi1800@gmail.com>, 2024\n"
|
||||
"Language-Team: Japanese (Japan) (https://app.transifex.com/owncloud-org/teams/6149/ja_JP/)\n"
|
||||
|
||||
@@ -12,7 +12,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-14 00:17+0000\n"
|
||||
"POT-Creation-Date: 2025-01-04 00:05+0000\n"
|
||||
"PO-Revision-Date: 2024-08-20 10:13+0000\n"
|
||||
"Last-Translator: Flávio Veras <flaviove@gmail.com>, 2024\n"
|
||||
"Language-Team: Portuguese (Brazil) (https://app.transifex.com/owncloud-org/teams/6149/pt_BR/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-11-28 00:19+0000\n"
|
||||
"POT-Creation-Date: 2025-01-08 04:19+0000\n"
|
||||
"PO-Revision-Date: 2024-08-20 10:13+0000\n"
|
||||
"Last-Translator: Viktor Scharf, 2024\n"
|
||||
"Language-Team: Russian (https://app.transifex.com/owncloud-org/teams/6149/ru/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-11-29 00:18+0000\n"
|
||||
"POT-Creation-Date: 2025-01-08 04:19+0000\n"
|
||||
"PO-Revision-Date: 2024-08-20 10:13+0000\n"
|
||||
"Last-Translator: Besnik Bleta <besnik@programeshqip.org>, 2024\n"
|
||||
"Language-Team: Albanian (https://app.transifex.com/owncloud-org/teams/6149/sq/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-15 00:43+0000\n"
|
||||
"POT-Creation-Date: 2025-01-05 00:05+0000\n"
|
||||
"PO-Revision-Date: 2024-08-20 10:13+0000\n"
|
||||
"Last-Translator: Keram, 2024\n"
|
||||
"Language-Team: Uyghur (https://app.transifex.com/owncloud-org/teams/6149/ug/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-14 00:17+0000\n"
|
||||
"POT-Creation-Date: 2025-01-04 00:05+0000\n"
|
||||
"PO-Revision-Date: 2024-08-20 10:13+0000\n"
|
||||
"Last-Translator: Roman Perekhod, 2024\n"
|
||||
"Language-Team: Ukrainian (https://app.transifex.com/owncloud-org/teams/6149/uk/)\n"
|
||||
|
||||
@@ -58,6 +58,8 @@ type Config struct {
|
||||
|
||||
PasswordPolicy PasswordPolicy `yaml:"password_policy"`
|
||||
|
||||
ConfigurableNotifications bool `yaml:"configurable_notifications" env:"FRONTEND_CONFIGURABLE_NOTIFICATIONS" desc:"Allow configuring notifications via web client." introductionVersion:"7.1"`
|
||||
|
||||
Context context.Context `yaml:"-"`
|
||||
}
|
||||
|
||||
|
||||
@@ -333,7 +333,8 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
|
||||
},
|
||||
"password_policy": passwordPolicyCfg,
|
||||
"notifications": map[string]interface{}{
|
||||
"endpoints": []string{"list", "get", "delete"},
|
||||
"endpoints": []string{"list", "get", "delete"},
|
||||
"configurable": cfg.ConfigurableNotifications,
|
||||
},
|
||||
},
|
||||
"version": map[string]interface{}{
|
||||
|
||||
@@ -12,7 +12,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-16 00:19+0000\n"
|
||||
"POT-Creation-Date: 2025-01-06 00:03+0000\n"
|
||||
"PO-Revision-Date: 2024-04-04 00:17+0000\n"
|
||||
"Last-Translator: Michael Barz <mbarz@owncloud.com>, 2024\n"
|
||||
"Language-Team: German (https://app.transifex.com/owncloud-org/teams/6149/de/)\n"
|
||||
|
||||
@@ -12,7 +12,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-11-30 00:18+0000\n"
|
||||
"POT-Creation-Date: 2024-12-20 00:46+0000\n"
|
||||
"PO-Revision-Date: 2024-04-04 00:17+0000\n"
|
||||
"Last-Translator: Andi Chandler <andi@gowling.com>, 2024\n"
|
||||
"Language-Team: English (United Kingdom) (https://app.transifex.com/owncloud-org/teams/6149/en_GB/)\n"
|
||||
|
||||
@@ -14,7 +14,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-11-30 00:18+0000\n"
|
||||
"POT-Creation-Date: 2024-12-20 00:46+0000\n"
|
||||
"PO-Revision-Date: 2024-04-04 00:17+0000\n"
|
||||
"Last-Translator: Juan Carlos Garrote, 2024\n"
|
||||
"Language-Team: Spanish (https://app.transifex.com/owncloud-org/teams/6149/es/)\n"
|
||||
|
||||
@@ -12,7 +12,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-11-29 00:18+0000\n"
|
||||
"POT-Creation-Date: 2025-01-08 04:19+0000\n"
|
||||
"PO-Revision-Date: 2024-04-04 00:17+0000\n"
|
||||
"Last-Translator: Allan Antoni, 2024\n"
|
||||
"Language-Team: Portuguese (Brazil) (https://app.transifex.com/owncloud-org/teams/6149/pt_BR/)\n"
|
||||
|
||||
@@ -13,7 +13,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-11-29 00:18+0000\n"
|
||||
"POT-Creation-Date: 2025-01-08 04:19+0000\n"
|
||||
"PO-Revision-Date: 2024-04-04 00:17+0000\n"
|
||||
"Last-Translator: Viktor Scharf, 2024\n"
|
||||
"Language-Team: Russian (https://app.transifex.com/owncloud-org/teams/6149/ru/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-11-27 00:20+0000\n"
|
||||
"POT-Creation-Date: 2025-01-08 04:19+0000\n"
|
||||
"PO-Revision-Date: 2024-04-04 00:17+0000\n"
|
||||
"Last-Translator: Besnik Bleta <besnik@programeshqip.org>, 2024\n"
|
||||
"Language-Team: Albanian (https://app.transifex.com/owncloud-org/teams/6149/sq/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-16 00:19+0000\n"
|
||||
"POT-Creation-Date: 2025-01-06 00:03+0000\n"
|
||||
"PO-Revision-Date: 2024-04-04 00:17+0000\n"
|
||||
"Last-Translator: Keram, 2024\n"
|
||||
"Language-Team: Uyghur (https://app.transifex.com/owncloud-org/teams/6149/ug/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-16 00:19+0000\n"
|
||||
"POT-Creation-Date: 2025-01-06 00:03+0000\n"
|
||||
"PO-Revision-Date: 2024-04-04 00:17+0000\n"
|
||||
"Last-Translator: Roman Perekhod, 2024\n"
|
||||
"Language-Team: Ukrainian (https://app.transifex.com/owncloud-org/teams/6149/uk/)\n"
|
||||
|
||||
@@ -143,6 +143,7 @@ func (s DriveItemPermissionsService) Invite(ctx context.Context, resourceId *sto
|
||||
|
||||
var shareid string
|
||||
var expiration *types.Timestamp
|
||||
var cTime *types.Timestamp
|
||||
switch driveRecipient.GetLibreGraphRecipientType() {
|
||||
case "group":
|
||||
group, err := s.identityCache.GetGroup(ctx, objectID)
|
||||
@@ -166,6 +167,7 @@ func (s DriveItemPermissionsService) Invite(ctx context.Context, resourceId *sto
|
||||
return libregraph.Permission{}, err
|
||||
}
|
||||
shareid = createShareResponse.GetShare().GetId().GetOpaqueId()
|
||||
cTime = createShareResponse.GetShare().GetCtime()
|
||||
expiration = createShareResponse.GetShare().GetExpiration()
|
||||
default:
|
||||
user, err := s.identityCache.GetUser(ctx, objectID)
|
||||
@@ -209,6 +211,7 @@ func (s DriveItemPermissionsService) Invite(ctx context.Context, resourceId *sto
|
||||
return libregraph.Permission{}, err
|
||||
}
|
||||
shareid = createShareResponse.GetShare().GetId().GetOpaqueId()
|
||||
cTime = createShareResponse.GetShare().GetCtime()
|
||||
expiration = createShareResponse.GetShare().GetExpiration()
|
||||
} else {
|
||||
createShareRequest := createShareRequestToUser(user, statResponse.GetInfo(), cs3ResourcePermissions)
|
||||
@@ -221,6 +224,7 @@ func (s DriveItemPermissionsService) Invite(ctx context.Context, resourceId *sto
|
||||
return libregraph.Permission{}, err
|
||||
}
|
||||
shareid = createShareResponse.GetShare().GetId().GetOpaqueId()
|
||||
cTime = createShareResponse.GetShare().GetCtime()
|
||||
expiration = createShareResponse.GetShare().GetExpiration()
|
||||
}
|
||||
|
||||
@@ -238,6 +242,11 @@ func (s DriveItemPermissionsService) Invite(ctx context.Context, resourceId *sto
|
||||
permission.SetExpirationDateTime(utils.TSToTime(expiration))
|
||||
}
|
||||
|
||||
// set cTime
|
||||
if cTime != nil {
|
||||
permission.SetCreatedDateTime(cs3TimestampToTime(cTime))
|
||||
}
|
||||
|
||||
if user, ok := revactx.ContextGetUser(ctx); ok {
|
||||
identity, err := userIdToIdentity(ctx, s.identityCache, user.GetId().GetOpaqueId())
|
||||
if err != nil {
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-11 00:19+0000\n"
|
||||
"POT-Creation-Date: 2025-01-01 00:04+0000\n"
|
||||
"PO-Revision-Date: 2023-04-19 11:11+0000\n"
|
||||
"Last-Translator: Arnau Morancho, 2023\n"
|
||||
"Language-Team: Catalan (https://app.transifex.com/owncloud-org/teams/6149/ca/)\n"
|
||||
|
||||
@@ -14,7 +14,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-11 00:19+0000\n"
|
||||
"POT-Creation-Date: 2025-01-01 00:04+0000\n"
|
||||
"PO-Revision-Date: 2023-04-19 11:11+0000\n"
|
||||
"Last-Translator: Martin <github@diemattels.at>, 2024\n"
|
||||
"Language-Team: German (https://app.transifex.com/owncloud-org/teams/6149/de/)\n"
|
||||
|
||||
@@ -12,7 +12,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-11 00:19+0000\n"
|
||||
"POT-Creation-Date: 2025-01-01 00:04+0000\n"
|
||||
"PO-Revision-Date: 2023-04-19 11:11+0000\n"
|
||||
"Last-Translator: Michael Barz <mbarz@owncloud.com>, 2023\n"
|
||||
"Language-Team: German (Germany) (https://app.transifex.com/owncloud-org/teams/6149/de_DE/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-08 00:19+0000\n"
|
||||
"POT-Creation-Date: 2024-12-29 00:04+0000\n"
|
||||
"PO-Revision-Date: 2023-04-19 11:11+0000\n"
|
||||
"Last-Translator: Andi Chandler <andi@gowling.com>, 2024\n"
|
||||
"Language-Team: English (United Kingdom) (https://app.transifex.com/owncloud-org/teams/6149/en_GB/)\n"
|
||||
|
||||
@@ -12,7 +12,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-16 00:19+0000\n"
|
||||
"POT-Creation-Date: 2025-01-06 00:03+0000\n"
|
||||
"PO-Revision-Date: 2023-04-19 11:11+0000\n"
|
||||
"Last-Translator: Jesús Recio <jrecio@solidgear.es>, 2024\n"
|
||||
"Language-Team: Spanish (https://app.transifex.com/owncloud-org/teams/6149/es/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-11 00:19+0000\n"
|
||||
"POT-Creation-Date: 2025-01-01 00:04+0000\n"
|
||||
"PO-Revision-Date: 2023-04-19 11:11+0000\n"
|
||||
"Last-Translator: hoshi1800 <hoshi1800@gmail.com>, 2024\n"
|
||||
"Language-Team: Japanese (Japan) (https://app.transifex.com/owncloud-org/teams/6149/ja_JP/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-11 00:19+0000\n"
|
||||
"POT-Creation-Date: 2025-01-01 00:04+0000\n"
|
||||
"PO-Revision-Date: 2023-04-19 11:11+0000\n"
|
||||
"Last-Translator: Hugo Blackwood, 2023\n"
|
||||
"Language-Team: Korean (https://app.transifex.com/owncloud-org/teams/6149/ko/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-11 00:19+0000\n"
|
||||
"POT-Creation-Date: 2025-01-01 00:04+0000\n"
|
||||
"PO-Revision-Date: 2023-04-19 11:11+0000\n"
|
||||
"Last-Translator: Flávio Veras <flaviove@gmail.com>, 2024\n"
|
||||
"Language-Team: Portuguese (Brazil) (https://app.transifex.com/owncloud-org/teams/6149/pt_BR/)\n"
|
||||
|
||||
@@ -14,7 +14,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-11-28 00:19+0000\n"
|
||||
"POT-Creation-Date: 2025-01-08 04:19+0000\n"
|
||||
"PO-Revision-Date: 2023-04-19 11:11+0000\n"
|
||||
"Last-Translator: Viktor Scharf, 2024\n"
|
||||
"Language-Team: Russian (https://app.transifex.com/owncloud-org/teams/6149/ru/)\n"
|
||||
|
||||
@@ -12,7 +12,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-11 00:19+0000\n"
|
||||
"POT-Creation-Date: 2025-01-01 00:04+0000\n"
|
||||
"PO-Revision-Date: 2023-04-19 11:11+0000\n"
|
||||
"Last-Translator: dutty5, 2024\n"
|
||||
"Language-Team: Russian (Russia) (https://app.transifex.com/owncloud-org/teams/6149/ru_RU/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-11-28 00:19+0000\n"
|
||||
"POT-Creation-Date: 2025-01-08 04:19+0000\n"
|
||||
"PO-Revision-Date: 2023-04-19 11:11+0000\n"
|
||||
"Last-Translator: Besnik Bleta <besnik@programeshqip.org>, 2024\n"
|
||||
"Language-Team: Albanian (https://app.transifex.com/owncloud-org/teams/6149/sq/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-11 00:19+0000\n"
|
||||
"POT-Creation-Date: 2025-01-01 00:04+0000\n"
|
||||
"PO-Revision-Date: 2023-04-19 11:11+0000\n"
|
||||
"Last-Translator: Begüm Topyıldız <bgmtpyldz@gmail.com>, 2023\n"
|
||||
"Language-Team: Turkish (https://app.transifex.com/owncloud-org/teams/6149/tr/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-15 00:43+0000\n"
|
||||
"POT-Creation-Date: 2025-01-05 00:05+0000\n"
|
||||
"PO-Revision-Date: 2023-04-19 11:11+0000\n"
|
||||
"Last-Translator: Keram, 2024\n"
|
||||
"Language-Team: Uyghur (https://app.transifex.com/owncloud-org/teams/6149/ug/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-06 00:18+0000\n"
|
||||
"POT-Creation-Date: 2024-12-27 00:05+0000\n"
|
||||
"PO-Revision-Date: 2023-04-19 11:11+0000\n"
|
||||
"Last-Translator: Roman Perekhod, 2024\n"
|
||||
"Language-Team: Ukrainian (https://app.transifex.com/owncloud-org/teams/6149/uk/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-11 00:19+0000\n"
|
||||
"POT-Creation-Date: 2025-01-01 00:04+0000\n"
|
||||
"PO-Revision-Date: 2023-04-19 11:11+0000\n"
|
||||
"Last-Translator: Shouyuan, 2023\n"
|
||||
"Language-Team: Chinese Simplified (https://app.transifex.com/owncloud-org/teams/6149/zh-Hans/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-11 00:19+0000\n"
|
||||
"POT-Creation-Date: 2025-01-01 00:04+0000\n"
|
||||
"PO-Revision-Date: 2023-04-19 11:11+0000\n"
|
||||
"Last-Translator: Shouyuan, 2023\n"
|
||||
"Language-Team: Chinese (China) (https://app.transifex.com/owncloud-org/teams/6149/zh_CN/)\n"
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
user "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/log"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/middleware"
|
||||
settingssvc "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/settings/v0"
|
||||
micrometadata "go-micro.dev/v4/metadata"
|
||||
)
|
||||
|
||||
type notificationFilter struct {
|
||||
log log.Logger
|
||||
valueClient settingssvc.ValueService
|
||||
}
|
||||
|
||||
func newNotificationFilter(l log.Logger, vc settingssvc.ValueService) *notificationFilter {
|
||||
return ¬ificationFilter{log: l, valueClient: vc}
|
||||
}
|
||||
|
||||
// execute removes users who have disabled mail notifications for the event
|
||||
func (nf notificationFilter) execute(ctx context.Context, users []*user.User, settingId string) []*user.User {
|
||||
var filteredUsers []*user.User
|
||||
|
||||
for _, u := range users {
|
||||
userId := u.GetId().GetOpaqueId()
|
||||
enabled, err := getSetting(ctx, nf.valueClient, userId, settingId)
|
||||
if err != nil {
|
||||
nf.log.Error().Err(err).Str("userId", userId).Str("settingId", settingId).Msg("cannot get user event setting")
|
||||
continue
|
||||
}
|
||||
if enabled {
|
||||
filteredUsers = append(filteredUsers, u)
|
||||
}
|
||||
}
|
||||
|
||||
return filteredUsers
|
||||
}
|
||||
|
||||
func getSetting(ctx context.Context, vc settingssvc.ValueService, userId string, settingId string) (bool, error) {
|
||||
resp, err := vc.GetValueByUniqueIdentifiers(
|
||||
micrometadata.Set(ctx, middleware.AccountID, userId),
|
||||
&settingssvc.GetValueByUniqueIdentifiersRequest{
|
||||
AccountUuid: userId,
|
||||
SettingId: settingId,
|
||||
},
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
val := resp.GetValue().GetValue().GetCollectionValue().GetValues()
|
||||
for _, option := range val {
|
||||
if option.GetKey() == "mail" {
|
||||
return option.GetBoolValue(), nil
|
||||
}
|
||||
}
|
||||
return false, errors.New("no setting found")
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
user "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/log"
|
||||
settingsmsg "github.com/owncloud/ocis/v2/protogen/gen/ocis/messages/settings/v0"
|
||||
settings "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/settings/v0"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go-micro.dev/v4/client"
|
||||
"testing"
|
||||
)
|
||||
|
||||
var testLogger = log.NewLogger()
|
||||
|
||||
func TestNotificationFilter_execute(t *testing.T) {
|
||||
type args struct {
|
||||
ctx context.Context
|
||||
users []*user.User
|
||||
settingId string
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
vc settings.ValueService
|
||||
args args
|
||||
want []*user.User
|
||||
}{
|
||||
{"no connection to ValueService", settings.MockValueService{
|
||||
GetValueByUniqueIdentifiersFunc: func(ctx context.Context, req *settings.GetValueByUniqueIdentifiersRequest, opts ...client.CallOption) (*settings.GetValueResponse, error) {
|
||||
return nil, errors.New("no connection to ValueService")
|
||||
},
|
||||
}, args{users: []*user.User{{Id: &user.UserId{OpaqueId: "foo"}}}, settingId: "bar", ctx: context.TODO()}, []*user.User(nil)},
|
||||
{"no setting in ValueService response", settings.MockValueService{
|
||||
GetValueByUniqueIdentifiersFunc: func(ctx context.Context, req *settings.GetValueByUniqueIdentifiersRequest, opts ...client.CallOption) (*settings.GetValueResponse, error) {
|
||||
return &settings.GetValueResponse{}, nil
|
||||
},
|
||||
}, args{users: []*user.User{{Id: &user.UserId{OpaqueId: "foo"}}}, settingId: "bar", ctx: context.TODO()}, []*user.User(nil)},
|
||||
{"ValueService nil response", settings.MockValueService{
|
||||
GetValueByUniqueIdentifiersFunc: func(ctx context.Context, req *settings.GetValueByUniqueIdentifiersRequest, opts ...client.CallOption) (*settings.GetValueResponse, error) {
|
||||
return nil, nil
|
||||
},
|
||||
}, args{users: []*user.User{{Id: &user.UserId{OpaqueId: "foo"}}}, settingId: "bar", ctx: context.TODO()}, []*user.User(nil)},
|
||||
{"Event enabled", setupMockValueService(true), args{users: []*user.User{{Id: &user.UserId{OpaqueId: "foo"}}}, settingId: "bar", ctx: context.TODO()}, []*user.User{{Id: &user.UserId{OpaqueId: "foo"}}}},
|
||||
{"Event disabled", setupMockValueService(false), args{users: []*user.User{{Id: &user.UserId{OpaqueId: "foo"}}}, settingId: "bar", ctx: context.TODO()}, []*user.User(nil)},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
ulf := notificationFilter{
|
||||
log: testLogger,
|
||||
valueClient: tt.vc,
|
||||
}
|
||||
assert.Equal(t, tt.want, ulf.execute(tt.args.ctx, tt.args.users, tt.args.settingId))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func setupMockValueService(mail bool) settings.ValueService {
|
||||
return settings.MockValueService{
|
||||
GetValueByUniqueIdentifiersFunc: func(ctx context.Context, req *settings.GetValueByUniqueIdentifiersRequest, opts ...client.CallOption) (*settings.GetValueResponse, error) {
|
||||
return &settings.GetValueResponse{
|
||||
Value: &settingsmsg.ValueWithIdentifier{
|
||||
Value: &settingsmsg.Value{
|
||||
Value: &settingsmsg.Value_CollectionValue{
|
||||
CollectionValue: &settingsmsg.CollectionValue{
|
||||
Values: []*settingsmsg.CollectionOption{
|
||||
{
|
||||
Key: "mail",
|
||||
Option: &settingsmsg.CollectionOption_BoolValue{BoolValue: mail},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}, nil
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -65,6 +65,7 @@ func NewEventsNotifier(
|
||||
defaultLanguage: defaultLanguage,
|
||||
ocisURL: ocisURL,
|
||||
translationPath: translationPath,
|
||||
filter: newNotificationFilter(logger, valueService),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,6 +82,7 @@ type eventsNotifier struct {
|
||||
ocisURL string
|
||||
serviceAccountID string
|
||||
serviceAccountSecret string
|
||||
filter *notificationFilter
|
||||
}
|
||||
|
||||
func (s eventsNotifier) Run() error {
|
||||
|
||||
@@ -2,6 +2,7 @@ package service_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
settingsmsg "github.com/owncloud/ocis/v2/protogen/gen/ocis/messages/settings/v0"
|
||||
"time"
|
||||
|
||||
gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1"
|
||||
@@ -68,7 +69,22 @@ var _ = Describe("Notifications", func() {
|
||||
gatewayClient.On("Stat", mock.Anything, mock.Anything).Return(&provider.StatResponse{Status: &rpc.Status{Code: rpc.Code_CODE_OK}, Info: &provider.ResourceInfo{Name: "secrets of the board", Space: &provider.StorageSpace{Name: "secret space"}}}, nil)
|
||||
vs = &settingssvc.MockValueService{}
|
||||
vs.GetValueByUniqueIdentifiersFunc = func(ctx context.Context, req *settingssvc.GetValueByUniqueIdentifiersRequest, opts ...client.CallOption) (*settingssvc.GetValueResponse, error) {
|
||||
return nil, nil
|
||||
return &settingssvc.GetValueResponse{
|
||||
Value: &settingsmsg.ValueWithIdentifier{
|
||||
Value: &settingsmsg.Value{
|
||||
Value: &settingsmsg.Value_CollectionValue{
|
||||
CollectionValue: &settingsmsg.CollectionValue{
|
||||
Values: []*settingsmsg.CollectionOption{
|
||||
{
|
||||
Key: "mail",
|
||||
Option: &settingsmsg.CollectionOption_BoolValue{BoolValue: true},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
})
|
||||
|
||||
@@ -266,7 +282,22 @@ var _ = Describe("Notifications X-Site Scripting", func() {
|
||||
}, nil)
|
||||
vs = &settingssvc.MockValueService{}
|
||||
vs.GetValueByUniqueIdentifiersFunc = func(ctx context.Context, req *settingssvc.GetValueByUniqueIdentifiersRequest, opts ...client.CallOption) (*settingssvc.GetValueResponse, error) {
|
||||
return nil, nil
|
||||
return &settingssvc.GetValueResponse{
|
||||
Value: &settingsmsg.ValueWithIdentifier{
|
||||
Value: &settingsmsg.Value{
|
||||
Value: &settingsmsg.Value_CollectionValue{
|
||||
CollectionValue: &settingsmsg.CollectionValue{
|
||||
Values: []*settingsmsg.CollectionOption{
|
||||
{
|
||||
Key: "mail",
|
||||
Option: &settingsmsg.CollectionOption_BoolValue{BoolValue: true},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"github.com/cs3org/reva/v2/pkg/events"
|
||||
"github.com/cs3org/reva/v2/pkg/utils"
|
||||
"github.com/owncloud/ocis/v2/services/notifications/pkg/email"
|
||||
"github.com/owncloud/ocis/v2/services/settings/pkg/store/defaults"
|
||||
"google.golang.org/protobuf/types/known/fieldmaskpb"
|
||||
)
|
||||
|
||||
@@ -48,7 +49,8 @@ func (s eventsNotifier) handleShareCreated(e events.ShareCreated) {
|
||||
}
|
||||
|
||||
granteeList := s.ensureGranteeList(ctx, owner.GetId(), e.GranteeUserID, e.GranteeGroupID)
|
||||
if granteeList == nil {
|
||||
filteredGrantees := s.filter.execute(ctx, granteeList, defaults.SettingUUIDProfileEventShareCreated)
|
||||
if filteredGrantees == nil {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -59,7 +61,7 @@ func (s eventsNotifier) handleShareCreated(e events.ShareCreated) {
|
||||
"ShareSharer": sharerDisplayName,
|
||||
"ShareFolder": resourceInfo.Name,
|
||||
"ShareLink": shareLink,
|
||||
}, granteeList, sharerDisplayName)
|
||||
}, filteredGrantees, sharerDisplayName)
|
||||
if err != nil {
|
||||
s.logger.Error().Err(err).Str("event", "ShareCreated").Msg("could not get render the email")
|
||||
return
|
||||
@@ -100,7 +102,8 @@ func (s eventsNotifier) handleShareExpired(e events.ShareExpired) {
|
||||
}
|
||||
|
||||
granteeList := s.ensureGranteeList(ctx, owner.GetId(), e.GranteeUserID, e.GranteeGroupID)
|
||||
if granteeList == nil {
|
||||
filteredGrantees := s.filter.execute(ctx, granteeList, defaults.SettingUUIDProfileEventShareExpired)
|
||||
if filteredGrantees == nil {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -109,7 +112,7 @@ func (s eventsNotifier) handleShareExpired(e events.ShareExpired) {
|
||||
map[string]string{
|
||||
"ShareFolder": resourceInfo.GetName(),
|
||||
"ExpiredAt": e.ExpiredAt.Format("2006-01-02 15:04:05"),
|
||||
}, granteeList, owner.GetDisplayName())
|
||||
}, filteredGrantees, owner.GetDisplayName())
|
||||
if err != nil {
|
||||
s.logger.Error().Err(err).Str("event", "ShareExpired").Msg("could not get render the email")
|
||||
return
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"github.com/cs3org/reva/v2/pkg/storagespace"
|
||||
"github.com/cs3org/reva/v2/pkg/utils"
|
||||
"github.com/owncloud/ocis/v2/services/notifications/pkg/email"
|
||||
"github.com/owncloud/ocis/v2/services/settings/pkg/store/defaults"
|
||||
)
|
||||
|
||||
func (s eventsNotifier) handleSpaceShared(e events.SpaceShared) {
|
||||
@@ -63,7 +64,8 @@ func (s eventsNotifier) handleSpaceShared(e events.SpaceShared) {
|
||||
// the Grantees of the shares. Ideally the notfication service would use some kind of service
|
||||
// user for this.
|
||||
granteeList := s.ensureGranteeList(ctx, executant.GetId(), e.GranteeUserID, e.GranteeGroupID)
|
||||
if granteeList == nil {
|
||||
filteredGrantees := s.filter.execute(ctx, granteeList, defaults.SettingUUIDProfileEventSpaceShared)
|
||||
if filteredGrantees == nil {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -74,7 +76,7 @@ func (s eventsNotifier) handleSpaceShared(e events.SpaceShared) {
|
||||
"SpaceSharer": sharerDisplayName,
|
||||
"SpaceName": resourceInfo.GetSpace().GetName(),
|
||||
"ShareLink": shareLink,
|
||||
}, granteeList, sharerDisplayName)
|
||||
}, filteredGrantees, sharerDisplayName)
|
||||
if err != nil {
|
||||
s.logger.Error().Err(err).Str("event", "SharedSpace").Msg("could not get render the email")
|
||||
return
|
||||
@@ -136,7 +138,8 @@ func (s eventsNotifier) handleSpaceUnshared(e events.SpaceUnshared) {
|
||||
// the Grantees of the shares. Ideally the notfication service would use some kind of service
|
||||
// user for this.
|
||||
granteeList := s.ensureGranteeList(ctx, executant.GetId(), e.GranteeUserID, e.GranteeGroupID)
|
||||
if granteeList == nil {
|
||||
filteredGrantees := s.filter.execute(ctx, granteeList, defaults.SettingUUIDProfileEventSpaceUnshared)
|
||||
if filteredGrantees == nil {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -147,7 +150,7 @@ func (s eventsNotifier) handleSpaceUnshared(e events.SpaceUnshared) {
|
||||
"SpaceSharer": sharerDisplayName,
|
||||
"SpaceName": resourceInfo.GetSpace().Name,
|
||||
"ShareLink": shareLink,
|
||||
}, granteeList, sharerDisplayName)
|
||||
}, filteredGrantees, sharerDisplayName)
|
||||
if err != nil {
|
||||
s.logger.Error().Err(err).Str("event", "UnsharedSpace").Msg("Could not get render the email")
|
||||
return
|
||||
@@ -185,13 +188,17 @@ func (s eventsNotifier) handleSpaceMembershipExpired(e events.SpaceMembershipExp
|
||||
if granteeList == nil {
|
||||
return
|
||||
}
|
||||
filteredGrantees := s.filter.execute(ctx, granteeList, defaults.SettingUUIDProfileEventSpaceMembershipExpired)
|
||||
if filteredGrantees == nil {
|
||||
return
|
||||
}
|
||||
|
||||
recipientList, err := s.render(ctx, email.MembershipExpired,
|
||||
"SpaceGrantee",
|
||||
map[string]string{
|
||||
"SpaceName": e.SpaceName,
|
||||
"ExpiredAt": e.ExpiredAt.Format("2006-01-02 15:04:05"),
|
||||
}, granteeList, owner.GetDisplayName())
|
||||
}, filteredGrantees, owner.GetDisplayName())
|
||||
if err != nil {
|
||||
s.logger.Error().Err(err).Str("event", "SpaceUnshared").Msg("could not get render the email")
|
||||
return
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
SHELL := bash
|
||||
NAME := settings
|
||||
|
||||
# Where to write the files generated by this makefile.
|
||||
OUTPUT_DIR = ./pkg/service/v0/l10n
|
||||
TEMPLATE_FILE = ./pkg/service/v0/l10n/settings.pot
|
||||
|
||||
include ../../.make/recursion.mk
|
||||
|
||||
############ tooling ############
|
||||
@@ -45,3 +49,25 @@ ci-node-check-licenses:
|
||||
|
||||
.PHONY: ci-node-save-licenses
|
||||
ci-node-save-licenses:
|
||||
|
||||
############ translations ########
|
||||
.PHONY: l10n-pull
|
||||
l10n-pull:
|
||||
cd $(OUTPUT_DIR) && tx pull --all --force --skip --minimum-perc=75
|
||||
|
||||
.PHONY: l10n-push
|
||||
l10n-push:
|
||||
cd $(OUTPUT_DIR) && tx push -s --skip
|
||||
|
||||
.PHONY: l10n-read
|
||||
l10n-read: $(GO_XGETTEXT)
|
||||
go-xgettext -o $(OUTPUT_DIR)/settings.pot \
|
||||
--keyword=l10n.Template --add-comments -s \
|
||||
pkg/store/defaults/templates.go
|
||||
|
||||
.PHONY: l10n-write
|
||||
l10n-write:
|
||||
|
||||
.PHONY: l10n-clean
|
||||
l10n-clean:
|
||||
rm -f $(TEMPLATE_FILE);
|
||||
@@ -64,6 +64,28 @@ Services can set or query Infinite Scale *setting values* of a user from setting
|
||||
|
||||
The settings service needs to know the IDs of service accounts but it doesn't need their secrets. They can be configured using the `SETTINGS_SERVICE_ACCOUNTS_IDS` envvar. When only using one service account `OCIS_SERVICE_ACCOUNT_ID` can also be used. All configured service accounts will get a hidden 'service-account' role. This role contains all permissions the service account needs but will not appear calls to the list roles endpoint. It is not possible to assign the 'service-account' role to a normal user.
|
||||
|
||||
## Translations
|
||||
|
||||
The `settings` service has embedded translations sourced via transifex to provide a basic set of translated languages. These embedded translations are available for all deployment scenarios. In addition, the service supports custom translations, though it is currently not possible to just add custom translations to embedded ones. If custom translations are configured, the embedded ones are not used. To configure custom translations, the `SETTINGS_TRANSLATION_PATH` environment variable needs to point to a base folder that will contain the translation files. This path must be available from all instances of the userlog service, a shared storage is recommended. Translation files must be of type [.po](https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html#PO-Files) or [.mo](https://www.gnu.org/software/gettext/manual/html_node/Binaries.html). For each language, the filename needs to be `settings.po` (or `settings.mo`) and stored in a folder structure defining the language code. In general the path/name pattern for a translation file needs to be:
|
||||
|
||||
```text
|
||||
{SETTINGS_TRANSLATION_PATH}/{language-code}/LC_MESSAGES/settings.po
|
||||
```
|
||||
|
||||
The language code pattern is composed of `language[_territory]` where `language` is the base language and `_territory` is optional and defines a country.
|
||||
|
||||
For example, for the language `de`, one needs to place the corresponding translation files to `{SETTINGS_TRANSLATION_PATH}/de_DE/LC_MESSAGES/settings.po`.
|
||||
|
||||
<!-- also see the notifications readme -->
|
||||
|
||||
Important: For the time being, the embedded ownCloud Web frontend only supports the main language code but does not handle any territory. When strings are available in the language code `language_territory`, the web frontend does not see it as it only requests `language`. In consequence, any translations made must exist in the requested `language` to avoid a fallback to the default.
|
||||
|
||||
### Translation Rules
|
||||
|
||||
* If a requested language code is not available, the service tries to fall back to the base language if available. For example, if the requested language-code `de_DE` is not available, the service tries to fall back to translations in the `de` folder.
|
||||
* If the base language `de` is also not available, the service falls back to the system's default English (`en`),
|
||||
which is the source of the texts provided by the code.
|
||||
|
||||
## Default Language
|
||||
|
||||
The default language can be defined via the `OCIS_DEFAULT_LANGUAGE` environment variable. If this variable is not defined, English will be used as default. The value has the ISO 639-1 format ("de", "en", etc.) and is limited by the list supported languages. This setting can be used to set the default language for notification and invitation emails.
|
||||
|
||||
@@ -38,6 +38,7 @@ type Config struct {
|
||||
ServiceAccountIDs []string `yaml:"service_account_ids" env:"SETTINGS_SERVICE_ACCOUNT_IDS;OCIS_SERVICE_ACCOUNT_ID" desc:"The list of all service account IDs. These will be assigned the hidden 'service-account' role. Note: When using 'OCIS_SERVICE_ACCOUNT_ID' this will contain only one value while 'SETTINGS_SERVICE_ACCOUNT_IDS' can have multiple. See the 'auth-service' service description for more details about service accounts." introductionVersion:"5.0"`
|
||||
|
||||
DefaultLanguage string `yaml:"default_language" env:"OCIS_DEFAULT_LANGUAGE" desc:"The default language used by services and the WebUI. If not defined, English will be used as default. See the documentation for more details." introductionVersion:"5.0"`
|
||||
TranslationPath string `yaml:"translation_path" env:"OCIS_TRANSLATION_PATH;SETTINGS_TRANSLATION_PATH" desc:"(optional) Set this to a path with custom translations to overwrite the builtin translations. Note that file and folder naming rules apply, see the documentation for more details." introductionVersion:"7.1"`
|
||||
|
||||
Context context.Context `yaml:"-"`
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[o:owncloud-org:p:owncloud:r:ocis-settings]
|
||||
file_filter = locale/<lang>/LC_MESSAGES/settings.po
|
||||
minimum_perc = 75
|
||||
resource_name = ocis-settings
|
||||
source_file = settings.pot
|
||||
source_lang = en
|
||||
type = PO
|
||||
Whitespace-only changes.
@@ -2,13 +2,17 @@ package svc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"embed"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
cs3permissions "github.com/cs3org/go-cs3apis/cs3/permissions/v1beta1"
|
||||
rpcv1beta1 "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1"
|
||||
ctxpkg "github.com/cs3org/reva/v2/pkg/ctx"
|
||||
"github.com/cs3org/reva/v2/pkg/rgrpc/status"
|
||||
"github.com/leonelquinteros/gotext"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/l10n"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/log"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/middleware"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/roles"
|
||||
@@ -23,6 +27,11 @@ import (
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
//go:embed l10n/locale
|
||||
var _translationFS embed.FS
|
||||
|
||||
var _domain = "settings"
|
||||
|
||||
// Service represents a service.
|
||||
type Service struct {
|
||||
id string
|
||||
@@ -46,14 +55,14 @@ func NewService(cfg *config.Config, logger log.Logger) settings.ServiceHandler {
|
||||
// CheckPermission implements the CS3 API Permssions service.
|
||||
// It's used to check if a subject (user or group) has a permission.
|
||||
func (g Service) CheckPermission(ctx context.Context, req *cs3permissions.CheckPermissionRequest) (*cs3permissions.CheckPermissionResponse, error) {
|
||||
spec := req.SubjectRef.Spec
|
||||
spec := req.GetSubjectRef().GetSpec()
|
||||
|
||||
var accountID string
|
||||
switch ref := spec.(type) {
|
||||
case *cs3permissions.SubjectReference_UserId:
|
||||
accountID = ref.UserId.OpaqueId
|
||||
accountID = ref.UserId.GetOpaqueId()
|
||||
case *cs3permissions.SubjectReference_GroupId:
|
||||
accountID = ref.GroupId.OpaqueId
|
||||
accountID = ref.GroupId.GetOpaqueId()
|
||||
}
|
||||
|
||||
assignments, err := g.manager.ListRoleAssignments(accountID)
|
||||
@@ -65,10 +74,10 @@ func (g Service) CheckPermission(ctx context.Context, req *cs3permissions.CheckP
|
||||
|
||||
roleIDs := make([]string, 0, len(assignments))
|
||||
for _, a := range assignments {
|
||||
roleIDs = append(roleIDs, a.RoleId)
|
||||
roleIDs = append(roleIDs, a.GetRoleId())
|
||||
}
|
||||
|
||||
permission, err := g.manager.ReadPermissionByName(req.Permission, roleIDs)
|
||||
permission, err := g.manager.ReadPermissionByName(req.GetPermission(), roleIDs)
|
||||
if err != nil {
|
||||
if !errors.Is(err, settings.ErrNotFound) {
|
||||
return &cs3permissions.CheckPermissionResponse{
|
||||
@@ -94,15 +103,15 @@ func (g Service) CheckPermission(ctx context.Context, req *cs3permissions.CheckP
|
||||
|
||||
// SaveBundle implements the BundleServiceHandler interface
|
||||
func (g Service) SaveBundle(ctx context.Context, req *settingssvc.SaveBundleRequest, res *settingssvc.SaveBundleResponse) error {
|
||||
cleanUpResource(ctx, req.Bundle.Resource)
|
||||
if err := g.checkStaticPermissionsByBundleType(ctx, req.Bundle.Type); err != nil {
|
||||
cleanUpResource(ctx, req.GetBundle().GetResource())
|
||||
if err := g.checkStaticPermissionsByBundleType(ctx, req.GetBundle().GetType()); err != nil {
|
||||
return err
|
||||
}
|
||||
if validationError := validateSaveBundle(req); validationError != nil {
|
||||
return merrors.BadRequest(g.id, "%s", validationError)
|
||||
}
|
||||
|
||||
r, err := g.manager.WriteBundle(req.Bundle)
|
||||
r, err := g.manager.WriteBundle(req.GetBundle())
|
||||
if err != nil {
|
||||
return merrors.BadRequest(g.id, "%s", err)
|
||||
}
|
||||
@@ -115,13 +124,13 @@ func (g Service) GetBundle(ctx context.Context, req *settingssvc.GetBundleReques
|
||||
if validationError := validateGetBundle(req); validationError != nil {
|
||||
return merrors.BadRequest(g.id, "%s", validationError)
|
||||
}
|
||||
bundle, err := g.manager.ReadBundle(req.BundleId)
|
||||
bundle, err := g.manager.ReadBundle(req.GetBundleId())
|
||||
if err != nil {
|
||||
return merrors.NotFound(g.id, "%s", err)
|
||||
}
|
||||
filteredBundle := g.getFilteredBundle(g.getRoleIDs(ctx), bundle)
|
||||
if len(filteredBundle.Settings) == 0 {
|
||||
err = fmt.Errorf("could not read bundle: %s", req.BundleId)
|
||||
if len(filteredBundle.GetSettings()) == 0 {
|
||||
err = fmt.Errorf("could not read bundle: %s", req.GetBundleId())
|
||||
return merrors.NotFound(g.id, "%s", err)
|
||||
}
|
||||
res.Bundle = filteredBundle
|
||||
@@ -134,18 +143,29 @@ func (g Service) ListBundles(ctx context.Context, req *settingssvc.ListBundlesRe
|
||||
if validationError := validateListBundles(req); validationError != nil {
|
||||
return merrors.BadRequest(g.id, "%s", validationError)
|
||||
}
|
||||
bundles, err := g.manager.ListBundles(settingsmsg.Bundle_TYPE_DEFAULT, req.BundleIds)
|
||||
bundles, err := g.manager.ListBundles(settingsmsg.Bundle_TYPE_DEFAULT, req.GetBundleIds())
|
||||
if err != nil {
|
||||
return merrors.NotFound(g.id, "%s", err)
|
||||
}
|
||||
roleIDs := g.getRoleIDs(ctx)
|
||||
|
||||
// find user locale
|
||||
var locale string
|
||||
if u, ok := ctxpkg.ContextGetUser(ctx); ok {
|
||||
var err error
|
||||
locale, err = g.getUserLocale(ctx, u.GetId().GetOpaqueId())
|
||||
if err != nil {
|
||||
g.logger.Error().Err(err).Str("userid", u.GetId().GetOpaqueId()).Msg("failed to get user locale")
|
||||
}
|
||||
}
|
||||
|
||||
// filter settings in bundles that are allowed according to roles
|
||||
var filteredBundles []*settingsmsg.Bundle
|
||||
for _, bundle := range bundles {
|
||||
filteredBundle := g.getFilteredBundle(roleIDs, bundle)
|
||||
if len(filteredBundle.Settings) > 0 {
|
||||
filteredBundles = append(filteredBundles, filteredBundle)
|
||||
if len(filteredBundle.GetSettings()) > 0 {
|
||||
t := l10n.NewTranslatorFromCommonConfig(g.config.DefaultLanguage, _domain, g.config.TranslationPath, _translationFS, "l10n/locale").Locale(locale)
|
||||
filteredBundles = append(filteredBundles, translateBundle(filteredBundle, t))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,7 +177,7 @@ func (g Service) getFilteredBundle(roleIDs []string, bundle *settingsmsg.Bundle)
|
||||
// check if full bundle is whitelisted
|
||||
bundleResource := &settingsmsg.Resource{
|
||||
Type: settingsmsg.Resource_TYPE_BUNDLE,
|
||||
Id: bundle.Id,
|
||||
Id: bundle.GetId(),
|
||||
}
|
||||
if g.hasPermission(
|
||||
roleIDs,
|
||||
@@ -170,10 +190,10 @@ func (g Service) getFilteredBundle(roleIDs []string, bundle *settingsmsg.Bundle)
|
||||
|
||||
// filter settings based on permissions
|
||||
var filteredSettings []*settingsmsg.Setting
|
||||
for _, setting := range bundle.Settings {
|
||||
for _, setting := range bundle.GetSettings() {
|
||||
settingResource := &settingsmsg.Resource{
|
||||
Type: settingsmsg.Resource_TYPE_SETTING,
|
||||
Id: setting.Id,
|
||||
Id: setting.GetId(),
|
||||
}
|
||||
if g.hasPermission(
|
||||
roleIDs,
|
||||
@@ -190,15 +210,15 @@ func (g Service) getFilteredBundle(roleIDs []string, bundle *settingsmsg.Bundle)
|
||||
|
||||
// AddSettingToBundle implements the BundleServiceHandler interface
|
||||
func (g Service) AddSettingToBundle(ctx context.Context, req *settingssvc.AddSettingToBundleRequest, res *settingssvc.AddSettingToBundleResponse) error {
|
||||
cleanUpResource(ctx, req.Setting.Resource)
|
||||
if err := g.checkStaticPermissionsByBundleID(ctx, req.BundleId); err != nil {
|
||||
cleanUpResource(ctx, req.GetSetting().GetResource())
|
||||
if err := g.checkStaticPermissionsByBundleID(ctx, req.GetBundleId()); err != nil {
|
||||
return err
|
||||
}
|
||||
if validationError := validateAddSettingToBundle(req); validationError != nil {
|
||||
return merrors.BadRequest(g.id, "%s", validationError)
|
||||
}
|
||||
|
||||
r, err := g.manager.AddSettingToBundle(req.BundleId, req.Setting)
|
||||
r, err := g.manager.AddSettingToBundle(req.GetBundleId(), req.GetSetting())
|
||||
if err != nil {
|
||||
return merrors.BadRequest(g.id, "%s", err)
|
||||
}
|
||||
@@ -208,14 +228,14 @@ func (g Service) AddSettingToBundle(ctx context.Context, req *settingssvc.AddSet
|
||||
|
||||
// RemoveSettingFromBundle implements the BundleServiceHandler interface
|
||||
func (g Service) RemoveSettingFromBundle(ctx context.Context, req *settingssvc.RemoveSettingFromBundleRequest, _ *emptypb.Empty) error {
|
||||
if err := g.checkStaticPermissionsByBundleID(ctx, req.BundleId); err != nil {
|
||||
if err := g.checkStaticPermissionsByBundleID(ctx, req.GetBundleId()); err != nil {
|
||||
return err
|
||||
}
|
||||
if validationError := validateRemoveSettingFromBundle(req); validationError != nil {
|
||||
return merrors.BadRequest(g.id, "%s", validationError)
|
||||
}
|
||||
|
||||
if err := g.manager.RemoveSettingFromBundle(req.BundleId, req.SettingId); err != nil {
|
||||
if err := g.manager.RemoveSettingFromBundle(req.GetBundleId(), req.GetSettingId()); err != nil {
|
||||
return merrors.BadRequest(g.id, "%s", err)
|
||||
}
|
||||
|
||||
@@ -224,17 +244,17 @@ func (g Service) RemoveSettingFromBundle(ctx context.Context, req *settingssvc.R
|
||||
|
||||
// SaveValue implements the ValueServiceHandler interface
|
||||
func (g Service) SaveValue(ctx context.Context, req *settingssvc.SaveValueRequest, res *settingssvc.SaveValueResponse) error {
|
||||
req.Value.AccountUuid = getValidatedAccountUUID(ctx, req.Value.AccountUuid)
|
||||
if !g.isCurrentUser(ctx, req.Value.AccountUuid) {
|
||||
req.Value.AccountUuid = getValidatedAccountUUID(ctx, req.GetValue().GetAccountUuid())
|
||||
if !g.isCurrentUser(ctx, req.GetValue().GetAccountUuid()) {
|
||||
return merrors.Forbidden(g.id, "can't save value for another user")
|
||||
}
|
||||
|
||||
cleanUpResource(ctx, req.Value.Resource)
|
||||
cleanUpResource(ctx, req.GetValue().GetResource())
|
||||
// TODO: we need to check, if the authenticated user has permission to write the value for the specified resource (e.g. global, file with id xy, ...)
|
||||
if validationError := validateSaveValue(req); validationError != nil {
|
||||
return merrors.BadRequest(g.id, validationError.Error())
|
||||
}
|
||||
r, err := g.manager.WriteValue(req.Value)
|
||||
r, err := g.manager.WriteValue(req.GetValue())
|
||||
if err != nil {
|
||||
return merrors.BadRequest(g.id, err.Error())
|
||||
}
|
||||
@@ -247,11 +267,11 @@ func (g Service) SaveValue(ctx context.Context, req *settingssvc.SaveValueReques
|
||||
}
|
||||
|
||||
// GetValue implements the ValueServiceHandler interface
|
||||
func (g Service) GetValue(ctx context.Context, req *settingssvc.GetValueRequest, res *settingssvc.GetValueResponse) error {
|
||||
func (g Service) GetValue(_ context.Context, req *settingssvc.GetValueRequest, res *settingssvc.GetValueResponse) error {
|
||||
if validationError := validateGetValue(req); validationError != nil {
|
||||
return merrors.BadRequest(g.id, "%s", validationError)
|
||||
}
|
||||
r, err := g.manager.ReadValue(req.Id)
|
||||
r, err := g.manager.ReadValue(req.GetId())
|
||||
if err != nil {
|
||||
return merrors.NotFound(g.id, "%s", err)
|
||||
}
|
||||
@@ -265,19 +285,19 @@ func (g Service) GetValue(ctx context.Context, req *settingssvc.GetValueRequest,
|
||||
|
||||
// GetValueByUniqueIdentifiers implements the ValueService interface
|
||||
func (g Service) GetValueByUniqueIdentifiers(ctx context.Context, req *settingssvc.GetValueByUniqueIdentifiersRequest, res *settingssvc.GetValueResponse) error {
|
||||
req.AccountUuid = getValidatedAccountUUID(ctx, req.AccountUuid)
|
||||
if !g.isCurrentUser(ctx, req.AccountUuid) {
|
||||
req.AccountUuid = getValidatedAccountUUID(ctx, req.GetAccountUuid())
|
||||
if !g.isCurrentUser(ctx, req.GetAccountUuid()) {
|
||||
return merrors.Forbidden(g.id, "can't get value of another user")
|
||||
}
|
||||
if validationError := validateGetValueByUniqueIdentifiers(req); validationError != nil {
|
||||
return merrors.BadRequest(g.id, validationError.Error())
|
||||
}
|
||||
v, err := g.manager.ReadValueByUniqueIdentifiers(req.AccountUuid, req.SettingId)
|
||||
v, err := g.manager.ReadValueByUniqueIdentifiers(req.GetAccountUuid(), req.GetSettingId())
|
||||
if err != nil {
|
||||
return merrors.NotFound(g.id, err.Error())
|
||||
}
|
||||
|
||||
if v.BundleId != "" {
|
||||
if v.GetBundleId() != "" {
|
||||
valueWithIdentifier, err := g.getValueWithIdentifier(v)
|
||||
if err != nil {
|
||||
return merrors.NotFound(g.id, err.Error())
|
||||
@@ -290,15 +310,15 @@ func (g Service) GetValueByUniqueIdentifiers(ctx context.Context, req *settingss
|
||||
|
||||
// ListValues implements the ValueServiceHandler interface
|
||||
func (g Service) ListValues(ctx context.Context, req *settingssvc.ListValuesRequest, res *settingssvc.ListValuesResponse) error {
|
||||
req.AccountUuid = getValidatedAccountUUID(ctx, req.AccountUuid)
|
||||
if !g.isCurrentUser(ctx, req.AccountUuid) {
|
||||
req.AccountUuid = getValidatedAccountUUID(ctx, req.GetAccountUuid())
|
||||
if !g.isCurrentUser(ctx, req.GetAccountUuid()) {
|
||||
return merrors.Forbidden(g.id, "can't list values of another user")
|
||||
}
|
||||
|
||||
if validationError := validateListValues(req); validationError != nil {
|
||||
return merrors.BadRequest(g.id, validationError.Error())
|
||||
}
|
||||
values, err := g.manager.ListValues(req.BundleId, req.AccountUuid)
|
||||
values, err := g.manager.ListValues(req.GetBundleId(), req.GetAccountUuid())
|
||||
if err != nil {
|
||||
return merrors.NotFound(g.id, err.Error())
|
||||
}
|
||||
@@ -314,12 +334,12 @@ func (g Service) ListValues(ctx context.Context, req *settingssvc.ListValuesRequ
|
||||
}
|
||||
|
||||
// ListRoles implements the RoleServiceHandler interface
|
||||
func (g Service) ListRoles(c context.Context, req *settingssvc.ListBundlesRequest, res *settingssvc.ListBundlesResponse) error {
|
||||
func (g Service) ListRoles(_ context.Context, req *settingssvc.ListBundlesRequest, res *settingssvc.ListBundlesResponse) error {
|
||||
//accountUUID := getValidatedAccountUUID(c, "me")
|
||||
if validationError := validateListRoles(req); validationError != nil {
|
||||
return merrors.BadRequest(g.id, "%s", validationError)
|
||||
}
|
||||
r, err := g.manager.ListBundles(settingsmsg.Bundle_TYPE_ROLE, req.BundleIds)
|
||||
r, err := g.manager.ListBundles(settingsmsg.Bundle_TYPE_ROLE, req.GetBundleIds())
|
||||
if err != nil {
|
||||
return merrors.NotFound(g.id, "%s", err)
|
||||
}
|
||||
@@ -330,11 +350,11 @@ func (g Service) ListRoles(c context.Context, req *settingssvc.ListBundlesReques
|
||||
|
||||
// ListRoleAssignments implements the RoleServiceHandler interface
|
||||
func (g Service) ListRoleAssignments(ctx context.Context, req *settingssvc.ListRoleAssignmentsRequest, res *settingssvc.ListRoleAssignmentsResponse) error {
|
||||
req.AccountUuid = getValidatedAccountUUID(ctx, req.AccountUuid)
|
||||
req.AccountUuid = getValidatedAccountUUID(ctx, req.GetAccountUuid())
|
||||
if validationError := validateListRoleAssignments(req); validationError != nil {
|
||||
return merrors.BadRequest(g.id, "%s", validationError)
|
||||
}
|
||||
r, err := g.manager.ListRoleAssignments(req.AccountUuid)
|
||||
r, err := g.manager.ListRoleAssignments(req.GetAccountUuid())
|
||||
if err != nil {
|
||||
return merrors.NotFound(g.id, "%s", err)
|
||||
}
|
||||
@@ -342,6 +362,7 @@ func (g Service) ListRoleAssignments(ctx context.Context, req *settingssvc.ListR
|
||||
return nil
|
||||
}
|
||||
|
||||
// ListRoleAssignmentsFiltered implements the RoleServiceHandler interface. Who made this up? And why is everyone copying it? So this methods lists role assignments filtered by account or role.
|
||||
func (g Service) ListRoleAssignmentsFiltered(ctx context.Context, req *settingssvc.ListRoleAssignmentsFilteredRequest, res *settingssvc.ListRoleAssignmentsResponse) error {
|
||||
if validationError := validateListRoleAssignmentsFiltered(req); validationError != nil {
|
||||
return merrors.BadRequest(g.id, "%s", validationError)
|
||||
@@ -367,7 +388,7 @@ func (g Service) ListRoleAssignmentsFiltered(ctx context.Context, req *settingss
|
||||
|
||||
// AssignRoleToUser implements the RoleServiceHandler interface
|
||||
func (g Service) AssignRoleToUser(ctx context.Context, req *settingssvc.AssignRoleToUserRequest, res *settingssvc.AssignRoleToUserResponse) error {
|
||||
req.AccountUuid = getValidatedAccountUUID(ctx, req.AccountUuid)
|
||||
req.AccountUuid = getValidatedAccountUUID(ctx, req.GetAccountUuid())
|
||||
if validationError := validateAssignRoleToUser(req); validationError != nil {
|
||||
return merrors.BadRequest(g.id, validationError.Error())
|
||||
}
|
||||
@@ -379,13 +400,13 @@ func (g Service) AssignRoleToUser(ctx context.Context, req *settingssvc.AssignRo
|
||||
}
|
||||
|
||||
switch {
|
||||
case ownAccountUUID == req.AccountUuid:
|
||||
case ownAccountUUID == req.GetAccountUuid():
|
||||
// Allow users to assign themself to the user or user light role
|
||||
// deny any other attempt to change the user's own assignment
|
||||
if r, err := g.manager.ListRoleAssignments(req.AccountUuid); err == nil && len(r) > 0 {
|
||||
if r, err := g.manager.ListRoleAssignments(req.GetAccountUuid()); err == nil && len(r) > 0 {
|
||||
return merrors.Forbidden(g.id, "Changing own role assignment forbidden")
|
||||
}
|
||||
if req.RoleId != defaults.BundleUUIDRoleUser && req.RoleId != defaults.BundleUUIDRoleUserLight {
|
||||
if req.GetRoleId() != defaults.BundleUUIDRoleUser && req.GetRoleId() != defaults.BundleUUIDRoleUserLight {
|
||||
return merrors.Forbidden(g.id, "Changing own role assignment forbidden")
|
||||
}
|
||||
g.logger.Debug().Str("userid", ownAccountUUID).Msg("Self-assignment for default 'user' role permitted")
|
||||
@@ -394,7 +415,7 @@ func (g Service) AssignRoleToUser(ctx context.Context, req *settingssvc.AssignRo
|
||||
return merrors.Forbidden(g.id, "user has no role management permission")
|
||||
}
|
||||
|
||||
r, err := g.manager.WriteRoleAssignment(req.AccountUuid, req.RoleId)
|
||||
r, err := g.manager.WriteRoleAssignment(req.GetAccountUuid(), req.GetRoleId())
|
||||
if err != nil {
|
||||
return merrors.BadRequest(g.id, err.Error())
|
||||
}
|
||||
@@ -425,13 +446,13 @@ func (g Service) RemoveRoleFromUser(ctx context.Context, req *settingssvc.Remove
|
||||
}
|
||||
|
||||
for _, a := range al {
|
||||
if a.Id == req.Id {
|
||||
if a.GetId() == req.GetId() {
|
||||
g.logger.Debug().Str("id", g.id).Msg("Removing own role assignment forbidden")
|
||||
return merrors.Forbidden(g.id, "Removing own role assignment forbidden")
|
||||
}
|
||||
}
|
||||
|
||||
if err := g.manager.RemoveRoleAssignment(req.Id); err != nil {
|
||||
if err := g.manager.RemoveRoleAssignment(req.GetId()); err != nil {
|
||||
return merrors.BadRequest(g.id, err.Error())
|
||||
}
|
||||
return nil
|
||||
@@ -445,11 +466,11 @@ func (g Service) ListPermissions(ctx context.Context, req *settingssvc.ListPermi
|
||||
return merrors.InternalServerError(g.id, "user not in context")
|
||||
}
|
||||
|
||||
if ownAccountUUID != req.AccountUuid {
|
||||
return merrors.NotFound(g.id, "user not found: %s", req.AccountUuid)
|
||||
if ownAccountUUID != req.GetAccountUuid() {
|
||||
return merrors.NotFound(g.id, "user not found: %s", req.GetAccountUuid())
|
||||
}
|
||||
|
||||
assignments, err := g.manager.ListRoleAssignments(req.AccountUuid)
|
||||
assignments, err := g.manager.ListRoleAssignments(req.GetAccountUuid())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -457,7 +478,7 @@ func (g Service) ListPermissions(ctx context.Context, req *settingssvc.ListPermi
|
||||
// deduplicate role ids
|
||||
roleIDs := map[string]struct{}{}
|
||||
for _, a := range assignments {
|
||||
roleIDs[a.RoleId] = struct{}{}
|
||||
roleIDs[a.GetRoleId()] = struct{}{}
|
||||
}
|
||||
|
||||
// deduplicate permission names
|
||||
@@ -491,7 +512,7 @@ func (g Service) ListPermissionsByResource(ctx context.Context, req *settingssvc
|
||||
if validationError := validateListPermissionsByResource(req); validationError != nil {
|
||||
return merrors.BadRequest(g.id, "%s", validationError)
|
||||
}
|
||||
permissions, err := g.manager.ListPermissionsByResource(req.Resource, g.getRoleIDs(ctx))
|
||||
permissions, err := g.manager.ListPermissionsByResource(req.GetResource(), g.getRoleIDs(ctx))
|
||||
if err != nil {
|
||||
return merrors.BadRequest(g.id, "%s", err)
|
||||
}
|
||||
@@ -504,12 +525,12 @@ func (g Service) GetPermissionByID(ctx context.Context, req *settingssvc.GetPerm
|
||||
if validationError := validateGetPermissionByID(req); validationError != nil {
|
||||
return merrors.BadRequest(g.id, "%s", validationError)
|
||||
}
|
||||
permission, err := g.manager.ReadPermissionByID(req.PermissionId, g.getRoleIDs(ctx))
|
||||
permission, err := g.manager.ReadPermissionByID(req.GetPermissionId(), g.getRoleIDs(ctx))
|
||||
if err != nil {
|
||||
return merrors.BadRequest(g.id, "%s", err)
|
||||
}
|
||||
if permission == nil {
|
||||
return merrors.NotFound(g.id, "%s", fmt.Errorf("permission %s not found in roles", req.PermissionId))
|
||||
return merrors.NotFound(g.id, "%s", fmt.Errorf("permission %s not found in roles", req.GetPermissionId()))
|
||||
}
|
||||
res.Permission = permission
|
||||
return nil
|
||||
@@ -517,8 +538,8 @@ func (g Service) GetPermissionByID(ctx context.Context, req *settingssvc.GetPerm
|
||||
|
||||
// cleanUpResource makes sure that the account uuid of the authenticated user is injected if needed.
|
||||
func cleanUpResource(ctx context.Context, resource *settingsmsg.Resource) {
|
||||
if resource != nil && resource.Type == settingsmsg.Resource_TYPE_USER {
|
||||
resource.Id = getValidatedAccountUUID(ctx, resource.Id)
|
||||
if resource != nil && resource.GetType() == settingsmsg.Resource_TYPE_USER {
|
||||
resource.Id = getValidatedAccountUUID(ctx, resource.GetId())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -551,7 +572,7 @@ func (g Service) getRoleIDs(ctx context.Context) []string {
|
||||
|
||||
ownRoleIDs := make([]string, 0, len(assignments))
|
||||
for _, a := range assignments {
|
||||
ownRoleIDs = append(ownRoleIDs, a.RoleId)
|
||||
ownRoleIDs = append(ownRoleIDs, a.GetRoleId())
|
||||
}
|
||||
return ownRoleIDs
|
||||
}
|
||||
@@ -560,19 +581,19 @@ func (g Service) getRoleIDs(ctx context.Context) []string {
|
||||
}
|
||||
|
||||
func (g Service) getValueWithIdentifier(value *settingsmsg.Value) (*settingsmsg.ValueWithIdentifier, error) {
|
||||
bundle, err := g.manager.ReadBundle(value.BundleId)
|
||||
bundle, err := g.manager.ReadBundle(value.GetBundleId())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setting, err := g.manager.ReadSetting(value.SettingId)
|
||||
setting, err := g.manager.ReadSetting(value.GetSettingId())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &settingsmsg.ValueWithIdentifier{
|
||||
Identifier: &settingsmsg.Identifier{
|
||||
Extension: bundle.Extension,
|
||||
Bundle: bundle.Name,
|
||||
Setting: setting.Name,
|
||||
Extension: bundle.GetExtension(),
|
||||
Bundle: bundle.GetName(),
|
||||
Setting: setting.GetName(),
|
||||
},
|
||||
Value: value,
|
||||
}, nil
|
||||
@@ -596,12 +617,12 @@ func (g Service) hasStaticPermission(ctx context.Context, permissionID string) b
|
||||
}
|
||||
|
||||
// deduplicate roleids
|
||||
uniqueRoleIds := make(map[string]struct{})
|
||||
uniqueRoleIDs := make(map[string]struct{})
|
||||
for _, a := range assignments {
|
||||
uniqueRoleIds[a.GetRoleId()] = struct{}{}
|
||||
uniqueRoleIDs[a.GetRoleId()] = struct{}{}
|
||||
}
|
||||
roleIDs = make([]string, 0, len(uniqueRoleIds))
|
||||
for a := range uniqueRoleIds {
|
||||
roleIDs = make([]string, 0, len(uniqueRoleIDs))
|
||||
for a := range uniqueRoleIDs {
|
||||
roleIDs = append(roleIDs, a)
|
||||
}
|
||||
}
|
||||
@@ -614,7 +635,7 @@ func (g Service) checkStaticPermissionsByBundleID(ctx context.Context, bundleID
|
||||
if err != nil {
|
||||
return merrors.NotFound(g.id, "bundle not found: %s", err)
|
||||
}
|
||||
return g.checkStaticPermissionsByBundleType(ctx, bundle.Type)
|
||||
return g.checkStaticPermissionsByBundleType(ctx, bundle.GetType())
|
||||
}
|
||||
|
||||
func (g Service) checkStaticPermissionsByBundleType(ctx context.Context, bundleType settingsmsg.Bundle_Type) error {
|
||||
@@ -642,7 +663,58 @@ func (g Service) canManageRoles(ctx context.Context) bool {
|
||||
return g.hasStaticPermission(ctx, RoleManagementPermissionID)
|
||||
}
|
||||
|
||||
func (g Service) getUserLocale(ctx context.Context, userID string) (string, error) {
|
||||
var resp settingssvc.GetValueResponse
|
||||
err := g.GetValueByUniqueIdentifiers(
|
||||
ctx,
|
||||
&settingssvc.GetValueByUniqueIdentifiersRequest{
|
||||
AccountUuid: userID,
|
||||
SettingId: defaults.SettingUUIDProfileLanguage,
|
||||
},
|
||||
&resp,
|
||||
)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
val := resp.GetValue().GetValue().GetListValue().GetValues()
|
||||
if len(val) == 0 {
|
||||
return "", errors.New("no language setting found")
|
||||
}
|
||||
return val[0].GetStringValue(), nil
|
||||
}
|
||||
|
||||
func formatPermissionName(setting *settingsmsg.Setting) string {
|
||||
constraint := strings.TrimPrefix(setting.GetPermissionValue().GetConstraint().String(), "CONSTRAINT_")
|
||||
return setting.Name + "." + strings.ToLower(constraint)
|
||||
return setting.GetName() + "." + strings.ToLower(constraint)
|
||||
}
|
||||
|
||||
func translateBundle(bundle *settingsmsg.Bundle, t *gotext.Locale) *settingsmsg.Bundle {
|
||||
for i, set := range bundle.GetSettings() {
|
||||
switch set.GetId() {
|
||||
default:
|
||||
continue
|
||||
case defaults.SettingUUIDProfileEmailSendingInterval:
|
||||
// translate interval names ('Instant', 'Daily', 'Weekly', 'Never')
|
||||
value := set.GetSingleChoiceValue()
|
||||
for i, v := range value.GetOptions() {
|
||||
value.Options[i].DisplayValue = t.Get(v.GetDisplayValue())
|
||||
}
|
||||
set.Value = &settingsmsg.Setting_SingleChoiceValue{SingleChoiceValue: value}
|
||||
fallthrough
|
||||
case defaults.SettingUUIDProfileEventShareCreated,
|
||||
defaults.SettingUUIDProfileEventShareRemoved,
|
||||
defaults.SettingUUIDProfileEventShareExpired,
|
||||
defaults.SettingUUIDProfileEventSpaceShared,
|
||||
defaults.SettingUUIDProfileEventSpaceUnshared,
|
||||
defaults.SettingUUIDProfileEventSpaceMembershipExpired,
|
||||
defaults.SettingUUIDProfileEventSpaceDisabled,
|
||||
defaults.SettingUUIDProfileEventSpaceDeleted:
|
||||
// translate event names ('Share Received', 'Share Removed', ...)
|
||||
set.DisplayName = t.Get(set.GetDisplayName())
|
||||
// translate event descriptions ('Notify me when I receive a share', ...)
|
||||
set.Description = t.Get(set.GetDescription())
|
||||
bundle.Settings[i] = set
|
||||
}
|
||||
}
|
||||
return bundle
|
||||
}
|
||||
@@ -31,9 +31,13 @@ type defaultLanguageDecorator struct {
|
||||
func (s *defaultLanguageDecorator) GetValueByUniqueIdentifiers(ctx context.Context, req *settingssvc.GetValueByUniqueIdentifiersRequest, res *settingssvc.GetValueResponse) error {
|
||||
err := s.ServiceHandler.GetValueByUniqueIdentifiers(ctx, req, res)
|
||||
if err != nil {
|
||||
if strings.Contains(strings.ToLower(err.Error()), "not found") && req.GetSettingId() == defaults.SettingUUIDProfileLanguage && res.GetValue() == nil {
|
||||
res.Value = s.withDefaultLanguageSetting(req.AccountUuid)
|
||||
return nil
|
||||
if strings.Contains(strings.ToLower(err.Error()), "not found") && res.GetValue() == nil {
|
||||
defaultValueList := getDefaultValueList()
|
||||
// Ensure the default values for profile settings
|
||||
if _, ok := defaultValueList[req.GetSettingId()]; ok {
|
||||
res.Value = s.withDefaultProfileValue(ctx, req.AccountUuid, req.GetSettingId())
|
||||
return nil
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
@@ -46,13 +50,21 @@ func (s *defaultLanguageDecorator) ListValues(ctx context.Context, req *settings
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defaultValueList := getDefaultValueList()
|
||||
for _, v := range res.Values {
|
||||
if v.GetValue().GetSettingId() == defaults.SettingUUIDProfileLanguage {
|
||||
return nil
|
||||
delete(defaultValueList, v.GetValue().GetSettingId())
|
||||
}
|
||||
|
||||
// Ensure the default values for profile settings
|
||||
defaultValueList = s.withDefaultProfileValueList(ctx, req.AccountUuid, defaultValueList)
|
||||
if len(defaultValueList) > 0 {
|
||||
for _, v := range defaultValueList {
|
||||
if v != nil {
|
||||
res.Values = append(res.Values, v)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
res.Values = append(res.Values, s.withDefaultLanguageSetting(req.AccountUuid))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -82,3 +94,93 @@ func (s *defaultLanguageDecorator) withDefaultLanguageSetting(accountUUID string
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func (s *defaultLanguageDecorator) withDefaultProfileValue(ctx context.Context, accountUUID string, settingId string) *settingsmsg.ValueWithIdentifier {
|
||||
if settingId == defaults.SettingUUIDProfileLanguage {
|
||||
return s.withDefaultLanguageSetting(accountUUID)
|
||||
}
|
||||
res := s.withDefaultProfileValueList(ctx, accountUUID, map[string]*settingsmsg.ValueWithIdentifier{settingId: nil})
|
||||
if v, ok := res[settingId]; ok {
|
||||
return v
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *defaultLanguageDecorator) withDefaultProfileValueList(ctx context.Context,
|
||||
accountUUID string, requested map[string]*settingsmsg.ValueWithIdentifier) map[string]*settingsmsg.ValueWithIdentifier {
|
||||
|
||||
// we use the default profile bundle instead of s.GetBundle(ctx, req, resp)
|
||||
bundle := defaults.GenerateDefaultProfileBundle()
|
||||
|
||||
for _, setting := range bundle.GetSettings() {
|
||||
if v, ok := requested[setting.GetId()]; !ok || v != nil {
|
||||
continue
|
||||
}
|
||||
if setting.GetId() == defaults.SettingUUIDProfileLanguage {
|
||||
requested[setting.GetId()] = s.withDefaultLanguageSetting(accountUUID)
|
||||
continue
|
||||
}
|
||||
|
||||
newVal := &settingsmsg.ValueWithIdentifier{
|
||||
Identifier: &settingsmsg.Identifier{
|
||||
Extension: bundle.GetExtension(),
|
||||
Bundle: bundle.GetName(),
|
||||
Setting: setting.GetName(),
|
||||
},
|
||||
Value: &settingsmsg.Value{
|
||||
BundleId: bundle.GetId(),
|
||||
SettingId: setting.GetId(),
|
||||
AccountUuid: accountUUID,
|
||||
Resource: setting.GetResource(),
|
||||
},
|
||||
}
|
||||
|
||||
switch val := setting.GetValue().(type) {
|
||||
case *settingsmsg.Setting_MultiChoiceCollectionValue:
|
||||
newVal.Value.Value = multiChoiceCollectionToValue(val.MultiChoiceCollectionValue)
|
||||
requested[setting.GetId()] = newVal
|
||||
}
|
||||
}
|
||||
|
||||
return requested
|
||||
}
|
||||
|
||||
func multiChoiceCollectionToValue(collection *settingsmsg.MultiChoiceCollection) *settingsmsg.Value_CollectionValue {
|
||||
values := make([]*settingsmsg.CollectionOption, 0, len(collection.GetOptions()))
|
||||
for _, option := range collection.GetOptions() {
|
||||
switch o := option.GetValue().GetOption().(type) {
|
||||
case *settingsmsg.MultiChoiceCollectionOptionValue_BoolValue:
|
||||
if o != nil {
|
||||
values = append(values, &settingsmsg.CollectionOption{
|
||||
Key: option.GetKey(),
|
||||
Option: &settingsmsg.CollectionOption_BoolValue{
|
||||
BoolValue: o.BoolValue.GetDefault(),
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return &settingsmsg.Value_CollectionValue{
|
||||
CollectionValue: &settingsmsg.CollectionValue{
|
||||
Values: values,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func getDefaultValueList() map[string]*settingsmsg.ValueWithIdentifier {
|
||||
return map[string]*settingsmsg.ValueWithIdentifier{
|
||||
// specific profile settings should be handled individually
|
||||
defaults.SettingUUIDProfileLanguage: nil,
|
||||
// all other profile settings that populated from the bundle based on type
|
||||
defaults.SettingUUIDProfileEventShareCreated: nil,
|
||||
defaults.SettingUUIDProfileEventShareRemoved: nil,
|
||||
defaults.SettingUUIDProfileEventShareExpired: nil,
|
||||
defaults.SettingUUIDProfileEventSpaceShared: nil,
|
||||
defaults.SettingUUIDProfileEventSpaceUnshared: nil,
|
||||
defaults.SettingUUIDProfileEventSpaceMembershipExpired: nil,
|
||||
defaults.SettingUUIDProfileEventSpaceDisabled: nil,
|
||||
defaults.SettingUUIDProfileEventSpaceDeleted: nil,
|
||||
defaults.SettingUUIDProfileEventPostprocessingStepFinished: nil,
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package svc
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"regexp"
|
||||
|
||||
validation "github.com/invopop/validation"
|
||||
@@ -85,6 +86,14 @@ func validateSaveValue(req *settingssvc.SaveValueRequest) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if v := req.GetValue().GetCollectionValue().GetValues(); v != nil {
|
||||
for i := range v {
|
||||
if err := validation.Validate(v[i].GetKey(), validation.Required); err != nil {
|
||||
return fmt.Errorf("collectionValue.values[%d].key %w", i, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: validate values against the respective setting. need to check if constraints of the setting are fulfilled.
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -24,6 +24,27 @@ const (
|
||||
SettingUUIDProfileDisableNotifications = "33ffb5d6-cd07-4dc0-afb0-84f7559ae438"
|
||||
// SettingUUIDProfileAutoAcceptShares is the hardcoded setting UUID for the disable notifications setting
|
||||
SettingUUIDProfileAutoAcceptShares = "ec3ed4a3-3946-4efc-8f9f-76d38b12d3a9"
|
||||
|
||||
// SettingUUIDProfileEmailSendingInterval is the hardcoded setting UUID for the email sending interval setting
|
||||
SettingUUIDProfileEmailSendingInterval = "08dec2fe-3f97-42a9-9d1b-500855e92f25"
|
||||
// SettingUUIDProfileEventShareCreated it the hardcoded setting UUID for the send in app setting
|
||||
SettingUUIDProfileEventShareCreated = "872d8ef6-6f2a-42ab-af7d-f53cc81d7046"
|
||||
// SettingUUIDProfileEventShareRemoved is the hardcoded setting UUID for the send in app setting
|
||||
SettingUUIDProfileEventShareRemoved = "d7484394-8321-4c84-9677-741ba71e1f80"
|
||||
// SettingUUIDProfileEventShareExpired is the hardcoded setting UUID for the send in app setting
|
||||
SettingUUIDProfileEventShareExpired = "e1aa0b7c-1b0f-4072-9325-c643c89fee4e"
|
||||
// SettingUUIDProfileEventSpaceShared is the hardcoded setting UUID for the send in app setting
|
||||
SettingUUIDProfileEventSpaceShared = "694d5ee1-a41c-448c-8d14-396b95d2a918"
|
||||
// SettingUUIDProfileEventSpaceUnshared is the hardcoded setting UUID for the send in app setting
|
||||
SettingUUIDProfileEventSpaceUnshared = "26c20e0e-98df-4483-8a77-759b3a766af0"
|
||||
// SettingUUIDProfileEventSpaceMembershipExpired is the hardcoded setting UUID for the send in app setting
|
||||
SettingUUIDProfileEventSpaceMembershipExpired = "7275921e-b737-4074-ba91-3c2983be3edd"
|
||||
// SettingUUIDProfileEventSpaceDisabled is the hardcoded setting UUID for the send in app setting
|
||||
SettingUUIDProfileEventSpaceDisabled = "eb5c716e-03be-42c6-9ed1-1105d24e109f"
|
||||
// SettingUUIDProfileEventSpaceDeleted is the hardcoded setting UUID for the send in app setting
|
||||
SettingUUIDProfileEventSpaceDeleted = "094ceca9-5a00-40ba-bb1a-bbc7bccd39ee"
|
||||
// SettingUUIDProfileEventPostprocessingStepFinished is the hardcoded setting UUID for the send in mail setting
|
||||
SettingUUIDProfileEventPostprocessingStepFinished = "fe0a3011-d886-49c8-b797-33d02fa426ef"
|
||||
)
|
||||
|
||||
// GenerateBundlesDefaultRoles bootstraps the default roles.
|
||||
@@ -37,6 +58,11 @@ func GenerateBundlesDefaultRoles() []*settingsmsg.Bundle {
|
||||
}
|
||||
}
|
||||
|
||||
// GenerateDefaultProfileBundle return the default profile bundle.
|
||||
func GenerateDefaultProfileBundle() *settingsmsg.Bundle {
|
||||
return generateBundleProfileRequest()
|
||||
}
|
||||
|
||||
// ServiceAccountBundle returns the service account bundle
|
||||
func ServiceAccountBundle() *settingsmsg.Bundle {
|
||||
return &settingsmsg.Bundle{
|
||||
@@ -94,6 +120,16 @@ func generateBundleAdminRole() *settingsmsg.Bundle {
|
||||
DeleteProjectSpacesPermission(All),
|
||||
DeleteReadOnlyPublicLinkPasswordPermission(All),
|
||||
DisableEmailNotificationsPermission(Own),
|
||||
ProfileEmailSendingIntervalPermission(Own),
|
||||
ProfileEventShareCreatedPermission(Own),
|
||||
ProfileEventShareRemovedPermission(Own),
|
||||
ProfileEventShareExpiredPermission(Own),
|
||||
ProfileEventSpaceSharedPermission(Own),
|
||||
ProfileEventSpaceUnsharedPermission(Own),
|
||||
ProfileEventSpaceMembershipExpiredPermission(Own),
|
||||
ProfileEventSpaceDisabledPermission(Own),
|
||||
ProfileEventSpaceDeletedPermission(Own),
|
||||
ProfileEventPostprocessingStepFinishedPermission(Own),
|
||||
GroupManagementPermission(All),
|
||||
LanguageManagementPermission(All),
|
||||
ListFavoritesPermission(Own),
|
||||
@@ -127,6 +163,16 @@ func generateBundleSpaceAdminRole() *settingsmsg.Bundle {
|
||||
DeleteProjectSpacesPermission(All),
|
||||
DeleteReadOnlyPublicLinkPasswordPermission(All),
|
||||
DisableEmailNotificationsPermission(Own),
|
||||
ProfileEmailSendingIntervalPermission(Own),
|
||||
ProfileEventShareCreatedPermission(Own),
|
||||
ProfileEventShareRemovedPermission(Own),
|
||||
ProfileEventShareExpiredPermission(Own),
|
||||
ProfileEventSpaceSharedPermission(Own),
|
||||
ProfileEventSpaceUnsharedPermission(Own),
|
||||
ProfileEventSpaceMembershipExpiredPermission(Own),
|
||||
ProfileEventSpaceDisabledPermission(Own),
|
||||
ProfileEventSpaceDeletedPermission(Own),
|
||||
ProfileEventPostprocessingStepFinishedPermission(Own),
|
||||
LanguageManagementPermission(Own),
|
||||
ListFavoritesPermission(Own),
|
||||
ListSpacesPermission(All),
|
||||
@@ -155,6 +201,16 @@ func generateBundleUserRole() *settingsmsg.Bundle {
|
||||
CreateSharePermission(All),
|
||||
CreateSpacesPermission(Own),
|
||||
DisableEmailNotificationsPermission(Own),
|
||||
ProfileEmailSendingIntervalPermission(Own),
|
||||
ProfileEventShareCreatedPermission(Own),
|
||||
ProfileEventShareRemovedPermission(Own),
|
||||
ProfileEventShareExpiredPermission(Own),
|
||||
ProfileEventSpaceSharedPermission(Own),
|
||||
ProfileEventSpaceUnsharedPermission(Own),
|
||||
ProfileEventSpaceMembershipExpiredPermission(Own),
|
||||
ProfileEventSpaceDisabledPermission(Own),
|
||||
ProfileEventSpaceDeletedPermission(Own),
|
||||
ProfileEventPostprocessingStepFinishedPermission(Own),
|
||||
LanguageManagementPermission(Own),
|
||||
ListFavoritesPermission(Own),
|
||||
SelfManagementPermission(Own),
|
||||
@@ -176,6 +232,7 @@ func generateBundleUserLightRole() *settingsmsg.Bundle {
|
||||
Settings: []*settingsmsg.Setting{
|
||||
AutoAcceptSharesPermission(Own),
|
||||
DisableEmailNotificationsPermission(Own),
|
||||
ProfileEmailSendingIntervalPermission(Own),
|
||||
LanguageManagementPermission(Own),
|
||||
},
|
||||
}
|
||||
@@ -222,10 +279,250 @@ func generateBundleProfileRequest() *settingsmsg.Bundle {
|
||||
},
|
||||
Value: &settingsmsg.Setting_BoolValue{BoolValue: &settingsmsg.Bool{Default: true, Label: "auto accept shares"}},
|
||||
},
|
||||
{
|
||||
Id: SettingUUIDProfileEmailSendingInterval,
|
||||
Name: "email-sending-interval-options",
|
||||
DisplayName: TemplateEmailSendingInterval,
|
||||
Description: TemplateEmailSendingIntervalDescription,
|
||||
Resource: &settingsmsg.Resource{
|
||||
Type: settingsmsg.Resource_TYPE_USER,
|
||||
},
|
||||
Value: &sendEmailOptions,
|
||||
},
|
||||
{
|
||||
Id: SettingUUIDProfileEventShareCreated,
|
||||
Name: "event-share-created-options",
|
||||
DisplayName: TemplateShareCreated,
|
||||
Description: TemplateShareCreatedDescription,
|
||||
Resource: &settingsmsg.Resource{
|
||||
Type: settingsmsg.Resource_TYPE_USER,
|
||||
},
|
||||
Value: &settingsmsg.Setting_MultiChoiceCollectionValue{
|
||||
MultiChoiceCollectionValue: &settingsmsg.MultiChoiceCollection{
|
||||
Options: []*settingsmsg.MultiChoiceCollectionOption{
|
||||
&optionInAppTrue,
|
||||
&optionMailTrue,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Id: SettingUUIDProfileEventShareRemoved,
|
||||
Name: "event-share-removed-options",
|
||||
DisplayName: TemplateShareRemoved,
|
||||
Description: TemplateShareRemovedDescription,
|
||||
Resource: &settingsmsg.Resource{
|
||||
Type: settingsmsg.Resource_TYPE_USER,
|
||||
},
|
||||
Value: &settingsmsg.Setting_MultiChoiceCollectionValue{
|
||||
MultiChoiceCollectionValue: &settingsmsg.MultiChoiceCollection{
|
||||
Options: []*settingsmsg.MultiChoiceCollectionOption{
|
||||
&optionInAppTrue,
|
||||
&optionMailFalseDisabled,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Id: SettingUUIDProfileEventShareExpired,
|
||||
Name: "event-share-expired-options",
|
||||
DisplayName: TemplateShareExpired,
|
||||
Description: TemplateShareExpiredDescription,
|
||||
Resource: &settingsmsg.Resource{
|
||||
Type: settingsmsg.Resource_TYPE_USER,
|
||||
},
|
||||
Value: &settingsmsg.Setting_MultiChoiceCollectionValue{
|
||||
MultiChoiceCollectionValue: &settingsmsg.MultiChoiceCollection{
|
||||
Options: []*settingsmsg.MultiChoiceCollectionOption{
|
||||
&optionInAppTrue,
|
||||
&optionMailTrue,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Id: SettingUUIDProfileEventSpaceShared,
|
||||
Name: "event-space-shared-options",
|
||||
DisplayName: TemplateSpaceShared,
|
||||
Description: TemplateSpaceSharedDescription,
|
||||
Resource: &settingsmsg.Resource{
|
||||
Type: settingsmsg.Resource_TYPE_USER,
|
||||
},
|
||||
Value: &settingsmsg.Setting_MultiChoiceCollectionValue{
|
||||
MultiChoiceCollectionValue: &settingsmsg.MultiChoiceCollection{
|
||||
Options: []*settingsmsg.MultiChoiceCollectionOption{
|
||||
&optionInAppTrue,
|
||||
&optionMailTrue,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Id: SettingUUIDProfileEventSpaceUnshared,
|
||||
Name: "event-space-unshared-options",
|
||||
DisplayName: TemplateSpaceUnshared,
|
||||
Description: TemplateSpaceUnsharedDescription,
|
||||
Resource: &settingsmsg.Resource{
|
||||
Type: settingsmsg.Resource_TYPE_USER,
|
||||
},
|
||||
Value: &settingsmsg.Setting_MultiChoiceCollectionValue{
|
||||
MultiChoiceCollectionValue: &settingsmsg.MultiChoiceCollection{
|
||||
Options: []*settingsmsg.MultiChoiceCollectionOption{
|
||||
&optionInAppTrue,
|
||||
&optionMailTrue,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Id: SettingUUIDProfileEventSpaceMembershipExpired,
|
||||
Name: "event-space-membership-expired-options",
|
||||
DisplayName: TemplateSpaceMembershipExpired,
|
||||
Description: TemplateSpaceMembershipExpiredDescription,
|
||||
Resource: &settingsmsg.Resource{
|
||||
Type: settingsmsg.Resource_TYPE_USER,
|
||||
},
|
||||
Value: &settingsmsg.Setting_MultiChoiceCollectionValue{
|
||||
MultiChoiceCollectionValue: &settingsmsg.MultiChoiceCollection{
|
||||
Options: []*settingsmsg.MultiChoiceCollectionOption{
|
||||
&optionInAppTrue,
|
||||
&optionMailTrue,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Id: SettingUUIDProfileEventSpaceDisabled,
|
||||
Name: "event-space-disabled-options",
|
||||
DisplayName: TemplateSpaceDisabled,
|
||||
Description: TemplateSpaceDisabledDescription,
|
||||
Resource: &settingsmsg.Resource{
|
||||
Type: settingsmsg.Resource_TYPE_USER,
|
||||
},
|
||||
Value: &settingsmsg.Setting_MultiChoiceCollectionValue{
|
||||
MultiChoiceCollectionValue: &settingsmsg.MultiChoiceCollection{
|
||||
Options: []*settingsmsg.MultiChoiceCollectionOption{
|
||||
&optionInAppTrue,
|
||||
&optionMailFalseDisabled,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Id: SettingUUIDProfileEventSpaceDeleted,
|
||||
Name: "event-space-deleted-options",
|
||||
DisplayName: TemplateSpaceDeleted,
|
||||
Description: TemplateSpaceDeletedDescription,
|
||||
Resource: &settingsmsg.Resource{
|
||||
Type: settingsmsg.Resource_TYPE_USER,
|
||||
},
|
||||
Value: &settingsmsg.Setting_MultiChoiceCollectionValue{
|
||||
MultiChoiceCollectionValue: &settingsmsg.MultiChoiceCollection{
|
||||
Options: []*settingsmsg.MultiChoiceCollectionOption{
|
||||
&optionInAppTrue,
|
||||
&optionMailFalseDisabled,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Id: SettingUUIDProfileEventPostprocessingStepFinished,
|
||||
Name: "event-postprocessing-step-finished-options",
|
||||
DisplayName: TemplateFileRejected,
|
||||
Description: TemplateFileRejectedDescription,
|
||||
Resource: &settingsmsg.Resource{
|
||||
Type: settingsmsg.Resource_TYPE_USER,
|
||||
},
|
||||
Value: &settingsmsg.Setting_MultiChoiceCollectionValue{
|
||||
MultiChoiceCollectionValue: &settingsmsg.MultiChoiceCollection{
|
||||
Options: []*settingsmsg.MultiChoiceCollectionOption{
|
||||
&optionInAppTrue,
|
||||
&optionMailFalseDisabled,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
var sendEmailOptions = settingsmsg.Setting_SingleChoiceValue{
|
||||
SingleChoiceValue: &settingsmsg.SingleChoiceList{
|
||||
Options: []*settingsmsg.ListOption{
|
||||
{
|
||||
Value: &settingsmsg.ListOptionValue{
|
||||
Option: &settingsmsg.ListOptionValue_StringValue{
|
||||
StringValue: "instant",
|
||||
},
|
||||
},
|
||||
DisplayValue: TemplateIntervalInstant,
|
||||
Default: true,
|
||||
},
|
||||
{
|
||||
Value: &settingsmsg.ListOptionValue{
|
||||
Option: &settingsmsg.ListOptionValue_StringValue{
|
||||
StringValue: "daily",
|
||||
},
|
||||
},
|
||||
DisplayValue: TemplateIntervalDaily,
|
||||
},
|
||||
{
|
||||
Value: &settingsmsg.ListOptionValue{
|
||||
Option: &settingsmsg.ListOptionValue_StringValue{
|
||||
StringValue: "weekly",
|
||||
},
|
||||
},
|
||||
DisplayValue: TemplateIntervalWeekly,
|
||||
},
|
||||
{
|
||||
Value: &settingsmsg.ListOptionValue{
|
||||
Option: &settingsmsg.ListOptionValue_StringValue{
|
||||
StringValue: "never",
|
||||
},
|
||||
},
|
||||
DisplayValue: TemplateIntervalNever,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
var optionInAppTrue = settingsmsg.MultiChoiceCollectionOption{
|
||||
Key: "in-app",
|
||||
DisplayValue: "In-App",
|
||||
Value: &settingsmsg.MultiChoiceCollectionOptionValue{
|
||||
Option: &settingsmsg.MultiChoiceCollectionOptionValue_BoolValue{
|
||||
BoolValue: &settingsmsg.Bool{
|
||||
Default: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
var optionMailTrue = settingsmsg.MultiChoiceCollectionOption{
|
||||
Key: "mail",
|
||||
DisplayValue: "Mail",
|
||||
Value: &settingsmsg.MultiChoiceCollectionOptionValue{
|
||||
Option: &settingsmsg.MultiChoiceCollectionOptionValue_BoolValue{
|
||||
BoolValue: &settingsmsg.Bool{
|
||||
Default: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
var optionMailFalseDisabled = settingsmsg.MultiChoiceCollectionOption{
|
||||
Key: "mail",
|
||||
Attribute: "disabled",
|
||||
DisplayValue: "Mail",
|
||||
Value: &settingsmsg.MultiChoiceCollectionOptionValue{
|
||||
Option: &settingsmsg.MultiChoiceCollectionOptionValue_BoolValue{
|
||||
BoolValue: &settingsmsg.Bool{
|
||||
Default: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// TODO: languageSetting needed?
|
||||
var languageSetting = settingsmsg.Setting_SingleChoiceValue{
|
||||
SingleChoiceValue: &settingsmsg.SingleChoiceList{
|
||||
|
||||
@@ -200,6 +200,196 @@ func DisableEmailNotificationsPermission(c settingsmsg.Permission_Constraint) *s
|
||||
}
|
||||
}
|
||||
|
||||
// ProfileEmailSendingIntervalPermission is the permission to set the email sending interval
|
||||
func ProfileEmailSendingIntervalPermission(c settingsmsg.Permission_Constraint) *settingsmsg.Setting {
|
||||
return &settingsmsg.Setting{
|
||||
Id: "7dc204ee-799a-43b6-b85d-425fb3b1fa5a",
|
||||
Name: "EmailSendingInterval.ReadWrite",
|
||||
DisplayName: "Email Sending Interval",
|
||||
Resource: &settingsmsg.Resource{
|
||||
Type: settingsmsg.Resource_TYPE_SETTING,
|
||||
Id: SettingUUIDProfileEmailSendingInterval,
|
||||
},
|
||||
Value: &settingsmsg.Setting_PermissionValue{
|
||||
PermissionValue: &settingsmsg.Permission{
|
||||
Operation: settingsmsg.Permission_OPERATION_READWRITE,
|
||||
Constraint: c,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// ProfileEventShareCreatedPermission is
|
||||
func ProfileEventShareCreatedPermission(c settingsmsg.Permission_Constraint) *settingsmsg.Setting {
|
||||
return &settingsmsg.Setting{
|
||||
Id: "8a50540c-1cdd-481f-b85f-44654393c8f0",
|
||||
Name: "Event.ShareCreated.ReadWrite",
|
||||
DisplayName: "Event Share Created",
|
||||
Resource: &settingsmsg.Resource{
|
||||
Type: settingsmsg.Resource_TYPE_SETTING,
|
||||
Id: SettingUUIDProfileEventShareCreated,
|
||||
},
|
||||
Value: &settingsmsg.Setting_PermissionValue{
|
||||
PermissionValue: &settingsmsg.Permission{
|
||||
Operation: settingsmsg.Permission_OPERATION_READWRITE,
|
||||
Constraint: c,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// ProfileEventShareRemovedPermission is the permission to set the email sending interval
|
||||
func ProfileEventShareRemovedPermission(c settingsmsg.Permission_Constraint) *settingsmsg.Setting {
|
||||
return &settingsmsg.Setting{
|
||||
Id: "5ef55465-8e39-4a6c-ba97-1d19f5b07116",
|
||||
Name: "Event.ShareRemoved.ReadWrite",
|
||||
DisplayName: "Event Share Removed",
|
||||
Resource: &settingsmsg.Resource{
|
||||
Type: settingsmsg.Resource_TYPE_SETTING,
|
||||
Id: SettingUUIDProfileEventShareRemoved,
|
||||
},
|
||||
Value: &settingsmsg.Setting_PermissionValue{
|
||||
PermissionValue: &settingsmsg.Permission{
|
||||
Operation: settingsmsg.Permission_OPERATION_READWRITE,
|
||||
Constraint: c,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// ProfileEventShareExpiredPermission is the permission to set the email sending interval
|
||||
func ProfileEventShareExpiredPermission(c settingsmsg.Permission_Constraint) *settingsmsg.Setting {
|
||||
return &settingsmsg.Setting{
|
||||
Id: "7d4f961b-d471-451b-b1fd-ac6a9d59ce88",
|
||||
Name: "Event.ShareExpired.ReadWrite",
|
||||
DisplayName: "Event Share Expired",
|
||||
Resource: &settingsmsg.Resource{
|
||||
Type: settingsmsg.Resource_TYPE_SETTING,
|
||||
Id: SettingUUIDProfileEventShareExpired,
|
||||
},
|
||||
Value: &settingsmsg.Setting_PermissionValue{
|
||||
PermissionValue: &settingsmsg.Permission{
|
||||
Operation: settingsmsg.Permission_OPERATION_READWRITE,
|
||||
Constraint: c,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// ProfileEventSpaceSharedPermission is the permission to set the email sending interval
|
||||
func ProfileEventSpaceSharedPermission(c settingsmsg.Permission_Constraint) *settingsmsg.Setting {
|
||||
return &settingsmsg.Setting{
|
||||
Id: "feb16d2c-614c-4f79-ac37-755a028f5616",
|
||||
Name: "Event.SpaceShared.ReadWrite",
|
||||
DisplayName: "Event Space Shared",
|
||||
Resource: &settingsmsg.Resource{
|
||||
Type: settingsmsg.Resource_TYPE_SETTING,
|
||||
Id: SettingUUIDProfileEventSpaceShared,
|
||||
},
|
||||
Value: &settingsmsg.Setting_PermissionValue{
|
||||
PermissionValue: &settingsmsg.Permission{
|
||||
Operation: settingsmsg.Permission_OPERATION_READWRITE,
|
||||
Constraint: c,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// ProfileEventSpaceUnsharedPermission is the permission to set the email sending interval
|
||||
func ProfileEventSpaceUnsharedPermission(c settingsmsg.Permission_Constraint) *settingsmsg.Setting {
|
||||
return &settingsmsg.Setting{
|
||||
Id: "4f979732-631b-4f27-9be7-a89fb223a6d2",
|
||||
Name: "Event.SpaceUnshared.ReadWrite",
|
||||
DisplayName: "Event Space Unshared",
|
||||
Resource: &settingsmsg.Resource{
|
||||
Type: settingsmsg.Resource_TYPE_SETTING,
|
||||
Id: SettingUUIDProfileEventSpaceUnshared,
|
||||
},
|
||||
Value: &settingsmsg.Setting_PermissionValue{
|
||||
PermissionValue: &settingsmsg.Permission{
|
||||
Operation: settingsmsg.Permission_OPERATION_READWRITE,
|
||||
Constraint: c,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// ProfileEventSpaceMembershipExpiredPermission is the permission to set the email sending interval
|
||||
func ProfileEventSpaceMembershipExpiredPermission(c settingsmsg.Permission_Constraint) *settingsmsg.Setting {
|
||||
return &settingsmsg.Setting{
|
||||
Id: "a3cc45bf-9720-4e08-b403-b9133fe33f0b",
|
||||
Name: "Event.SpaceMembershipExpired.ReadWrite",
|
||||
DisplayName: "Event Space Membership Expired",
|
||||
Resource: &settingsmsg.Resource{
|
||||
Type: settingsmsg.Resource_TYPE_SETTING,
|
||||
Id: SettingUUIDProfileEventSpaceMembershipExpired,
|
||||
},
|
||||
Value: &settingsmsg.Setting_PermissionValue{
|
||||
PermissionValue: &settingsmsg.Permission{
|
||||
Operation: settingsmsg.Permission_OPERATION_READWRITE,
|
||||
Constraint: c,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// ProfileEventSpaceDisabledPermission is the permission to set the email sending interval
|
||||
func ProfileEventSpaceDisabledPermission(c settingsmsg.Permission_Constraint) *settingsmsg.Setting {
|
||||
return &settingsmsg.Setting{
|
||||
Id: "896194c2-5055-4ea3-94a3-0a1419187a00",
|
||||
Name: "Event.SpaceDisabled.ReadWrite",
|
||||
DisplayName: "Event Space Disabled",
|
||||
Resource: &settingsmsg.Resource{
|
||||
Type: settingsmsg.Resource_TYPE_SETTING,
|
||||
Id: SettingUUIDProfileEventSpaceDisabled,
|
||||
},
|
||||
Value: &settingsmsg.Setting_PermissionValue{
|
||||
PermissionValue: &settingsmsg.Permission{
|
||||
Operation: settingsmsg.Permission_OPERATION_READWRITE,
|
||||
Constraint: c,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// ProfileEventSpaceDeletedPermission is the permission to set the email sending interval
|
||||
func ProfileEventSpaceDeletedPermission(c settingsmsg.Permission_Constraint) *settingsmsg.Setting {
|
||||
return &settingsmsg.Setting{
|
||||
Id: "2083c280-b140-4b73-a931-9a4af2931531",
|
||||
Name: "Event.SpaceDeleted.ReadWrite",
|
||||
DisplayName: "Event Space Deleted",
|
||||
Resource: &settingsmsg.Resource{
|
||||
Type: settingsmsg.Resource_TYPE_SETTING,
|
||||
Id: SettingUUIDProfileEventSpaceDeleted,
|
||||
},
|
||||
Value: &settingsmsg.Setting_PermissionValue{
|
||||
PermissionValue: &settingsmsg.Permission{
|
||||
Operation: settingsmsg.Permission_OPERATION_READWRITE,
|
||||
Constraint: c,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// ProfileEventPostprocessingStepFinishedPermission is the permission to set the email sending interval
|
||||
func ProfileEventPostprocessingStepFinishedPermission(c settingsmsg.Permission_Constraint) *settingsmsg.Setting {
|
||||
return &settingsmsg.Setting{
|
||||
Id: "27ba8e97-0bdf-4b18-97d4-df44c9568cda",
|
||||
Name: "Event.PostprocessingStepFinished.ReadWrite",
|
||||
DisplayName: "Event Postprocessing Step Finished",
|
||||
Resource: &settingsmsg.Resource{
|
||||
Type: settingsmsg.Resource_TYPE_SETTING,
|
||||
Id: SettingUUIDProfileEventPostprocessingStepFinished,
|
||||
},
|
||||
Value: &settingsmsg.Setting_PermissionValue{
|
||||
PermissionValue: &settingsmsg.Permission{
|
||||
Operation: settingsmsg.Permission_OPERATION_READWRITE,
|
||||
Constraint: c,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// GroupManagementPermission is the permission to manage groups
|
||||
func GroupManagementPermission(c settingsmsg.Permission_Constraint) *settingsmsg.Setting {
|
||||
return &settingsmsg.Setting{
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
package defaults
|
||||
|
||||
import "github.com/owncloud/ocis/v2/ocis-pkg/l10n"
|
||||
|
||||
// Translatable configuration options
|
||||
var (
|
||||
// name of the notification option 'Share Received'
|
||||
TemplateShareCreated = l10n.Template("Share Received")
|
||||
// description of the notification option 'Share Received'
|
||||
TemplateShareCreatedDescription = l10n.Template("Notify me when I receive a share")
|
||||
// name of the notification option 'Share Removed'
|
||||
TemplateShareRemoved = l10n.Template("Share Removed")
|
||||
// description of the notification option 'Share Removed'
|
||||
TemplateShareRemovedDescription = l10n.Template("Notify me when my shares are removed")
|
||||
// name of the notification option 'Share Expired'
|
||||
TemplateShareExpired = l10n.Template("Share Expired")
|
||||
// description of the notification option 'Share Expired'
|
||||
TemplateShareExpiredDescription = l10n.Template("Notify me when my shares expire")
|
||||
// name of the notification option 'Space Shared'
|
||||
TemplateSpaceShared = l10n.Template("Added as space member")
|
||||
// description of the notification option 'Space Shared'
|
||||
TemplateSpaceSharedDescription = l10n.Template("Notify me when I am added as a member to a space")
|
||||
// name of the notification option 'Space Unshared'
|
||||
TemplateSpaceUnshared = l10n.Template("Removed as space member")
|
||||
// description of the notification option 'Space Unshared'
|
||||
TemplateSpaceUnsharedDescription = l10n.Template("Notify me when I am removed as a member from a space")
|
||||
// name of the notification option 'Space Membership Expired'
|
||||
TemplateSpaceMembershipExpired = l10n.Template("Space membership expired")
|
||||
// description of the notification option 'Space Membership Expired'
|
||||
TemplateSpaceMembershipExpiredDescription = l10n.Template("Notify me when my membership of a space expires")
|
||||
// name of the notification option 'Space Disabled'
|
||||
TemplateSpaceDisabled = l10n.Template("Space disabled")
|
||||
// description of the notification option 'Space Disabled'
|
||||
TemplateSpaceDisabledDescription = l10n.Template("Notify me when a space I am a member of is disabled")
|
||||
// name of the notification option 'Space Deleted'
|
||||
TemplateSpaceDeleted = l10n.Template("Space deleted")
|
||||
// description of the notification option 'Space Deleted'
|
||||
TemplateSpaceDeletedDescription = l10n.Template("Notify me when a space I am a member of is deleted")
|
||||
// name of the notification option 'File Rejected'
|
||||
TemplateFileRejected = l10n.Template("File rejected")
|
||||
// description of the notification option 'File Rejected'
|
||||
TemplateFileRejectedDescription = l10n.Template("Notify me when a file I uploaded is rejected because of virus infection or policy violation")
|
||||
// name of the notification option 'Email Interval'
|
||||
TemplateEmailSendingInterval = l10n.Template("Email sending interval")
|
||||
// description of the notification option 'Email Interval'
|
||||
TemplateEmailSendingIntervalDescription = l10n.Template("Notifiy me via email:")
|
||||
// translation for the 'instant' email interval option
|
||||
TemplateIntervalInstant = l10n.Template("Instant")
|
||||
// translation for the 'daily' email interval option
|
||||
TemplateIntervalDaily = l10n.Template("Daily")
|
||||
// translation for the 'weekly' email interval option
|
||||
TemplateIntervalWeekly = l10n.Template("Weekly")
|
||||
// translation for the 'never' email interval option
|
||||
TemplateIntervalNever = l10n.Template("Never")
|
||||
)
|
||||
@@ -0,0 +1,102 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
user "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
|
||||
"github.com/cs3org/reva/v2/pkg/events"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/log"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/middleware"
|
||||
settingssvc "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/settings/v0"
|
||||
"github.com/owncloud/ocis/v2/services/settings/pkg/store/defaults"
|
||||
micrometadata "go-micro.dev/v4/metadata"
|
||||
)
|
||||
|
||||
type userlogFilter struct {
|
||||
log log.Logger
|
||||
valueClient settingssvc.ValueService
|
||||
}
|
||||
|
||||
func newUserlogFilter(l log.Logger, vc settingssvc.ValueService) *userlogFilter {
|
||||
return &userlogFilter{log: l, valueClient: vc}
|
||||
}
|
||||
|
||||
// execute removes users who should not receive an in-app notifications for the event
|
||||
func (ulf userlogFilter) execute(ctx context.Context, event events.Event, executant *user.UserId, users []string) []string {
|
||||
filteredUsers := ulf.filterExecutant(users, executant)
|
||||
return ulf.filterUsersBySettings(ctx, filteredUsers, event)
|
||||
}
|
||||
|
||||
// filterExecutant removes the executant
|
||||
func (ulf userlogFilter) filterExecutant(users []string, executant *user.UserId) []string {
|
||||
var filteredUsers []string
|
||||
for _, u := range users {
|
||||
if u != executant.GetOpaqueId() {
|
||||
filteredUsers = append(filteredUsers, u)
|
||||
}
|
||||
}
|
||||
return filteredUsers
|
||||
}
|
||||
|
||||
// filterUsersBySettings removes users who have disabled in-app notifications for the event
|
||||
func (ulf userlogFilter) filterUsersBySettings(ctx context.Context, users []string, event events.Event) []string {
|
||||
var filteredUsers []string
|
||||
var settingId string
|
||||
// map type to settings key
|
||||
switch event.Event.(type) {
|
||||
case events.ShareCreated:
|
||||
settingId = defaults.SettingUUIDProfileEventShareCreated
|
||||
case events.ShareRemoved:
|
||||
settingId = defaults.SettingUUIDProfileEventShareRemoved
|
||||
case events.ShareExpired:
|
||||
settingId = defaults.SettingUUIDProfileEventShareExpired
|
||||
case events.SpaceShared:
|
||||
settingId = defaults.SettingUUIDProfileEventSpaceShared
|
||||
case events.SpaceUnshared:
|
||||
settingId = defaults.SettingUUIDProfileEventSpaceUnshared
|
||||
case events.SpaceMembershipExpired:
|
||||
settingId = defaults.SettingUUIDProfileEventSpaceMembershipExpired
|
||||
case events.SpaceDisabled:
|
||||
settingId = defaults.SettingUUIDProfileEventSpaceDisabled
|
||||
case events.SpaceDeleted:
|
||||
settingId = defaults.SettingUUIDProfileEventSpaceDeleted
|
||||
default:
|
||||
// event that cannot be disabled
|
||||
return users
|
||||
}
|
||||
|
||||
for _, u := range users {
|
||||
enabled, err := getSetting(ctx, ulf.valueClient, u, settingId)
|
||||
if err != nil {
|
||||
ulf.log.Error().Err(err).Str("userId", u).Str("settingId", settingId).Msg("cannot get user event setting")
|
||||
continue
|
||||
}
|
||||
if enabled {
|
||||
filteredUsers = append(filteredUsers, u)
|
||||
}
|
||||
}
|
||||
|
||||
return filteredUsers
|
||||
}
|
||||
|
||||
func getSetting(ctx context.Context, vc settingssvc.ValueService, userId string, settingId string) (bool, error) {
|
||||
resp, err := vc.GetValueByUniqueIdentifiers(
|
||||
micrometadata.Set(ctx, middleware.AccountID, userId),
|
||||
&settingssvc.GetValueByUniqueIdentifiersRequest{
|
||||
AccountUuid: userId,
|
||||
SettingId: settingId,
|
||||
},
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
val := resp.GetValue().GetValue().GetCollectionValue().GetValues()
|
||||
for _, option := range val {
|
||||
if option.GetKey() == "in-app" {
|
||||
return option.GetBoolValue(), nil
|
||||
}
|
||||
}
|
||||
return false, errors.New("no setting found")
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
user "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
|
||||
"github.com/cs3org/reva/v2/pkg/events"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/log"
|
||||
settingsmsg "github.com/owncloud/ocis/v2/protogen/gen/ocis/messages/settings/v0"
|
||||
settings "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/settings/v0"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go-micro.dev/v4/client"
|
||||
"testing"
|
||||
)
|
||||
|
||||
var testLogger = log.NewLogger()
|
||||
|
||||
func TestUserlogFilter_execute(t *testing.T) {
|
||||
type args struct {
|
||||
ctx context.Context
|
||||
event events.Event
|
||||
executant *user.UserId
|
||||
users []string
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
vc settings.ValueService
|
||||
args args
|
||||
want []string
|
||||
}{
|
||||
{"executant", settings.MockValueService{}, args{executant: &user.UserId{OpaqueId: "executant"}, users: []string{"foo", "executant"}}, []string{"foo"}},
|
||||
{"no connection to ValueService", settings.MockValueService{
|
||||
GetValueByUniqueIdentifiersFunc: func(ctx context.Context, req *settings.GetValueByUniqueIdentifiersRequest, opts ...client.CallOption) (*settings.GetValueResponse, error) {
|
||||
return nil, errors.New("no connection to ValueService")
|
||||
},
|
||||
}, args{users: []string{"foo"}, event: events.Event{Event: events.ShareCreated{}}, ctx: context.TODO()}, []string(nil)},
|
||||
{"no setting in ValueService response", settings.MockValueService{
|
||||
GetValueByUniqueIdentifiersFunc: func(ctx context.Context, req *settings.GetValueByUniqueIdentifiersRequest, opts ...client.CallOption) (*settings.GetValueResponse, error) {
|
||||
return &settings.GetValueResponse{}, nil
|
||||
},
|
||||
}, args{users: []string{"foo"}, event: events.Event{Event: events.ShareCreated{}}, ctx: context.TODO()}, []string(nil)},
|
||||
{"ValueService nil response", settings.MockValueService{
|
||||
GetValueByUniqueIdentifiersFunc: func(ctx context.Context, req *settings.GetValueByUniqueIdentifiersRequest, opts ...client.CallOption) (*settings.GetValueResponse, error) {
|
||||
return nil, nil
|
||||
},
|
||||
}, args{users: []string{"foo"}, event: events.Event{Event: events.ShareCreated{}}, ctx: context.TODO()}, []string(nil)},
|
||||
{"event that cannot be disabled", setupMockValueService(true), args{users: []string{"foo"}, event: events.Event{Event: events.BytesReceived{}}, ctx: context.TODO()}, []string{"foo"}},
|
||||
{"ShareCreated enabled", setupMockValueService(true), args{users: []string{"foo"}, event: events.Event{Event: events.ShareCreated{}}, ctx: context.TODO()}, []string{"foo"}},
|
||||
{"ShareRemoved enabled", setupMockValueService(true), args{users: []string{"foo"}, event: events.Event{Event: events.ShareRemoved{}}, ctx: context.TODO()}, []string{"foo"}},
|
||||
{"ShareExpired enabled", setupMockValueService(true), args{users: []string{"foo"}, event: events.Event{Event: events.ShareExpired{}}, ctx: context.TODO()}, []string{"foo"}},
|
||||
{"SpaceShared enabled", setupMockValueService(true), args{users: []string{"foo"}, event: events.Event{Event: events.SpaceShared{}}, ctx: context.TODO()}, []string{"foo"}},
|
||||
{"SpaceUnshared enabled", setupMockValueService(true), args{users: []string{"foo"}, event: events.Event{Event: events.SpaceUnshared{}}, ctx: context.TODO()}, []string{"foo"}},
|
||||
{"SpaceMembershipExpired enabled", setupMockValueService(true), args{users: []string{"foo"}, event: events.Event{Event: events.SpaceMembershipExpired{}}, ctx: context.TODO()}, []string{"foo"}},
|
||||
{"SpaceDisabled enabled", setupMockValueService(true), args{users: []string{"foo"}, event: events.Event{Event: events.SpaceDisabled{}}, ctx: context.TODO()}, []string{"foo"}},
|
||||
{"SpaceDeleted enabled", setupMockValueService(true), args{users: []string{"foo"}, event: events.Event{Event: events.SpaceDeleted{}}, ctx: context.TODO()}, []string{"foo"}},
|
||||
{"ShareCreated disabled", setupMockValueService(false), args{users: []string{"foo"}, event: events.Event{Event: events.ShareCreated{}}, ctx: context.TODO()}, []string(nil)},
|
||||
{"ShareRemoved disabled", setupMockValueService(false), args{users: []string{"foo"}, event: events.Event{Event: events.ShareRemoved{}}, ctx: context.TODO()}, []string(nil)},
|
||||
{"ShareExpired disabled", setupMockValueService(false), args{users: []string{"foo"}, event: events.Event{Event: events.ShareExpired{}}, ctx: context.TODO()}, []string(nil)},
|
||||
{"SpaceShared disabled", setupMockValueService(false), args{users: []string{"foo"}, event: events.Event{Event: events.SpaceShared{}}, ctx: context.TODO()}, []string(nil)},
|
||||
{"SpaceUnshared disabled", setupMockValueService(false), args{users: []string{"foo"}, event: events.Event{Event: events.SpaceUnshared{}}, ctx: context.TODO()}, []string(nil)},
|
||||
{"SpaceMembershipExpired disabled", setupMockValueService(false), args{users: []string{"foo"}, event: events.Event{Event: events.SpaceMembershipExpired{}}, ctx: context.TODO()}, []string(nil)},
|
||||
{"SpaceDisabled disabled", setupMockValueService(false), args{users: []string{"foo"}, event: events.Event{Event: events.SpaceDisabled{}}, ctx: context.TODO()}, []string(nil)},
|
||||
{"SpaceDeleted disabled", setupMockValueService(false), args{users: []string{"foo"}, event: events.Event{Event: events.SpaceDeleted{}}, ctx: context.TODO()}, []string(nil)},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
ulf := userlogFilter{
|
||||
log: testLogger,
|
||||
valueClient: tt.vc,
|
||||
}
|
||||
assert.Equal(t, tt.want, ulf.execute(tt.args.ctx, tt.args.event, tt.args.executant, tt.args.users))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func setupMockValueService(inApp bool) settings.ValueService {
|
||||
return settings.MockValueService{
|
||||
GetValueByUniqueIdentifiersFunc: func(ctx context.Context, req *settings.GetValueByUniqueIdentifiersRequest, opts ...client.CallOption) (*settings.GetValueResponse, error) {
|
||||
return &settings.GetValueResponse{
|
||||
Value: &settingsmsg.ValueWithIdentifier{
|
||||
Value: &settingsmsg.Value{
|
||||
Value: &settingsmsg.Value_CollectionValue{
|
||||
CollectionValue: &settingsmsg.CollectionValue{
|
||||
Values: []*settingsmsg.CollectionOption{
|
||||
{
|
||||
Key: "in-app",
|
||||
Option: &settingsmsg.CollectionOption_BoolValue{BoolValue: inApp},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}, nil
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-01 00:18+0000\n"
|
||||
"POT-Creation-Date: 2024-12-22 00:18+0000\n"
|
||||
"PO-Revision-Date: 2023-03-15 08:28+0000\n"
|
||||
"Last-Translator: Martin Zhekov <martin03staff@gmail.com>, 2023\n"
|
||||
"Language-Team: Bulgarian (Bulgaria) (https://app.transifex.com/owncloud-org/teams/6149/bg_BG/)\n"
|
||||
|
||||
@@ -14,7 +14,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-01 00:18+0000\n"
|
||||
"POT-Creation-Date: 2024-12-22 00:18+0000\n"
|
||||
"PO-Revision-Date: 2023-03-15 08:28+0000\n"
|
||||
"Last-Translator: Michael Barz <mbarz@owncloud.com>, 2023\n"
|
||||
"Language-Team: German (https://app.transifex.com/owncloud-org/teams/6149/de/)\n"
|
||||
|
||||
@@ -13,7 +13,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-01 00:18+0000\n"
|
||||
"POT-Creation-Date: 2024-12-22 00:18+0000\n"
|
||||
"PO-Revision-Date: 2023-03-15 08:28+0000\n"
|
||||
"Last-Translator: Edith Parzefall, 2024\n"
|
||||
"Language-Team: German (Germany) (https://app.transifex.com/owncloud-org/teams/6149/de_DE/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-01 00:18+0000\n"
|
||||
"POT-Creation-Date: 2024-12-22 00:18+0000\n"
|
||||
"PO-Revision-Date: 2023-03-15 08:28+0000\n"
|
||||
"Last-Translator: Andi Chandler <andi@gowling.com>, 2023\n"
|
||||
"Language-Team: English (United Kingdom) (https://app.transifex.com/owncloud-org/teams/6149/en_GB/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-01 00:18+0000\n"
|
||||
"POT-Creation-Date: 2024-12-22 00:18+0000\n"
|
||||
"PO-Revision-Date: 2023-03-15 08:28+0000\n"
|
||||
"Last-Translator: Juan Carlos Garrote, 2023\n"
|
||||
"Language-Team: Spanish (https://app.transifex.com/owncloud-org/teams/6149/es/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-01 00:18+0000\n"
|
||||
"POT-Creation-Date: 2024-12-22 00:18+0000\n"
|
||||
"PO-Revision-Date: 2023-03-15 08:28+0000\n"
|
||||
"Last-Translator: Hugo Blackwood, 2023\n"
|
||||
"Language-Team: Korean (https://app.transifex.com/owncloud-org/teams/6149/ko/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-01 00:18+0000\n"
|
||||
"POT-Creation-Date: 2024-12-22 00:18+0000\n"
|
||||
"PO-Revision-Date: 2023-03-15 08:28+0000\n"
|
||||
"Last-Translator: Flávio Veras <flaviove@gmail.com>, 2023\n"
|
||||
"Language-Team: Portuguese (Brazil) (https://app.transifex.com/owncloud-org/teams/6149/pt_BR/)\n"
|
||||
|
||||
@@ -14,7 +14,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-14 00:17+0000\n"
|
||||
"POT-Creation-Date: 2025-01-04 00:05+0000\n"
|
||||
"PO-Revision-Date: 2023-03-15 08:28+0000\n"
|
||||
"Last-Translator: dutty5, 2024\n"
|
||||
"Language-Team: Russian (https://app.transifex.com/owncloud-org/teams/6149/ru/)\n"
|
||||
|
||||
@@ -12,7 +12,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-14 00:17+0000\n"
|
||||
"POT-Creation-Date: 2025-01-04 00:05+0000\n"
|
||||
"PO-Revision-Date: 2023-03-15 08:28+0000\n"
|
||||
"Last-Translator: dutty5, 2024\n"
|
||||
"Language-Team: Russian (Russia) (https://app.transifex.com/owncloud-org/teams/6149/ru_RU/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2024-12-01 00:18+0000\n"
|
||||
"POT-Creation-Date: 2024-12-22 00:18+0000\n"
|
||||
"PO-Revision-Date: 2023-03-15 08:28+0000\n"
|
||||
"Last-Translator: Besnik Bleta <besnik@programeshqip.org>, 2023\n"
|
||||
"Language-Team: Albanian (https://app.transifex.com/owncloud-org/teams/6149/sq/)\n"
|
||||
|
||||
Loaded 100 of 190 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user