Merge: 64136bc7 a3007e51
Author: Willy Kloucek <34452982+wkloucek@users.noreply.github.com>
Date:   Mon Jun 21 10:30:40 2021 +0200

    Merge pull request #2182 from owncloud/extension_development

    [docs-only] extension development
This commit is contained in:
Willy Kloucek committed 2021-06-21 08:32:53 +00:00
1 parent a59bb6b49f
commit 4e2d2ba8d8
16 files changed
+430 -598

No files matched your search

+49 -49
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-06-18T09:26:50+0000"
date: "2021-06-21T08:31:00+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/accounts/templates
@@ -35,45 +35,6 @@ If multiple variables are listed for one option, they are in order of precedence
If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
### accounts update
Make changes to an existing account
Usage: `accounts update [command options] [arguments...]`
### accounts add
Create a new account
Usage: `accounts add [command options] [arguments...]`
### accounts remove
Removes an existing account
Usage: `accounts remove [command options] [arguments...]`
-grpc-namespace | $ACCOUNTS_GRPC_NAMESPACE
: Set the base namespace for the grpc namespace. Default: `flags.OverrideDefaultString(cfg.GRPC.Namespace, "com.owncloud.api")`.
-name | $ACCOUNTS_NAME
: service name. Default: `flags.OverrideDefaultString(cfg.Server.Name, "accounts")`.
### accounts ocis-accounts
Provide accounts and groups for oCIS
Usage: `accounts ocis-accounts [command options] [arguments...]`
-log-level | $ACCOUNTS_LOG_LEVEL , $OCIS_LOG_LEVEL
: Set logging level.
-log-pretty | $ACCOUNTS_LOG_PRETTY , $OCIS_LOG_PRETTY
: Enable pretty logging.
-log-color | $ACCOUNTS_LOG_COLOR , $OCIS_LOG_COLOR
: Enable colored logging.
### accounts server
Start ocis accounts service
@@ -143,17 +104,11 @@ Usage: `accounts server [command options] [arguments...]`
-service-user-username | $ACCOUNTS_SERVICE_USER_USERNAME
: username of the internal service user (required on EOS). Default: `flags.OverrideDefaultString(cfg.ServiceUser.Username, "")`.
### accounts inspect
### accounts update
Show detailed data on an existing account
Make changes to an existing account
Usage: `accounts inspect [command options] [arguments...]`
-grpc-namespace | $ACCOUNTS_GRPC_NAMESPACE
: Set the base namespace for the grpc namespace. Default: `flags.OverrideDefaultString(cfg.GRPC.Namespace, "com.owncloud.api")`.
-name | $ACCOUNTS_NAME
: service name. Default: `flags.OverrideDefaultString(cfg.Server.Name, "accounts")`.
Usage: `accounts update [command options] [arguments...]`
### accounts list
@@ -173,6 +128,33 @@ Rebuilds the service's index, i.e. deleting and then re-adding all existing docu
Usage: `accounts rebuildIndex [command options] [arguments...]`
### accounts remove
Removes an existing account
Usage: `accounts remove [command options] [arguments...]`
-grpc-namespace | $ACCOUNTS_GRPC_NAMESPACE
: Set the base namespace for the grpc namespace. Default: `flags.OverrideDefaultString(cfg.GRPC.Namespace, "com.owncloud.api")`.
-name | $ACCOUNTS_NAME
: service name. Default: `flags.OverrideDefaultString(cfg.Server.Name, "accounts")`.
### accounts ocis-accounts
Provide accounts and groups for oCIS
Usage: `accounts ocis-accounts [command options] [arguments...]`
-log-level | $ACCOUNTS_LOG_LEVEL , $OCIS_LOG_LEVEL
: Set logging level.
-log-pretty | $ACCOUNTS_LOG_PRETTY , $OCIS_LOG_PRETTY
: Enable pretty logging.
-log-color | $ACCOUNTS_LOG_COLOR , $OCIS_LOG_COLOR
: Enable colored logging.
### accounts version
Print the versions of the running instances
@@ -185,3 +167,21 @@ Usage: `accounts version [command options] [arguments...]`
-name | $ACCOUNTS_NAME
: service name. Default: `flags.OverrideDefaultString(cfg.Server.Name, "accounts")`.
### accounts add
Create a new account
Usage: `accounts add [command options] [arguments...]`
### accounts inspect
Show detailed data on an existing account
Usage: `accounts inspect [command options] [arguments...]`
-grpc-namespace | $ACCOUNTS_GRPC_NAMESPACE
: Set the base namespace for the grpc namespace. Default: `flags.OverrideDefaultString(cfg.GRPC.Namespace, "com.owncloud.api")`.
-name | $ACCOUNTS_NAME
: service name. Default: `flags.OverrideDefaultString(cfg.Server.Name, "accounts")`.
+1 -1
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-06-18T09:27:42+0000"
date: "2021-06-21T08:31:49+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/glauth/templates
+1 -1
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-06-18T09:27:42+0000"
date: "2021-06-21T08:31:49+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/graph-explorer/templates
+1 -1
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-06-18T09:27:42+0000"
date: "2021-06-21T08:31:49+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/graph/templates
+1 -1
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-06-18T09:27:42+0000"
date: "2021-06-21T08:31:49+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/idp/templates
+1 -1
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-06-18T09:27:42+0000"
date: "2021-06-21T08:31:49+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/ocs/templates
+10 -10
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-06-18T09:27:43+0000"
date: "2021-06-21T08:31:49+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/onlyoffice/templates
@@ -59,15 +59,6 @@ Usage: `onlyoffice [global options] command [command options] [arguments...]`
## Sub Commands
### onlyoffice health
Check health status
Usage: `onlyoffice health [command options] [arguments...]`
-debug-addr | $ONLYOFFICE_DEBUG_ADDR
: Address to debug endpoint. Default: `flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9224")`.
### onlyoffice server
Start integrated server
@@ -116,3 +107,12 @@ Usage: `onlyoffice server [command options] [arguments...]`
-asset-path | $ONLYOFFICE_ASSET_PATH
: Path to custom assets. Default: `flags.OverrideDefaultString(cfg.Asset.Path, "")`.
### onlyoffice health
Check health status
Usage: `onlyoffice health [command options] [arguments...]`
-debug-addr | $ONLYOFFICE_DEBUG_ADDR
: Address to debug endpoint. Default: `flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9224")`.
+13 -13
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-06-18T09:27:43+0000"
date: "2021-06-21T08:31:49+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/proxy/templates
@@ -35,6 +35,18 @@ If multiple variables are listed for one option, they are in order of precedence
If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
### proxy version
Print the versions of the running instances
Usage: `proxy version [command options] [arguments...]`
--service-namespace | $PROXY_SERVICE_NAMESPACE
: Set the base namespace for the service namespace. Default: `flags.OverrideDefaultString(cfg.OIDC.Issuer, "com.owncloud.web")`.
--service-name | $PROXY_SERVICE_NAME
: Service name. Default: `flags.OverrideDefaultString(cfg.Service.Name, "proxy")`.
### proxy health
Check health status
@@ -65,15 +77,3 @@ Start integrated server
Usage: `proxy server [command options] [arguments...]`
### proxy version
Print the versions of the running instances
Usage: `proxy version [command options] [arguments...]`
--service-namespace | $PROXY_SERVICE_NAMESPACE
: Set the base namespace for the service namespace. Default: `flags.OverrideDefaultString(cfg.OIDC.Issuer, "com.owncloud.web")`.
--service-name | $PROXY_SERVICE_NAME
: Service name. Default: `flags.OverrideDefaultString(cfg.Service.Name, "proxy")`.
+10 -10
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-06-18T09:27:43+0000"
date: "2021-06-21T08:31:49+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/settings/templates
@@ -35,6 +35,15 @@ If multiple variables are listed for one option, they are in order of precedence
If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
### settings health
Check health status
Usage: `settings health [command options] [arguments...]`
-debug-addr | $SETTINGS_DEBUG_ADDR
: Address to debug endpoint. Default: `flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9194")`.
### settings ocis-settings
Provide settings and permissions for oCIS
@@ -125,12 +134,3 @@ Usage: `settings version [command options] [arguments...]`
-name | $SETTINGS_NAME
: service name. Default: `flags.OverrideDefaultString(cfg.Service.Name, "settings")`.
### settings health
Check health status
Usage: `settings health [command options] [arguments...]`
-debug-addr | $SETTINGS_DEBUG_ADDR
: Address to debug endpoint. Default: `flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9194")`.
+215 -215
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-06-18T09:27:43+0000"
date: "2021-06-21T08:31:50+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/storage/templates
@@ -55,11 +55,107 @@ Usage: `storage [global options] command [command options] [arguments...]`
## Sub Commands
### storage storage-metadata
### storage frontend
Start storage-metadata service
Start frontend service
Usage: `storage storage-metadata [command options] [arguments...]`
Usage: `storage frontend [command options] [arguments...]`
-debug-addr | $STORAGE_FRONTEND_DEBUG_ADDR
: Address to bind debug server. Default: `flags.OverrideDefaultString(cfg.Reva.Frontend.DebugAddr, "0.0.0.0:9141")`.
-transfer-secret | $STORAGE_TRANSFER_SECRET
: Transfer secret for datagateway. Default: `flags.OverrideDefaultString(cfg.Reva.TransferSecret, "replace-me-with-a-transfer-secret")`.
-webdav-namespace | $STORAGE_WEBDAV_NAMESPACE
: Namespace prefix for the /webdav endpoint. Default: `flags.OverrideDefaultString(cfg.Reva.OCDav.WebdavNamespace, "/home/")`.
-dav-files-namespace | $STORAGE_DAV_FILES_NAMESPACE
: Namespace prefix for the webdav /dav/files endpoint. Default: `flags.OverrideDefaultString(cfg.Reva.OCDav.DavFilesNamespace, "/users/")`.
-network | $STORAGE_FRONTEND_HTTP_NETWORK
: Network to use for the storage service, can be 'tcp', 'udp' or 'unix'. Default: `flags.OverrideDefaultString(cfg.Reva.Frontend.HTTPNetwork, "tcp")`.
-addr | $STORAGE_FRONTEND_HTTP_ADDR
: Address to bind storage service. Default: `flags.OverrideDefaultString(cfg.Reva.Frontend.HTTPAddr, "0.0.0.0:9140")`.
-public-url | $STORAGE_FRONTEND_PUBLIC_URL , $OCIS_URL
: URL to use for the storage service. Default: `flags.OverrideDefaultString(cfg.Reva.Frontend.PublicURL, "https://localhost:9200")`.
-datagateway-prefix | $STORAGE_FRONTEND_DATAGATEWAY_PREFIX
: datagateway prefix. Default: `flags.OverrideDefaultString(cfg.Reva.Frontend.DatagatewayPrefix, "data")`.
-ocdav-prefix | $STORAGE_FRONTEND_OCDAV_PREFIX
: owncloud webdav endpoint prefix. Default: `flags.OverrideDefaultString(cfg.Reva.Frontend.OCDavPrefix, "")`.
-ocs-prefix | $STORAGE_FRONTEND_OCS_PREFIX
: open collaboration services endpoint prefix. Default: `flags.OverrideDefaultString(cfg.Reva.Frontend.OCSPrefix, "ocs")`.
-ocs-share-prefix | $STORAGE_FRONTEND_OCS_SHARE_PREFIX
: the prefix prepended to the path of shared files. Default: `flags.OverrideDefaultString(cfg.Reva.Frontend.OCSSharePrefix, "/Shares")`.
-ocs-home-namespace | $STORAGE_FRONTEND_OCS_HOME_NAMESPACE
: the prefix prepended to the incoming requests in OCS. Default: `flags.OverrideDefaultString(cfg.Reva.Frontend.OCSHomeNamespace, "/home")`.
-gateway-url | $STORAGE_GATEWAY_ENDPOINT
: URL to use for the storage gateway service. Default: `flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "localhost:9142")`.
-default-upload-protocol | $STORAGE_FRONTEND_DEFAULT_UPLOAD_PROTOCOL
: Default upload chunking protocol to be used out of tus/v1/ng. Default: `flags.OverrideDefaultString(cfg.Reva.DefaultUploadProtocol, "tus")`.
-upload-http-method-override | $STORAGE_FRONTEND_UPLOAD_HTTP_METHOD_OVERRIDE
: Specify an HTTP method (ex: POST) that clients should to use when uploading instead of PATCH. Default: `flags.OverrideDefaultString(cfg.Reva.UploadHTTPMethodOverride, "")`.
-checksum-preferred-upload-type | $STORAGE_FRONTEND_CHECKSUM_PREFERRED_UPLOAD_TYPE
: Specify the preferred checksum algorithm used for uploads. Default: `flags.OverrideDefaultString(cfg.Reva.ChecksumPreferredUploadType, "")`.
### storage storage-users
Start storage-users service
Usage: `storage storage-users [command options] [arguments...]`
-debug-addr | $STORAGE_USERS_DEBUG_ADDR
: Address to bind debug server. Default: `flags.OverrideDefaultString(cfg.Reva.StorageUsers.DebugAddr, "0.0.0.0:9159")`.
-grpc-network | $STORAGE_USERS_GRPC_NETWORK
: Network to use for the users storage, can be 'tcp', 'udp' or 'unix'. Default: `flags.OverrideDefaultString(cfg.Reva.StorageUsers.GRPCNetwork, "tcp")`.
-grpc-addr | $STORAGE_USERS_GRPC_ADDR
: GRPC Address to bind users storage. Default: `flags.OverrideDefaultString(cfg.Reva.StorageUsers.GRPCAddr, "0.0.0.0:9157")`.
-http-network | $STORAGE_USERS_HTTP_NETWORK
: Network to use for the storage service, can be 'tcp', 'udp' or 'unix'. Default: `flags.OverrideDefaultString(cfg.Reva.StorageUsers.HTTPNetwork, "tcp")`.
-http-addr | $STORAGE_USERS_HTTP_ADDR
: HTTP Address to bind users storage. Default: `flags.OverrideDefaultString(cfg.Reva.StorageUsers.HTTPAddr, "0.0.0.0:9158")`.
-driver | $STORAGE_USERS_DRIVER
: storage driver for users mount: eg. local, eos, owncloud, ocis or s3. Default: `flags.OverrideDefaultString(cfg.Reva.StorageUsers.Driver, "ocis")`.
-mount-path | $STORAGE_USERS_MOUNT_PATH
: mount path. Default: `flags.OverrideDefaultString(cfg.Reva.StorageUsers.MountPath, "/users")`.
-mount-id | $STORAGE_USERS_MOUNT_ID
: mount id. Default: `flags.OverrideDefaultString(cfg.Reva.StorageUsers.MountID, "1284d238-aa92-42ce-bdc4-0b0000009157")`.
-expose-data-server | $STORAGE_USERS_EXPOSE_DATA_SERVER
: exposes a dedicated data server. Default: `flags.OverrideDefaultBool(cfg.Reva.StorageUsers.ExposeDataServer, false)`.
-data-server-url | $STORAGE_USERS_DATA_SERVER_URL
: data server url. Default: `flags.OverrideDefaultString(cfg.Reva.StorageUsers.DataServerURL, "http://localhost:9158/data")`.
-http-prefix | $STORAGE_USERS_HTTP_PREFIX
: prefix for the http endpoint, without leading slash. Default: `flags.OverrideDefaultString(cfg.Reva.StorageUsers.HTTPPrefix, "data")`.
-tmp-folder | $STORAGE_USERS_TMP_FOLDER
: path to tmp folder. Default: `flags.OverrideDefaultString(cfg.Reva.StorageUsers.TempFolder, "/var/tmp/ocis/tmp/users")`.
-gateway-endpoint | $STORAGE_GATEWAY_ENDPOINT
: endpoint to use for the storage gateway service. Default: `flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "localhost:9142")`.
-users-endpoint | $STORAGE_USERPROVIDER_ENDPOINT
: endpoint to use for the storage service. Default: `flags.OverrideDefaultString(cfg.Reva.Users.Endpoint, "localhost:9144")`.
### storage users
@@ -85,6 +181,30 @@ Usage: `storage users [command options] [arguments...]`
-json-config | $STORAGE_USERPROVIDER_JSON
: Path to users.json file. Default: `flags.OverrideDefaultString(cfg.Reva.Users.JSON, "")`.
### storage auth-basic
Start authprovider for basic auth
Usage: `storage auth-basic [command options] [arguments...]`
-debug-addr | $STORAGE_AUTH_BASIC_DEBUG_ADDR
: Address to bind debug server. Default: `flags.OverrideDefaultString(cfg.Reva.AuthBasic.DebugAddr, "0.0.0.0:9147")`.
-auth-driver | $STORAGE_AUTH_DRIVER
: auth driver: 'demo', 'json' or 'ldap'. Default: `flags.OverrideDefaultString(cfg.Reva.AuthProvider.Driver, "ldap")`.
-auth-json | $STORAGE_AUTH_JSON
: Path to users.json file. Default: `flags.OverrideDefaultString(cfg.Reva.AuthProvider.JSON, "")`.
-network | $STORAGE_AUTH_BASIC_GRPC_NETWORK
: Network to use for the storage auth-basic service, can be 'tcp', 'udp' or 'unix'. Default: `flags.OverrideDefaultString(cfg.Reva.AuthBasic.GRPCNetwork, "tcp")`.
-addr | $STORAGE_AUTH_BASIC_GRPC_ADDR
: Address to bind storage service. Default: `flags.OverrideDefaultString(cfg.Reva.AuthBasic.GRPCAddr, "0.0.0.0:9146")`.
-gateway-url | $STORAGE_GATEWAY_ENDPOINT
: URL to use for the storage gateway service. Default: `flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "localhost:9142")`.
### storage storage-home
Start storage-home service
@@ -136,6 +256,27 @@ Usage: `storage storage-home [command options] [arguments...]`
-users-endpoint | $STORAGE_USERPROVIDER_ENDPOINT
: endpoint to use for the storage service. Default: `flags.OverrideDefaultString(cfg.Reva.Users.Endpoint, "localhost:9144")`.
### storage storage-public-link
Start storage-public-link service
Usage: `storage storage-public-link [command options] [arguments...]`
-debug-addr | $STORAGE_PUBLIC_LINK_DEBUG_ADDR
: Address to bind debug server. Default: `flags.OverrideDefaultString(cfg.Reva.StoragePublicLink.DebugAddr, "0.0.0.0:9179")`.
-network | $STORAGE_PUBLIC_LINK_GRPC_NETWORK
: Network to use for the storage service, can be 'tcp', 'udp' or 'unix'. Default: `flags.OverrideDefaultString(cfg.Reva.StoragePublicLink.GRPCNetwork, "tcp")`.
-addr | $STORAGE_PUBLIC_LINK_GRPC_ADDR
: Address to bind storage service. Default: `flags.OverrideDefaultString(cfg.Reva.StoragePublicLink.GRPCAddr, "0.0.0.0:9178")`.
-mount-path | $STORAGE_PUBLIC_LINK_MOUNT_PATH
: mount path. Default: `flags.OverrideDefaultString(cfg.Reva.StoragePublicLink.MountPath, "/public")`.
-gateway-endpoint | $STORAGE_GATEWAY_ENDPOINT
: endpoint to use for the storage gateway service. Default: `flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "localhost:9142")`.
### storage groups
Start groups service
@@ -160,26 +301,83 @@ Usage: `storage groups [command options] [arguments...]`
-json-config | $STORAGE_GROUPPROVIDER_JSON
: Path to groups.json file. Default: `flags.OverrideDefaultString(cfg.Reva.Groups.JSON, "")`.
### storage storage-public-link
### storage health
Start storage-public-link service
Check health status
Usage: `storage storage-public-link [command options] [arguments...]`
Usage: `storage health [command options] [arguments...]`
-debug-addr | $STORAGE_PUBLIC_LINK_DEBUG_ADDR
: Address to bind debug server. Default: `flags.OverrideDefaultString(cfg.Reva.StoragePublicLink.DebugAddr, "0.0.0.0:9179")`.
-debug-addr | $STORAGE_DEBUG_ADDR
: Address to debug endpoint. Default: `flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9109")`.
-network | $STORAGE_PUBLIC_LINK_GRPC_NETWORK
: Network to use for the storage service, can be 'tcp', 'udp' or 'unix'. Default: `flags.OverrideDefaultString(cfg.Reva.StoragePublicLink.GRPCNetwork, "tcp")`.
### storage sharing
-addr | $STORAGE_PUBLIC_LINK_GRPC_ADDR
: Address to bind storage service. Default: `flags.OverrideDefaultString(cfg.Reva.StoragePublicLink.GRPCAddr, "0.0.0.0:9178")`.
Start sharing service
-mount-path | $STORAGE_PUBLIC_LINK_MOUNT_PATH
: mount path. Default: `flags.OverrideDefaultString(cfg.Reva.StoragePublicLink.MountPath, "/public")`.
Usage: `storage sharing [command options] [arguments...]`
-gateway-endpoint | $STORAGE_GATEWAY_ENDPOINT
: endpoint to use for the storage gateway service. Default: `flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "localhost:9142")`.
-debug-addr | $STORAGE_SHARING_DEBUG_ADDR
: Address to bind debug server. Default: `flags.OverrideDefaultString(cfg.Reva.Sharing.DebugAddr, "0.0.0.0:9151")`.
-network | $STORAGE_SHARING_GRPC_NETWORK
: Network to use for the storage service, can be 'tcp', 'udp' or 'unix'. Default: `flags.OverrideDefaultString(cfg.Reva.Sharing.GRPCNetwork, "tcp")`.
-addr | $STORAGE_SHARING_GRPC_ADDR
: Address to bind storage service. Default: `flags.OverrideDefaultString(cfg.Reva.Sharing.GRPCAddr, "0.0.0.0:9150")`.
-user-driver | $STORAGE_SHARING_USER_DRIVER
: driver to use for the UserShareProvider. Default: `flags.OverrideDefaultString(cfg.Reva.Sharing.UserDriver, "json")`.
-user-json-file | $STORAGE_SHARING_USER_JSON_FILE
: file used to persist shares for the UserShareProvider. Default: `flags.OverrideDefaultString(cfg.Reva.Sharing.UserJSONFile, "/var/tmp/ocis/storage/shares.json")`.
-public-driver | $STORAGE_SHARING_PUBLIC_DRIVER
: driver to use for the PublicShareProvider. Default: `flags.OverrideDefaultString(cfg.Reva.Sharing.PublicDriver, "json")`.
-public-json-file | $STORAGE_SHARING_PUBLIC_JSON_FILE
: file used to persist shares for the PublicShareProvider. Default: `flags.OverrideDefaultString(cfg.Reva.Sharing.PublicJSONFile, "/var/tmp/ocis/storage/publicshares.json")`.
-public-enable-expired-shares-cleanup | $STORAGE_SHARING_PUBLIC_ENABLE_EXPIRED_SHARES_CLEANUP
: whether to periodically delete expired public shares. Default: `flags.OverrideDefaultBool(cfg.Reva.Sharing.PublicEnableExpiredSharesCleanup, true)`.
### storage storage-metadata
Start storage-metadata service
Usage: `storage storage-metadata [command options] [arguments...]`
### storage auth-bearer
Start authprovider for bearer auth
Usage: `storage auth-bearer [command options] [arguments...]`
-debug-addr | $STORAGE_AUTH_BEARER_DEBUG_ADDR
: Address to bind debug server. Default: `flags.OverrideDefaultString(cfg.Reva.AuthBearer.DebugAddr, "0.0.0.0:9149")`.
-oidc-issuer | $STORAGE_OIDC_ISSUER , $OCIS_URL
: OIDC issuer. Default: `flags.OverrideDefaultString(cfg.Reva.OIDC.Issuer, "https://localhost:9200")`.
-oidc-insecure | $STORAGE_OIDC_INSECURE
: OIDC allow insecure communication. Default: `flags.OverrideDefaultBool(cfg.Reva.OIDC.Insecure, true)`.
-oidc-id-claim | $STORAGE_OIDC_ID_CLAIM
: OIDC id claim. Default: `flags.OverrideDefaultString(cfg.Reva.OIDC.IDClaim, "preferred_username")`.
-oidc-uid-claim | $STORAGE_OIDC_UID_CLAIM
: OIDC uid claim. Default: `flags.OverrideDefaultString(cfg.Reva.OIDC.UIDClaim, "")`.
-oidc-gid-claim | $STORAGE_OIDC_GID_CLAIM
: OIDC gid claim. Default: `flags.OverrideDefaultString(cfg.Reva.OIDC.GIDClaim, "")`.
-network | $STORAGE_AUTH_BEARER_GRPC_NETWORK
: Network to use for the storage service, can be 'tcp', 'udp' or 'unix'. Default: `flags.OverrideDefaultString(cfg.Reva.AuthBearer.GRPCNetwork, "tcp")`.
-addr | $STORAGE_AUTH_BEARER_GRPC_ADDR
: Address to bind storage service. Default: `flags.OverrideDefaultString(cfg.Reva.AuthBearer.GRPCAddr, "0.0.0.0:9148")`.
-gateway-url | $STORAGE_GATEWAY_ENDPOINT
: URL to use for the storage gateway service. Default: `flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "localhost:9142")`.
### storage gateway
@@ -271,174 +469,6 @@ Usage: `storage gateway [command options] [arguments...]`
-storage-public-link-mount-path | $STORAGE_PUBLIC_LINK_MOUNT_PATH
: mount path. Default: `flags.OverrideDefaultString(cfg.Reva.StoragePublicLink.MountPath, "/public")`.
### storage auth-bearer
Start authprovider for bearer auth
Usage: `storage auth-bearer [command options] [arguments...]`
-debug-addr | $STORAGE_AUTH_BEARER_DEBUG_ADDR
: Address to bind debug server. Default: `flags.OverrideDefaultString(cfg.Reva.AuthBearer.DebugAddr, "0.0.0.0:9149")`.
-oidc-issuer | $STORAGE_OIDC_ISSUER , $OCIS_URL
: OIDC issuer. Default: `flags.OverrideDefaultString(cfg.Reva.OIDC.Issuer, "https://localhost:9200")`.
-oidc-insecure | $STORAGE_OIDC_INSECURE
: OIDC allow insecure communication. Default: `flags.OverrideDefaultBool(cfg.Reva.OIDC.Insecure, true)`.
-oidc-id-claim | $STORAGE_OIDC_ID_CLAIM
: OIDC id claim. Default: `flags.OverrideDefaultString(cfg.Reva.OIDC.IDClaim, "preferred_username")`.
-oidc-uid-claim | $STORAGE_OIDC_UID_CLAIM
: OIDC uid claim. Default: `flags.OverrideDefaultString(cfg.Reva.OIDC.UIDClaim, "")`.
-oidc-gid-claim | $STORAGE_OIDC_GID_CLAIM
: OIDC gid claim. Default: `flags.OverrideDefaultString(cfg.Reva.OIDC.GIDClaim, "")`.
-network | $STORAGE_AUTH_BEARER_GRPC_NETWORK
: Network to use for the storage service, can be 'tcp', 'udp' or 'unix'. Default: `flags.OverrideDefaultString(cfg.Reva.AuthBearer.GRPCNetwork, "tcp")`.
-addr | $STORAGE_AUTH_BEARER_GRPC_ADDR
: Address to bind storage service. Default: `flags.OverrideDefaultString(cfg.Reva.AuthBearer.GRPCAddr, "0.0.0.0:9148")`.
-gateway-url | $STORAGE_GATEWAY_ENDPOINT
: URL to use for the storage gateway service. Default: `flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "localhost:9142")`.
### storage storage-users
Start storage-users service
Usage: `storage storage-users [command options] [arguments...]`
-debug-addr | $STORAGE_USERS_DEBUG_ADDR
: Address to bind debug server. Default: `flags.OverrideDefaultString(cfg.Reva.StorageUsers.DebugAddr, "0.0.0.0:9159")`.
-grpc-network | $STORAGE_USERS_GRPC_NETWORK
: Network to use for the users storage, can be 'tcp', 'udp' or 'unix'. Default: `flags.OverrideDefaultString(cfg.Reva.StorageUsers.GRPCNetwork, "tcp")`.
-grpc-addr | $STORAGE_USERS_GRPC_ADDR
: GRPC Address to bind users storage. Default: `flags.OverrideDefaultString(cfg.Reva.StorageUsers.GRPCAddr, "0.0.0.0:9157")`.
-http-network | $STORAGE_USERS_HTTP_NETWORK
: Network to use for the storage service, can be 'tcp', 'udp' or 'unix'. Default: `flags.OverrideDefaultString(cfg.Reva.StorageUsers.HTTPNetwork, "tcp")`.
-http-addr | $STORAGE_USERS_HTTP_ADDR
: HTTP Address to bind users storage. Default: `flags.OverrideDefaultString(cfg.Reva.StorageUsers.HTTPAddr, "0.0.0.0:9158")`.
-driver | $STORAGE_USERS_DRIVER
: storage driver for users mount: eg. local, eos, owncloud, ocis or s3. Default: `flags.OverrideDefaultString(cfg.Reva.StorageUsers.Driver, "ocis")`.
-mount-path | $STORAGE_USERS_MOUNT_PATH
: mount path. Default: `flags.OverrideDefaultString(cfg.Reva.StorageUsers.MountPath, "/users")`.
-mount-id | $STORAGE_USERS_MOUNT_ID
: mount id. Default: `flags.OverrideDefaultString(cfg.Reva.StorageUsers.MountID, "1284d238-aa92-42ce-bdc4-0b0000009157")`.
-expose-data-server | $STORAGE_USERS_EXPOSE_DATA_SERVER
: exposes a dedicated data server. Default: `flags.OverrideDefaultBool(cfg.Reva.StorageUsers.ExposeDataServer, false)`.
-data-server-url | $STORAGE_USERS_DATA_SERVER_URL
: data server url. Default: `flags.OverrideDefaultString(cfg.Reva.StorageUsers.DataServerURL, "http://localhost:9158/data")`.
-http-prefix | $STORAGE_USERS_HTTP_PREFIX
: prefix for the http endpoint, without leading slash. Default: `flags.OverrideDefaultString(cfg.Reva.StorageUsers.HTTPPrefix, "data")`.
-tmp-folder | $STORAGE_USERS_TMP_FOLDER
: path to tmp folder. Default: `flags.OverrideDefaultString(cfg.Reva.StorageUsers.TempFolder, "/var/tmp/ocis/tmp/users")`.
-gateway-endpoint | $STORAGE_GATEWAY_ENDPOINT
: endpoint to use for the storage gateway service. Default: `flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "localhost:9142")`.
-users-endpoint | $STORAGE_USERPROVIDER_ENDPOINT
: endpoint to use for the storage service. Default: `flags.OverrideDefaultString(cfg.Reva.Users.Endpoint, "localhost:9144")`.
### storage auth-basic
Start authprovider for basic auth
Usage: `storage auth-basic [command options] [arguments...]`
-debug-addr | $STORAGE_AUTH_BASIC_DEBUG_ADDR
: Address to bind debug server. Default: `flags.OverrideDefaultString(cfg.Reva.AuthBasic.DebugAddr, "0.0.0.0:9147")`.
-auth-driver | $STORAGE_AUTH_DRIVER
: auth driver: 'demo', 'json' or 'ldap'. Default: `flags.OverrideDefaultString(cfg.Reva.AuthProvider.Driver, "ldap")`.
-auth-json | $STORAGE_AUTH_JSON
: Path to users.json file. Default: `flags.OverrideDefaultString(cfg.Reva.AuthProvider.JSON, "")`.
-network | $STORAGE_AUTH_BASIC_GRPC_NETWORK
: Network to use for the storage auth-basic service, can be 'tcp', 'udp' or 'unix'. Default: `flags.OverrideDefaultString(cfg.Reva.AuthBasic.GRPCNetwork, "tcp")`.
-addr | $STORAGE_AUTH_BASIC_GRPC_ADDR
: Address to bind storage service. Default: `flags.OverrideDefaultString(cfg.Reva.AuthBasic.GRPCAddr, "0.0.0.0:9146")`.
-gateway-url | $STORAGE_GATEWAY_ENDPOINT
: URL to use for the storage gateway service. Default: `flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "localhost:9142")`.
### storage frontend
Start frontend service
Usage: `storage frontend [command options] [arguments...]`
-debug-addr | $STORAGE_FRONTEND_DEBUG_ADDR
: Address to bind debug server. Default: `flags.OverrideDefaultString(cfg.Reva.Frontend.DebugAddr, "0.0.0.0:9141")`.
-transfer-secret | $STORAGE_TRANSFER_SECRET
: Transfer secret for datagateway. Default: `flags.OverrideDefaultString(cfg.Reva.TransferSecret, "replace-me-with-a-transfer-secret")`.
-webdav-namespace | $STORAGE_WEBDAV_NAMESPACE
: Namespace prefix for the /webdav endpoint. Default: `flags.OverrideDefaultString(cfg.Reva.OCDav.WebdavNamespace, "/home/")`.
-dav-files-namespace | $STORAGE_DAV_FILES_NAMESPACE
: Namespace prefix for the webdav /dav/files endpoint. Default: `flags.OverrideDefaultString(cfg.Reva.OCDav.DavFilesNamespace, "/users/")`.
-network | $STORAGE_FRONTEND_HTTP_NETWORK
: Network to use for the storage service, can be 'tcp', 'udp' or 'unix'. Default: `flags.OverrideDefaultString(cfg.Reva.Frontend.HTTPNetwork, "tcp")`.
-addr | $STORAGE_FRONTEND_HTTP_ADDR
: Address to bind storage service. Default: `flags.OverrideDefaultString(cfg.Reva.Frontend.HTTPAddr, "0.0.0.0:9140")`.
-public-url | $STORAGE_FRONTEND_PUBLIC_URL , $OCIS_URL
: URL to use for the storage service. Default: `flags.OverrideDefaultString(cfg.Reva.Frontend.PublicURL, "https://localhost:9200")`.
-datagateway-prefix | $STORAGE_FRONTEND_DATAGATEWAY_PREFIX
: datagateway prefix. Default: `flags.OverrideDefaultString(cfg.Reva.Frontend.DatagatewayPrefix, "data")`.
-ocdav-prefix | $STORAGE_FRONTEND_OCDAV_PREFIX
: owncloud webdav endpoint prefix. Default: `flags.OverrideDefaultString(cfg.Reva.Frontend.OCDavPrefix, "")`.
-ocs-prefix | $STORAGE_FRONTEND_OCS_PREFIX
: open collaboration services endpoint prefix. Default: `flags.OverrideDefaultString(cfg.Reva.Frontend.OCSPrefix, "ocs")`.
-ocs-share-prefix | $STORAGE_FRONTEND_OCS_SHARE_PREFIX
: the prefix prepended to the path of shared files. Default: `flags.OverrideDefaultString(cfg.Reva.Frontend.OCSSharePrefix, "/Shares")`.
-ocs-home-namespace | $STORAGE_FRONTEND_OCS_HOME_NAMESPACE
: the prefix prepended to the incoming requests in OCS. Default: `flags.OverrideDefaultString(cfg.Reva.Frontend.OCSHomeNamespace, "/home")`.
-gateway-url | $STORAGE_GATEWAY_ENDPOINT
: URL to use for the storage gateway service. Default: `flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "localhost:9142")`.
-default-upload-protocol | $STORAGE_FRONTEND_DEFAULT_UPLOAD_PROTOCOL
: Default upload chunking protocol to be used out of tus/v1/ng. Default: `flags.OverrideDefaultString(cfg.Reva.DefaultUploadProtocol, "tus")`.
-upload-http-method-override | $STORAGE_FRONTEND_UPLOAD_HTTP_METHOD_OVERRIDE
: Specify an HTTP method (ex: POST) that clients should to use when uploading instead of PATCH. Default: `flags.OverrideDefaultString(cfg.Reva.UploadHTTPMethodOverride, "")`.
-checksum-preferred-upload-type | $STORAGE_FRONTEND_CHECKSUM_PREFERRED_UPLOAD_TYPE
: Specify the preferred checksum algorithm used for uploads. Default: `flags.OverrideDefaultString(cfg.Reva.ChecksumPreferredUploadType, "")`.
### storage health
Check health status
Usage: `storage health [command options] [arguments...]`
-debug-addr | $STORAGE_DEBUG_ADDR
: Address to debug endpoint. Default: `flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9109")`.
### storage storage
Storage service for oCIS
@@ -457,36 +487,6 @@ Usage: `storage storage [command options] [arguments...]`
-log-color | $STORAGE_LOG_COLOR , $OCIS_LOG_COLOR
: Enable colored logging.
### storage sharing
Start sharing service
Usage: `storage sharing [command options] [arguments...]`
-debug-addr | $STORAGE_SHARING_DEBUG_ADDR
: Address to bind debug server. Default: `flags.OverrideDefaultString(cfg.Reva.Sharing.DebugAddr, "0.0.0.0:9151")`.
-network | $STORAGE_SHARING_GRPC_NETWORK
: Network to use for the storage service, can be 'tcp', 'udp' or 'unix'. Default: `flags.OverrideDefaultString(cfg.Reva.Sharing.GRPCNetwork, "tcp")`.
-addr | $STORAGE_SHARING_GRPC_ADDR
: Address to bind storage service. Default: `flags.OverrideDefaultString(cfg.Reva.Sharing.GRPCAddr, "0.0.0.0:9150")`.
-user-driver | $STORAGE_SHARING_USER_DRIVER
: driver to use for the UserShareProvider. Default: `flags.OverrideDefaultString(cfg.Reva.Sharing.UserDriver, "json")`.
-user-json-file | $STORAGE_SHARING_USER_JSON_FILE
: file used to persist shares for the UserShareProvider. Default: `flags.OverrideDefaultString(cfg.Reva.Sharing.UserJSONFile, "/var/tmp/ocis/storage/shares.json")`.
-public-driver | $STORAGE_SHARING_PUBLIC_DRIVER
: driver to use for the PublicShareProvider. Default: `flags.OverrideDefaultString(cfg.Reva.Sharing.PublicDriver, "json")`.
-public-json-file | $STORAGE_SHARING_PUBLIC_JSON_FILE
: file used to persist shares for the PublicShareProvider. Default: `flags.OverrideDefaultString(cfg.Reva.Sharing.PublicJSONFile, "/var/tmp/ocis/storage/publicshares.json")`.
-public-enable-expired-shares-cleanup | $STORAGE_SHARING_PUBLIC_ENABLE_EXPIRED_SHARES_CLEANUP
: whether to periodically delete expired public shares. Default: `flags.OverrideDefaultBool(cfg.Reva.Sharing.PublicEnableExpiredSharesCleanup, true)`.
## Config for the different Storage Drivers
You can set different storage drivers for the Storage Providers. Please check the storage provider configuration.
+1 -1
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-06-18T09:27:44+0000"
date: "2021-06-21T08:31:50+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/store/templates
+1 -1
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-06-18T09:27:44+0000"
date: "2021-06-21T08:31:50+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/thumbnails/templates
+7 -7
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-06-18T09:27:45+0000"
date: "2021-06-21T08:31:51+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/web/templates
@@ -43,6 +43,12 @@ Usage: `web [global options] command [command options] [arguments...]`
## Sub Commands
### web server
Start integrated server
Usage: `web server [command options] [arguments...]`
### web health
Check health status
@@ -52,9 +58,3 @@ Usage: `web health [command options] [arguments...]`
-debug-addr | $WEB_DEBUG_ADDR
: Address to debug endpoint. Default: `flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9104")`.
### web server
Start integrated server
Usage: `web server [command options] [arguments...]`
+1 -1
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-06-18T09:27:45+0000"
date: "2021-06-21T08:31:51+0000"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/webdav/templates
+88 -88
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2021-06-18T09:27:42+0000"
date: "2021-06-21T08:31:49+0000"
weight: 2
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/ocis/templates
@@ -86,12 +86,33 @@ Usage: `ocis [global options] command [command options] [arguments...]`
## Sub Commands
### ocis kill
Kill an extension by name
Usage: `ocis kill [command options] [arguments...]`
### ocis list
Lists running ocis extensions
Usage: `ocis list [command options] [arguments...]`
### ocis run
Runs an extension
Usage: `ocis run [command options] [arguments...]`
### ocis health
Check health status
Usage: `ocis health [command options] [arguments...]`
-debug-addr | $OCIS_DEBUG_ADDR
: Address to debug endpoint. Default: `0.0.0.0:9010`.
### ocis server
Start fullstack server
@@ -119,95 +140,22 @@ Usage: `ocis server [command options] [arguments...]`
-grpc-addr | $OCIS_GRPC_ADDR
: Address to bind grpc server. Default: `0.0.0.0:9001`.
### ocis health
Check health status
Usage: `ocis health [command options] [arguments...]`
-debug-addr | $OCIS_DEBUG_ADDR
: Address to debug endpoint. Default: `0.0.0.0:9010`.
### ocis kill
Kill an extension by name
Usage: `ocis kill [command options] [arguments...]`
### ocis run
Runs an extension
Usage: `ocis run [command options] [arguments...]`
### List of available Extension subcommands
There are more subcommands to start the individual extensions. Please check the documentation about their usage and options in the dedicated section of the documentation.
#### ocis accounts
Start accounts server
#### ocis settings
Start settings server
#### ocis ocs
Start ocs server
#### ocis storage-frontend
Start storage frontend
#### ocis thumbnails
Start thumbnails server
#### ocis storage-metadata
Start storage and data service for metadata
#### ocis storage-users
Start storage and data provider for /users mount
#### ocis version
Lists running services with version
#### ocis storage-auth-bearer
Start storage auth-bearer service
#### ocis web
Start web server
#### ocis idp
Start idp server
#### ocis glauth
Start glauth server
#### ocis onlyoffice
Start onlyoffice server
#### ocis proxy
Start proxy server
#### ocis storage-userprovider
Start storage userprovider service
#### ocis store
Start a go-micro store
#### ocis accounts
Start accounts server
#### ocis storage-sharing
Start storage sharing service
@@ -216,23 +164,75 @@ Start storage sharing service
Start webdav server
#### ocis storage-groupprovider
#### ocis idp
Start storage groupprovider service
#### ocis storage-gateway
Start storage gateway
#### ocis storage-home
Start storage and data provider for /home mount
Start idp server
#### ocis storage-auth-basic
Start storage auth-basic service
#### ocis storage-home
Start storage and data provider for /home mount
#### ocis thumbnails
Start thumbnails server
#### ocis version
Lists running services with version
#### ocis onlyoffice
Start onlyoffice server
#### ocis storage-groupprovider
Start storage groupprovider service
#### ocis storage-users
Start storage and data provider for /users mount
#### ocis ocs
Start ocs server
#### ocis storage-public-link
Start storage public link storage
#### ocis web
Start web server
#### ocis storage-frontend
Start storage frontend
#### ocis storage-metadata
Start storage and data service for metadata
#### ocis glauth
Start glauth server
#### ocis proxy
Start proxy server
#### ocis storage-gateway
Start storage gateway
#### ocis storage-userprovider
Start storage userprovider service
#### ocis store
Start a go-micro store
+30 -198
View File
@@ -7,227 +7,59 @@ geekdocEditPath: edit/master/docs/ocis/development
geekdocFilePath: extensions.md
---
{{< toc >}}
oCIS is all about files, sync and share - but most of the time there is more you want to do with your files, e.g. having a different view on your photo collection or editing your offices files in an online file editor. ownCloud 10 faced the same problem and solved it with `applications`, which can extend the functionality of ownCloud 10 in a wide range. Since oCIS is different in its architecture compared to ownCloud 10, we had to come up with a similiar (yet slightly different) solution. To extend the functionality of oCIS, you can write or install `extensions`. An extension is basically any running code which integrates into oCIS and provides functionality to oCIS and its users. Because extensions are just microservices providing an API, you can technically choose any programming language you like - a huge improvement to ownCloud 10, where it was nearly impossible to use a different programming language than PHP.
## How to build and run ocis-simple
We will now introduce you to the oCIS extension system and show you how you can create a custom extension yourself.
oCIS uses build tags to build different flavors of the binary. In order to work on a new extension we are going to reduce the scope a little and use the `simple` tag. Let us begin by creating a dedicated folder:
## Extension examples
```console
mkdir ocis-extension-workshop && ocis-extension-workshop
```
Technically every service in oCIS is an extension, even if oCIS would not really work without some of them. Therefore, you can draw inspiration from any of the plenty of extensions in the [oCIS monorepo](https://github.com/owncloud/ocis).
Following https://github.com/owncloud/ocis
Besides these "default" extensions in the oCIS monorepo, there are two more extensions you should be aware of:
```console
git clone https://github.com/owncloud/ocis.git
cd ocis
- [Hello](https://github.com/owncloud/ocis-hello)
- [WOPI server](https://github.com/owncloud/ocis-wopiserver)
TAGS=simple make generate build
```
Differences between the extensions maintained inside the oCIS monorepo and the ones maintained in their own repository are:
*Q: Can you specify which version of ownCloud Web to use?*
*A: No, the ownCloud Web that is used is compiled into the [assets of ocis-web](https://github.com/owncloud/ocis/blob/master/web/pkg/assets/embed.go) which is currently not automatically updated. We'll see how to use a custom ownCloud Web later.*
- extensions inside the [oCIS monorepo](https://github.com/owncloud/ocis) are all written in Go, whereas other extensions may choose the programming language freely
- extensions inside the oCIS monorepo heavily share tooling to reduce maintenance efforts, whereas other extensions may use different tooling (e.g. a different CI system)
- extensions inside the oCIS monorepo will be all build into one binary and started with the `ocis server` command. All other extensions must be started individually besides oCIS.
`bin/ocis server`
Open the browser at https://localhost:9200
For quickstart purposes we also offer a [template project](https://github.com/owncloud/boilr-ocis-extension) which can be used to generate all the boilerplate code for you. But you also can decide to use your own project layout or even a different programming language.
1. You land on the login screen. click login
2. You are redirected to an idp at https://localhost:9200/signin/v1/identifier with a login mask. Use `einstein:relativity` (one of the three demo users) to log in
3. You are redirected to http://localhost:9100/#/hello the ocis-hello app
4. Replace `World` with something else and submit. You should see `Hello %something else%`
*Q: One of the required ports is already in use. Ocis seems to be trying to restart the service over and over. What gives?*
*A: Using the ocis binary to start the server will case ocis to keep track of the different services and restart them in case they crash.*
## Integration into oCIS
## Hacking ocis-hello
go back to the ocis-extension-workshop folder
```console
cd ..
```
Following https://github.com/owncloud/ocis-hello
```
git clone https://github.com/owncloud/ocis-hello.git
cd ocis-hello
yarn install
# this actually creates the assets
yarn build
# this will compile the assets into the binary
make generate build
```
Two options:
1. run only the necessary services from ocis and ocis-hello independently
2. compile ocis with the updated ocis-hello
### Option 1:
get a list of ocis services:
```console
ps ax | grep ocis
```
Try to kill `ocis hello`
Remember: For now, killing a service will cause ocis to restart it. This is subject to change.
In order to be able to manage the processes ourselves we need to start them independently:
`bin/ocis server` starts the same services as:
```
bin/ocis micro &
bin/ocis web &
bin/ocis hello &
bin/ocis reva &
```
Now we can kill the `ocis hello` and use our custom built ocis-hello binary:
```console
cd ../ocis-hello
bin/ocis-hello server
```
## Hacking ownCloud Web (and ocis-web)
Following https://github.com/owncloud/web we are going to build the current ownCloud Web
```
git clone https://github.com/owncloud/web.git
cd web
yarn install
yarn dist
```
We can tell ocis to use the compiled assets:
Kill `ocis web`, then use the compiled assets when starting ownCloud Web.
```console
cd ../ocis
WEB_ASSET_PATH="`pwd`/../web/dist" bin/ocis web
```
## The ownCloud design system
The [ownCloud design system](https://owncloud.design/) contains a set of ownCloud vue components for ownCloud Web or your own ocis extensions. Please use it for a consistent look and feel.
## External ownCloud Web apps
This is what hello is: copy and extend!
1. ownCloud Web is configured using the config.json which is served by the ocis-web service (either `bin/ocis web` or `bin/web server`)
2. point ocis-web to the web config which you extended with an external app:
`WEB_UI_CONFIG="`pwd`/../web/config.json" ASSET_PATH="`pwd`/../web/dist" bin/ocis web`
```json
{
"server": "https://localhost:9200",
"theme": "owncloud",
"version": "0.1.0",
"openIdConnect": {
"metadata_url": "https://localhost:9200/.well-known/openid-configuration",
"authority": "https://localhost:9200",
"client_id": "web",
"response_type": "code",
"scope": "openid profile email"
},
"apps": [],
"external_apps": [
{
"id": "hello",
"path": "http://localhost:9105/hello.js",
"config": {
"url": "http://localhost:9105"
}
},
{
"id": "myapp",
"path": "http://localhost:6789/superapp.js",
"config": {
"backend": "http://someserver:1234",
"myconfig": "is awesome"
}
}
]
}
```
## ownCloud Web extension points
{{< hint info >}}
For an up to date list check out [the ownCloud Web documentation](https://github.com/owncloud/web/issues/2423).
{{< /hint >}}
Several ones available:
Depending on the functionality of your extension, you might need to integrate with one or multiple of the components of oCIS mentioned below.
### ownCloud Web
- App switcher (defined in config.json)
- App container (loads UI of your extension)
### Files app
- File action
- Create new file action
- Sidebar
- Quick access for sidebar inside of file actions (in the file row)
If your extension is not just doing something in the background, you will need a UI in order to allow the user to interact with your extension. You could just provide your own web frontend for that purpose, but for a better user experience you can easily integrate into the web frontend of oCIS, the new [ownCloud Web](https://github.com/owncloud/web).
Example of a file action in the `app.js`:
```js
const appInfo = {
name: 'MarkdownEditor',
id: 'markdown-editor',
icon: 'text',
isFileEditor: true,
extensions: [{
extension: 'txt',
newFileMenu: {
menuTitle ($gettext) {
return $gettext('Create new plain text file…')
}
}
},
{
extension: 'md',
newFileMenu: {
menuTitle ($gettext) {
return $gettext('Create new mark-down file…')
}
}
}]
}
```
ownCloud Web allows you to write an extension for itself and therefore offers a seamless user experience. Upon login, the user will be able to use the application switcher to switch between the files view, settings and other available and installed extensions, yours included. Furthermore it is also possible to register your extension for different file actions. As an example, you could offer your extension to the user for creating and editing office documents. The user will then be able to create or open a file with your application directly from the files view. How to provide create an extension for ownCloud Web can be seen best in [the Hello extension](https://github.com/owncloud/ocis-hello/blob/master/ui/app.js), whereas plain file handling without any web frontend is available in the [WOPI server extension](https://github.com/owncloud/ocis-wopiserver/blob/master/ui/app.js).
For the side bar have a look at the files app, `defaults.js` & `fileSideBars`
To make ownCloud Web pick up your extension, you need to activate it in the configuration like seen in the [Hello extension](https://owncloud.dev/extensions/ocis_hello/running/#configure-and-start-ocis).
## API driven development
For a consistent look and feel, ownCloud Web uses a external design library, the [ownCloud design system](https://github.com/owncloud/owncloud-design-system). Since its classes and components are available through the wrapping `web runtime`, we highly recommend you to leverage it in your extension as well.
Until now we only had a look at the ui and how the extensions are managed on the cli. But how do apps actually talk to the server?
### Settings
Short answer: any way you like
An extension likely has some behaviour which the user can configure. Fundamental configuration will often be done by administrators during deployment, via configuration files or by setting environment variables. But for other settings, which are supposed to change more often or which are even user specific, this is not a viable way. Therefore you need to offer the users a UI where they can configure your extension to their liking. Because implementing something like this is a repetitive task among extensions, oCIS already offers the settings extensions which does that for your extension. Your extension just needs to register settings bundles, respective permissions and finally read the current values from the settings service. You can read more on that on the [settings extension]({{< ref "../../extensions/settings" >}}) and see how [oCIS Hello uses these settings](https://owncloud.dev/extensions/ocis_hello/settings/).
Long answer: micro and ocis-hello follow a protocol driven development:
### Proxy
- specify the API using protobuf
- generate client and server code
- evolve based on the protocol
The Proxy is an API gateway and acts as the single connection point where all external request from users and devices need to pass through.
- CS3 api uses protobuf as well and uses GRPC
To make sure that requests can reach your extension's API, you need to register one or multiple endpoints at the proxy. The registration is a easy task and can be seen best on the [oCIS Hello example](https://owncloud.dev/extensions/ocis_hello/running/#configure-and-start-ocis).
- ocis uses go-micro, which provides http and grpc gateways
- the gateways and protocols are optional
As files in ownCloud must always stay private (unless you share them with your friends or coworkers), requests to oCIS have an authenticated user context. This user context is also available to your extension and can be used to interact with the user's files. How to get the user context and authentication can be seen on the [oCIS Hello example](https://owncloud.dev/extensions/ocis_hello/settings/#account-uuid).
- owncloud and kopano are looking into a [MS graph](https://developer.microsoft.com/de-de/graph) like api to handle ownCloud Web requests.
- they might be about user, contacts, calendars ... which is covered by the graph api
- we want to integrate with eg. kopano and provide a common api (file sync and share is covered as well)
### Storage
- as an example for protobuf take a look at [ocis-hello](https://github.com/owncloud/ocis-hello/tree/master/pkg/proto/v0)
oCIS leverages the CS3 APIs and [CS3 REVA](https://github.com/cs3org/reva) as a storage system because it offers a very flexible setup and supports a variety of storage backends like EOS, S3 and of course your local hard drive. REVA makes it easy to support more storage backends as needed.
If you need to interact with files directly, you have the full power of the [CS3 APIs](https://cs3org.github.io/cs3apis/) in your hand. With the user context and the user's authentication token, which your extensions gets from the proxy, your extension can make these request in behalf of the user.
If your extension needs to store persistent data which is not supposed to live in the user's home folder, there is also a so-called metadata storage, intended for exactly that purpose. You should always use the metadata storage in favor of the local filesystem for persistent files, because your extension will then automatically use the storage backend the oCIS admin decides to use. For a temporary cache it is perfectly fine to use the local filesystem.