Revert "run remark linter locally"

This reverts commit 97c348f1ae.
This commit is contained in:
A.Unger
2020-09-23 11:48:59 +02:00
parent 97c348f1ae
commit 8b9e02ec0b
447 changed files with 6088 additions and 6178 deletions

View File

@@ -1,12 +1,11 @@
* * *
---
title: "Settings"
date: 2018-05-02T00:00:00+00:00
weight: 10
geekdocRepo: <https://github.com/owncloud/ocis-settings>
geekdocRepo: https://github.com/owncloud/ocis-settings
geekdocEditPath: edit/master/docs
## geekdocFilePath: \_index.md
geekdocFilePath: _index.md
---
## Abstract
@@ -18,7 +17,7 @@ For ease of use, this extension provides an ocis-web extension which allows user
Please refer to the [ocis-web extension docs](https://owncloud.github.io/ocis/extensions/#external-phoenix-apps)
for running ocis-web extensions.
{{&lt; mermaid class="text-center">}}
{{< mermaid class="text-center">}}
graph TD
subgraph ow[ocis-web]
ows[ocis-web-settings]
@@ -30,20 +29,18 @@ graph TD
sdks ---|"yes"| os
sdks ---|"no"| defaults[Use set of<br>default values]
oa[oCIS extensions<br>e.g. ocis-accounts] ---|"saveSettingsBundle(bundle)"| os
{{&lt; /mermaid >}}
{{< /mermaid >}}
The diagram shows how the settings service integrates into oCIS:
**Settings management:**
- oCIS extensions can register _settings bundles_ with the ocis-settings service.
- The settings frontend can be plugged into ocis-web, showing forms for changing _settings values_ as a user.
The forms are generated from the registered _settings bundles_.
- oCIS extensions can register *settings bundles* with the ocis-settings service.
- The settings frontend can be plugged into ocis-web, showing forms for changing *settings values* as a user.
The forms are generated from the registered *settings bundles*.
**Settings usage:**
- Extensions can query ocis-settings for _settings values_ of a user.
- The ownCloud SDK, used as a data abstraction layer for ocis-web, will query ocis-settings for _settings values_ of a user,
if it's available. The SDK uses sensible defaults when ocis-settings is not part of the setup.
- Extensions can query ocis-settings for *settings values* of a user.
- The ownCloud SDK, used as a data abstraction layer for ocis-web, will query ocis-settings for *settings values* of a user,
if it's available. The SDK uses sensible defaults when ocis-settings is not part of the setup.
For compatibility with ownCloud 10, a migration of ownCloud 10 settings into the storage of ocis-settings will be available.

View File

@@ -1,29 +1,28 @@
* * *
---
title: "Building"
date: 2018-05-02T00:00:00+00:00
weight: 30
geekdocRepo: <https://github.com/owncloud/ocis-settings>
geekdocRepo: https://github.com/owncloud/ocis-settings
geekdocEditPath: edit/master/docs
geekdocFilePath: building.md
---
## geekdocFilePath: building.md
{{&lt; toc >}}
{{< toc >}}
As this project is built with Go, so you need to install that first. The installation of Go is out of the scope of this document, please follow the official documentation for [Go](https://golang.org/doc/install), to build this project you have to install Go >= v1.12. After the installation of the required tools you need to get the sources:
{{&lt; highlight txt >}}
git clone <https://github.com/owncloud/ocis-settings.git>
{{< highlight txt >}}
git clone https://github.com/owncloud/ocis-settings.git
cd ocis-settings
{{&lt; / highlight >}}
{{< / highlight >}}
All required tool besides Go itself and make are bundled or getting automatically installed within the `GOPATH`. All commands to build this project are part of our `Makefile`.
## Backend
{{&lt; highlight txt >}}
{{< highlight txt >}}
make generate
make build
{{&lt; / highlight >}}
{{< / highlight >}}
Finally you should have the binary within the `bin/` folder now, give it a try with `./bin/ocis-settings -h` to see all available options.

View File

@@ -1,12 +1,11 @@
* * *
---
title: "Settings Bundles"
date: 2020-05-04T00:00:00+00:00
weight: 50
geekdocRepo: <https://github.com/owncloud/ocis-settings>
geekdocRepo: https://github.com/owncloud/ocis-settings
geekdocEditPath: edit/master/docs
## geekdocFilePath: bundles.md
geekdocFilePath: bundles.md
---
A **Settings Bundle** is a collection of settings, uniquely identified by the key of the
extension registering the bundle and the key of the bundle itself. It's purpose is to let
@@ -14,12 +13,11 @@ oCIS extensions define settings and make them available to users. They are dynam
rendered into forms, available in the frontend.
As of now we support five different types of settings:
- boolean
- integer
- string
- single choice list of integers or strings
- multiple choice list of integers or strings
- boolean
- integer
- string
- single choice list of integers or strings
- multiple choice list of integers or strings
Each **Setting** is uniquely identified by a key within the bundle. Some attributes
depend on the chosen type of setting. Through the information provided with the

View File

@@ -1,14 +1,13 @@
* * *
---
title: "Getting Started"
date: 2018-05-02T00:00:00+00:00
weight: 25
geekdocRepo: <https://github.com/owncloud/ocis-settings>
geekdocRepo: https://github.com/owncloud/ocis-settings
geekdocEditPath: edit/master/docs
geekdocFilePath: getting-started.md
---
## geekdocFilePath: getting-started.md
{{&lt; toc >}}
{{< toc >}}
## Installation
@@ -93,59 +92,59 @@ If you prefer to configure the service with commandline flags you can see the av
#### Global
\--config-file
--config-file
: Path to config file, empty default value
\--log-level
--log-level
: Set logging level, defaults to `info`
\--log-color
--log-color
: Enable colored logging, defaults to `true`
\--log-pretty
--log-pretty
: Enable pretty logging, defaults to `true`
#### Server
\--tracing-enabled
--tracing-enabled
: Enable sending traces, defaults to `false`
\--tracing-type
--tracing-type
: Tracing backend type, defaults to `jaeger`
\--tracing-endpoint
--tracing-endpoint
: Endpoint for the agent, empty default value
\--tracing-collector
--tracing-collector
: Endpoint for the collector, empty default value
\--tracing-service
--tracing-service
: Service name for tracing, defaults to `settings`
\--debug-addr
--debug-addr
: Address to bind debug server, defaults to `0.0.0.0:9194`
\--debug-token
--debug-token
: Token to grant metrics access, empty default value
\--debug-pprof
--debug-pprof
: Enable pprof debugging, defaults to `false`
\--debug-zpages
--debug-zpages
: Enable zpages debugging, defaults to `false`
\--http-addr
--http-addr
: Address to bind http server, defaults to `0.0.0.0:9190`
\--http-namespace
--http-namespace
: Namespace for internal services communication, defaults to `com.owncloud.web`
\--http-root
--http-root
: Root path of http server, defaults to `/`
#### Health
\--debug-addr
--debug-addr
: Address to debug endpoint, defaults to `0.0.0.0:9194`
### Configuration file
@@ -160,17 +159,17 @@ The program provides a few sub-commands on execution. The available configuratio
The server command is used to start the http and debug server on two addresses within a single process. The http server is serving the general webservice while the debug server is used for health check, readiness check and to server the metrics mentioned below. For further help please execute:
{{&lt; highlight txt >}}
{{< highlight txt >}}
ocis-settings server --help
{{&lt; / highlight >}}
{{< / highlight >}}
### Health
The health command is used to execute a health check, if the exit code equals zero the service should be up and running, if the exist code is greater than zero the service is not in a healthy state. Generally this command is used within our Docker containers, it could also be used within Kubernetes.
{{&lt; highlight txt >}}
{{< highlight txt >}}
ocis-settings health --help
{{&lt; / highlight >}}
{{< / highlight >}}
## Metrics

View File

@@ -1,43 +1,42 @@
* * *
---
title: "Glossary"
date: 2020-05-04T12:35:00+01:00
weight: 80
geekdocRepo: <https://github.com/owncloud/ocis-settings>
geekdocRepo: https://github.com/owncloud/ocis-settings
geekdocEditPath: edit/master/docs
## geekdocFilePath: glossary.md
geekdocFilePath: glossary.md
---
In the context of this extension and oCIS in general, we are using the following terminology.
### Configuration
- System configuration
- e.g. service host names and ports
- Changes need to be propagated to other services
- Typically modified on the CLI
- System configuration
- e.g. service host names and ports
- Changes need to be propagated to other services
- Typically modified on the CLI
### Settings
- Application level settings
- e.g. default language
- Can be modified at runtime without restarting the service
- Typically modified in the UI
- Application level settings
- e.g. default language
- Can be modified at runtime without restarting the service
- Typically modified in the UI
### Preferences
- User settings
- Subset of "Settings"
- e.g. preferred language of a user
- User settings
- Subset of "Settings"
- e.g. preferred language of a user
### Settings Bundle
- Collection of related settings
- Registered by an ocis extension
- Collection of related settings
- Registered by an ocis extension
### Settings Value
- Manifestation of a setting for a specific user
- E.g. used for customization (at runtime) in `ocis-web`
- `ocis-web-settings` extension for modifying settings values is provided by this service
- Can be queried and modified by other ocis extensions
- Manifestation of a setting for a specific user
- E.g. used for customization (at runtime) in `ocis-web`
- `ocis-web-settings` extension for modifying settings values is provided by this service
- Can be queried and modified by other ocis extensions

View File

@@ -1,11 +1,10 @@
* * *
---
title: "License"
date: 2018-05-02T00:00:00+00:00
weight: 90
geekdocRepo: <https://github.com/owncloud/ocis-settings>
geekdocRepo: https://github.com/owncloud/ocis-settings
geekdocEditPath: edit/master/docs
## geekdocFilePath: license.md
geekdocFilePath: license.md
---
This project is licensed under the [Apache 2.0](https://github.com/owncloud/ocis/settings/blob/master/LICENSE) license. For the license of the used libraries you have to check the respective sources.

View File

@@ -1,34 +1,32 @@
* * *
---
title: "Settings Values"
date: 2020-05-04T00:00:00+00:00
weight: 51
geekdocRepo: <https://github.com/owncloud/ocis-settings>
geekdocRepo: https://github.com/owncloud/ocis-settings
geekdocEditPath: edit/master/docs
## geekdocFilePath: values.md
geekdocFilePath: values.md
---
A **Settings Value** is the value an authenticated user has chosen for a specific setting, defined in a
_settings bundle_. For choosing settings values as a user the sole entry point is the ocis-web extension
*settings bundle*. For choosing settings values as a user the sole entry point is the ocis-web extension
provided by this service.
## Identifying settings values
A _settings value_ is uniquely identified by four attributes. Three of them are coming from the definition of
A *settings value* is uniquely identified by four attributes. Three of them are coming from the definition of
the setting within it's settings bundle (see [Settings Bundles](https://owncloud.github.io/extensions/ocis_settings/bundles/)
for an example). The fourth identifies the user.
- extension: Key of the extension that registered the settings bundle,
- bundleKey: Key of the settings bundle,
- settingKey: Key of the setting as defined within the bundle,
- accountUuid: The UUID of the authenticated user who has saved the setting.
- extension: Key of the extension that registered the settings bundle,
- bundleKey: Key of the settings bundle,
- settingKey: Key of the setting as defined within the bundle,
- accountUuid: The UUID of the authenticated user who has saved the setting.
{{&lt; hint info >}}
{{< hint info >}}
When requests are going through `ocis-proxy`, the accountUuid attribute can be set to the static keyword `me`
instead of using a real UUID. `ocis-proxy` will take care of minting the UUID of the authenticated user into
a JWT, providing it in the HTTP header as `x-access-token`. That UUID is then used in this service, to replace
`me` with the actual UUID of the authenticated user.
{{&lt; /hint >}}
{{< /hint >}}
## Example of stored settings values
@@ -70,9 +68,8 @@ a JWT, providing it in the HTTP header as `x-access-token`. That UUID is then us
```
## gRPC endpoints
The obvious way of modifying settings is the ocis-web extension, as described earlier. However, services can
use the respective gRPC endpoints of the `ValueService` to query and modify _settings values_ as well.
use the respective gRPC endpoints of the `ValueService` to query and modify *settings values* as well.
The gRPC endpoints require the same identifier attributes as described above, so for making a request to
the `ValueService` you will have to make sure that the accountUuid of the authenticated user is available in
your service at the time of the request.