Merge branch 'master' into autoincrement-index
This commit is contained in:
+15
-23
@@ -15,7 +15,7 @@ config = {
|
||||
},
|
||||
'apiTests': {
|
||||
'coreBranch': 'master',
|
||||
'coreCommit': 'efdb00764e4238726d3c9938b42923be4cb256d6',
|
||||
'coreCommit': '914992f5f6d4bb562534fa52273e5bd0bc11b208',
|
||||
'numberOfParts': 6
|
||||
},
|
||||
'uiTests': {
|
||||
@@ -343,8 +343,7 @@ def localApiTests(ctx, coreBranch = 'master', coreCommit = '', storage = 'ownclo
|
||||
'environment' : {
|
||||
'TEST_SERVER_URL': 'https://ocis-server:9200',
|
||||
'OCIS_REVA_DATA_ROOT': '%s' % ('/srv/app/tmp/ocis/owncloud/data/' if storage == 'owncloud' else ''),
|
||||
'STORAGE_DRIVER': '%s' % ('OWNCLOUD' if storage == 'owncloud' else 'OCIS'),
|
||||
'DELETE_USER_DATA_CMD': '%s' % ('' if storage == 'owncloud' else 'rm -rf /srv/app/tmp/ocis/storage/users/nodes/root/*'),
|
||||
'DELETE_USER_DATA_CMD': '%s' % ('' if storage == 'owncloud' else 'rm -rf /srv/app/tmp/ocis/storage/users/nodes/root/* /srv/app/tmp/ocis/storage/users/nodes/*-*-*-*'),
|
||||
'SKELETON_DIR': '/srv/app/tmp/testing/data/apiSkeleton',
|
||||
'OCIS_SKELETON_STRATEGY': '%s' % ('copy' if storage == 'owncloud' else 'upload'),
|
||||
'TEST_OCIS':'true',
|
||||
@@ -398,8 +397,7 @@ def coreApiTests(ctx, coreBranch = 'master', coreCommit = '', part_number = 1, n
|
||||
'environment' : {
|
||||
'TEST_SERVER_URL': 'https://ocis-server:9200',
|
||||
'OCIS_REVA_DATA_ROOT': '%s' % ('/srv/app/tmp/ocis/owncloud/data/' if storage == 'owncloud' else ''),
|
||||
'STORAGE_DRIVER': '%s' % ('OWNCLOUD' if storage == 'owncloud' else 'OCIS'),
|
||||
'DELETE_USER_DATA_CMD': '%s' % ('' if storage == 'owncloud' else 'rm -rf /srv/app/tmp/ocis/storage/users/nodes/root/*'),
|
||||
'DELETE_USER_DATA_CMD': '%s' % ('' if storage == 'owncloud' else 'rm -rf /srv/app/tmp/ocis/storage/users/nodes/root/* /srv/app/tmp/ocis/storage/users/nodes/*-*-*-*'),
|
||||
'SKELETON_DIR': '/srv/app/tmp/testing/data/apiSkeleton',
|
||||
'OCIS_SKELETON_STRATEGY': '%s' % ('copy' if storage == 'owncloud' else 'upload'),
|
||||
'TEST_OCIS':'true',
|
||||
@@ -548,22 +546,18 @@ def accountsUITests(ctx, phoenixBranch, phoenixCommitId, storage):
|
||||
'detach': True,
|
||||
'environment' : {
|
||||
#'OCIS_LOG_LEVEL': 'debug',
|
||||
'STORAGE_STORAGE_HOME_DRIVER': '%s' % (storage),
|
||||
'STORAGE_STORAGE_HOME_DATA_DRIVER': '%s' % (storage),
|
||||
'STORAGE_STORAGE_OC_DRIVER': '%s' % (storage),
|
||||
'STORAGE_STORAGE_OC_DATA_DRIVER': '%s' % (storage),
|
||||
'STORAGE_STORAGE_HOME_DATA_TEMP_FOLDER': '/srv/app/tmp/',
|
||||
'STORAGE_HOME_DRIVER': '%s' % (storage),
|
||||
'STORAGE_STORAGE_OCIS_ROOT': '/srv/app/tmp/ocis/storage/users',
|
||||
'STORAGE_STORAGE_LOCAL_ROOT': '/srv/app/tmp/ocis/reva/root',
|
||||
'STORAGE_STORAGE_OWNCLOUD_DATADIR': '/srv/app/tmp/ocis/owncloud/data',
|
||||
'STORAGE_STORAGE_OC_DATA_TEMP_FOLDER': '/srv/app/tmp/',
|
||||
'STORAGE_STORAGE_OWNCLOUD_REDIS_ADDR': 'redis:6379',
|
||||
'STORAGE_OIDC_ISSUER': 'https://ocis-server:9200',
|
||||
'STORAGE_LDAP_IDP': 'https://ocis-server:9200',
|
||||
'PROXY_OIDC_ISSUER': 'https://ocis-server:9200',
|
||||
'STORAGE_STORAGE_OC_DATA_SERVER_URL': 'http://ocis-server:9164/data',
|
||||
'STORAGE_DATAGATEWAY_URL': 'https://ocis-server:9200/data',
|
||||
'STORAGE_FRONTEND_URL': 'https://ocis-server:9200',
|
||||
'STORAGE_HOME_EXPOSE_DATA_SERVER': 'true',
|
||||
'STORAGE_HOME_DATA_SERVER_URL': 'http://ocis-server:9155/data',
|
||||
'STORAGE_DATAGATEWAY_PUBLIC_URL': 'https://ocis-server:9200/data',
|
||||
'STORAGE_FRONTEND_PUBLIC_URL': 'https://ocis-server:9200',
|
||||
'PHOENIX_WEB_CONFIG': '/drone/src/accounts/ui/tests/config/drone/ocis-config.json',
|
||||
'KONNECTD_IDENTIFIER_REGISTRATION_CONF': '/drone/src/accounts/ui/tests/config/drone/identifier-registration.yml',
|
||||
'KONNECTD_ISS': 'https://ocis-server:9200',
|
||||
@@ -1407,22 +1401,20 @@ def ocisServer(storage):
|
||||
'detach': True,
|
||||
'environment' : {
|
||||
#'OCIS_LOG_LEVEL': 'debug',
|
||||
'STORAGE_STORAGE_HOME_DRIVER': '%s' % (storage),
|
||||
'STORAGE_STORAGE_HOME_DATA_DRIVER': '%s' % (storage),
|
||||
'STORAGE_STORAGE_OC_DRIVER': '%s' % (storage),
|
||||
'STORAGE_STORAGE_OC_DATA_DRIVER': '%s' % (storage),
|
||||
'STORAGE_STORAGE_HOME_DATA_TEMP_FOLDER': '/srv/app/tmp/',
|
||||
'STORAGE_HOME_DRIVER': '%s' % (storage),
|
||||
'STORAGE_USERS_DRIVER': '%s' % (storage),
|
||||
'STORAGE_STORAGE_OCIS_ROOT': '/srv/app/tmp/ocis/storage/users',
|
||||
'STORAGE_STORAGE_LOCAL_ROOT': '/srv/app/tmp/ocis/local/root',
|
||||
'STORAGE_STORAGE_OWNCLOUD_DATADIR': '/srv/app/tmp/ocis/owncloud/data',
|
||||
'STORAGE_STORAGE_OC_DATA_TEMP_FOLDER': '/srv/app/tmp/',
|
||||
'STORAGE_METADATA_ROOT': '/srv/app/tmp/ocis/metadata',
|
||||
'STORAGE_STORAGE_OWNCLOUD_REDIS_ADDR': 'redis:6379',
|
||||
'STORAGE_LDAP_IDP': 'https://ocis-server:9200',
|
||||
'STORAGE_OIDC_ISSUER': 'https://ocis-server:9200',
|
||||
'PROXY_OIDC_ISSUER': 'https://ocis-server:9200',
|
||||
'STORAGE_STORAGE_OC_DATA_SERVER_URL': 'http://ocis-server:9164/data',
|
||||
'STORAGE_DATAGATEWAY_URL': 'https://ocis-server:9200/data',
|
||||
'STORAGE_FRONTEND_URL': 'https://ocis-server:9200',
|
||||
'STORAGE_HOME_DATA_SERVER_URL': 'http://ocis-server:9155/data',
|
||||
'STORAGE_DATAGATEWAY_PUBLIC_URL': 'https://ocis-server:9200/data',
|
||||
'STORAGE_USERS_DATA_SERVER_URL': 'http://ocis-server:9158/data',
|
||||
'STORAGE_FRONTEND_PUBLIC_URL': 'https://ocis-server:9200',
|
||||
'PHOENIX_WEB_CONFIG': '/drone/src/ocis/tests/config/drone/ocis-config.json',
|
||||
'KONNECTD_IDENTIFIER_REGISTRATION_CONF': '/drone/src/ocis/tests/config/drone/identifier-registration.yml',
|
||||
'KONNECTD_ISS': 'https://ocis-server:9200',
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
* Enhancement - Add glauth fallback backend: [#649](https://github.com/owncloud/ocis/pull/649)
|
||||
* Enhancement - Launch a storage to store ocis-metadata: [#602](https://github.com/owncloud/ocis/pull/602)
|
||||
* Enhancement - Simplify tracing config: [#92](https://github.com/owncloud/product/issues/92)
|
||||
* Enhancement - Update reva to dd3a8c0f38: [#725](https://github.com/owncloud/ocis/pull/725)
|
||||
|
||||
## Details
|
||||
|
||||
@@ -1279,3 +1280,10 @@
|
||||
https://github.com/owncloud/product/issues/92
|
||||
https://github.com/owncloud/ocis/pull/329
|
||||
https://github.com/owncloud/ocis/pull/409
|
||||
|
||||
* Enhancement - Update reva to dd3a8c0f38: [#725](https://github.com/owncloud/ocis/pull/725)
|
||||
|
||||
* fixes etag propagation in the ocis driver
|
||||
|
||||
https://github.com/owncloud/ocis/pull/725
|
||||
https://github.com/cs3org/reva/pull/1264
|
||||
|
||||
@@ -218,12 +218,11 @@ func (r CS3Repo) DeleteGroup(ctx context.Context, id string) (err error) {
|
||||
|
||||
func (r CS3Repo) authenticate(ctx context.Context) (token string, err error) {
|
||||
u := &user.User{
|
||||
Id: &user.UserId{},
|
||||
Id: &user.UserId{
|
||||
OpaqueId: r.cfg.ServiceUser.UUID,
|
||||
},
|
||||
Groups: []string{},
|
||||
}
|
||||
if r.cfg.ServiceUser.Username != "" {
|
||||
u.Id.OpaqueId = r.cfg.ServiceUser.UUID
|
||||
}
|
||||
return r.tm.MintToken(ctx, u)
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
Enhancement: Update reva to dd3a8c0f38
|
||||
|
||||
* fixes etag propagation in the ocis driver
|
||||
|
||||
https://github.com/owncloud/ocis/pull/725
|
||||
https://github.com/cs3org/reva/pull/1264
|
||||
@@ -26,20 +26,12 @@ It uses the port range 9140-9179 to preconfigure several services.
|
||||
| 9149 | authbearer debug |
|
||||
| 9150 | sharing |
|
||||
| 9151 | sharing debug |
|
||||
| 9152 | storage root |
|
||||
| 9153 | storage root debug |
|
||||
| 9154 | storage home |
|
||||
| 9155 | storage home debug |
|
||||
| 9156 | storage home data |
|
||||
| 9157 | storage home data debug |
|
||||
| 9158 | storage eos |
|
||||
| 9159 | storage eos debug |
|
||||
| 9160 | storage eos data |
|
||||
| 9161 | storage eos data debug |
|
||||
| 9162 | storage oc |
|
||||
| 9163 | storage oc debug |
|
||||
| 9164 | storage oc data |
|
||||
| 9165 | storage oc data debug |
|
||||
| 9155 | storage home data |
|
||||
| 9156 | storage home debug |
|
||||
| 9157 | storage users |
|
||||
| 9158 | storage users data |
|
||||
| 9159 | storage users debug |
|
||||
| 9166-9177 | reserved for s3, wnd, custom + data providers |
|
||||
| 9178 | storage public link |
|
||||
| 9179 | storage public link data |
|
||||
| 9179 | storage public link debug |
|
||||
|
||||
+12
-23
@@ -32,7 +32,6 @@ contrib.go.opencensus.io/exporter/ocagent v0.7.0/go.mod h1:IshRmMJBhDfFj5Y67nVhM
|
||||
contrib.go.opencensus.io/exporter/prometheus v0.1.0/go.mod h1:cGFniUXGZlKRjzOyuZJ6mgB+PgBcCIa79kEKR8YCW+A=
|
||||
contrib.go.opencensus.io/exporter/prometheus v0.2.0 h1:9PUk0/8V0LGoPqVCrf8fQZJkFGBxudu8jOjQSMwoD6w=
|
||||
contrib.go.opencensus.io/exporter/prometheus v0.2.0/go.mod h1:TYmVAyE8Tn1lyPcltF5IYYfWp2KHu7lQGIZnj8iZMys=
|
||||
contrib.go.opencensus.io/exporter/zipkin v0.1.1 h1:PR+1zWqY8ceXs1qDQQIlgXe+sdiwCf0n32bH4+Epk8g=
|
||||
contrib.go.opencensus.io/exporter/zipkin v0.1.1/go.mod h1:GMvdSl3eJ2gapOaLKzTKE3qDgUkJ86k9k3yY2eqwkzc=
|
||||
contrib.go.opencensus.io/exporter/zipkin v0.1.2 h1:YqE293IZrKtqPnpwDPH/lOqTWD/s3Iwabycam74JV3g=
|
||||
contrib.go.opencensus.io/exporter/zipkin v0.1.2/go.mod h1:mP5xM3rrgOjpn79MM8fZbj3gsxcuytSqtH0dxSWW1RE=
|
||||
@@ -116,7 +115,6 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd
|
||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
|
||||
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
|
||||
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
|
||||
github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 h1:zV3ejI06GQ59hwDQAvmK1qxOQGB3WuVTRoY0okPTAv0=
|
||||
github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg=
|
||||
github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 h1:4daAzAu0S6Vi7/lbWECcX0j45yZReDZ56BQsrVBOEEY=
|
||||
github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg=
|
||||
@@ -127,11 +125,9 @@ github.com/aws/aws-sdk-go v1.23.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
|
||||
github.com/aws/aws-sdk-go v1.23.19/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
||||
github.com/aws/aws-sdk-go v1.28.2/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
||||
github.com/aws/aws-sdk-go v1.33.19/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
|
||||
github.com/aws/aws-sdk-go v1.34.2 h1:9vCknCdTAmmV4ht7lPuda7aJXzllXwEQyCMZKJHjBrM=
|
||||
github.com/aws/aws-sdk-go v1.34.2/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
|
||||
github.com/aws/aws-sdk-go v1.34.12 h1:7UbBEYDUa4uW0YmRnOd806MS1yoJMcaodBWDzvBShAI=
|
||||
github.com/aws/aws-sdk-go v1.34.12/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
|
||||
github.com/aws/aws-sdk-go v1.35.9 h1:b1HiUpdkFLJyoOQ7zas36YHzjNHH0ivHx/G5lWBeg+U=
|
||||
github.com/aws/aws-sdk-go v1.35.0 h1:Pxqn1MWNfBCNcX7jrXCCTfsKpg5ms2IMUMmmcGtYJuo=
|
||||
github.com/aws/aws-sdk-go v1.35.0/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48=
|
||||
github.com/aws/aws-sdk-go v1.35.9/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k=
|
||||
github.com/aws/aws-xray-sdk-go v0.9.4/go.mod h1:XtMKdBQfpVut+tJEwI7+dJFRxxRdxHDyVNp2tHXRq04=
|
||||
github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc=
|
||||
@@ -271,14 +267,13 @@ github.com/cs3org/go-cs3apis v0.0.0-20200929101248-821df597ec8d h1:YDnGz3eTIYQDX
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20200929101248-821df597ec8d/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
|
||||
github.com/cs3org/reva v0.0.2-0.20200115110931-4c7513415ec5/go.mod h1:Hk3eCcdhtv4eIhKvRK736fQuOyS1HuHnUcz0Dq6NK1A=
|
||||
github.com/cs3org/reva v1.1.0/go.mod h1:fBzTrNuAKdQ62ybjpdu8nyhBin90/3/3s6DGQDCdBp4=
|
||||
github.com/cs3org/reva v1.2.1-0.20200826162318-c0f54e1f37ea h1:xVyJvR+GoaBrRJV6GnDflgm9bzkmjchCBBg0nMiHu6M=
|
||||
github.com/cs3org/reva v1.2.1-0.20200826162318-c0f54e1f37ea/go.mod h1:FvYB+UPpuPCw0hH42qHVR1R2atZyy69METZI/zEaST8=
|
||||
github.com/cs3org/reva v1.2.2-0.20200924071957-e6676516e61e h1:khITGSnfDXtByQsLezoXgocUgGHJBBn0BPsUihGvk7w=
|
||||
github.com/cs3org/reva v1.2.2-0.20200924071957-e6676516e61e/go.mod h1:DOV5SjpOBKN+aWfOHLdA4KiLQkpyC786PQaXEdRAZ0M=
|
||||
github.com/cs3org/reva v1.3.1-0.20201020152305-05ab93ed7a66 h1:RI/prn0/25zv1UCXB8FPp3VY+oIRz7kKGHT2wultvUw=
|
||||
github.com/cs3org/reva v1.3.1-0.20201020152305-05ab93ed7a66/go.mod h1:rTJhfVoZggB5iSPH5oWqQSO+W1iTQIxNmaX/ueS9GAU=
|
||||
github.com/cs3org/reva v1.3.1-0.20201021065855-dc400f81ecbc h1:8y6N/bscmzdXd4yAv6bIJiqggter8iEmb4cYMhuZkE8=
|
||||
github.com/cs3org/reva v1.2.2-0.20201006093611-4a9be347ac29 h1:bGdr8WQI3khh8/Uo7icnWOvIyGxnGUVvSSLvtEliuIE=
|
||||
github.com/cs3org/reva v1.2.2-0.20201006093611-4a9be347ac29/go.mod h1:c0MYy0goE5OGC8WPb5LLMZtCqymwSk2fiKVQANzy0zg=
|
||||
github.com/cs3org/reva v1.2.2-0.20201007135248-bccddc4b5a48 h1:ICRTh96BemJ+oOSgp8j4EM32Ye10jh+UWjMxKbVr30g=
|
||||
github.com/cs3org/reva v1.2.2-0.20201007135248-bccddc4b5a48/go.mod h1:A4Q/nQ8Vs+HeAduSFnM37fqxEM3uXVxhaHrNL+gWcBY=
|
||||
github.com/cs3org/reva v1.3.1-0.20201021065855-dc400f81ecbc/go.mod h1:rTJhfVoZggB5iSPH5oWqQSO+W1iTQIxNmaX/ueS9GAU=
|
||||
github.com/cs3org/reva v1.3.1-0.20201021130722-dd3a8c0f3881/go.mod h1:NplJavkhPZvy8/9K9m95g6uddq3pATO62bovvevpsBw=
|
||||
github.com/cznic/b v0.0.0-20181122101859-a26611c4d92d h1:SwD98825d6bdB+pEuTxWOXiSjBrHdOl/UVp75eI7JT8=
|
||||
github.com/cznic/b v0.0.0-20181122101859-a26611c4d92d/go.mod h1:URriBxXwVq5ijiJ12C7iIZqlA69nTlI+LgI6/pwftG8=
|
||||
github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 h1:iwZdTE0PVqJCos1vaoKsclOGD3ADKpshg3SRtYBbwso=
|
||||
@@ -398,7 +393,6 @@ github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2
|
||||
github.com/go-ldap/ldap/v3 v3.1.7/go.mod h1:5Zun81jBTabRaI8lzN7E1JjyEl1g6zI6u9pd8luAK4Q=
|
||||
github.com/go-ldap/ldap/v3 v3.2.3 h1:FBt+5w3q/vPVPb4eYMQSn+pOiz4zewPamYhlGMmc7yM=
|
||||
github.com/go-ldap/ldap/v3 v3.2.3/go.mod h1:iYS1MdmrmceOJ1QOTnRXrIs7i3kloqtmGQjRvjKpyMg=
|
||||
github.com/go-ldap/ldap/v3 v3.2.4 h1:PFavAq2xTgzo/loE8qNXcQaofAaqIpI4WgaLdv+1l3E=
|
||||
github.com/go-ldap/ldap/v3 v3.2.4/go.mod h1:iYS1MdmrmceOJ1QOTnRXrIs7i3kloqtmGQjRvjKpyMg=
|
||||
github.com/go-log/log v0.1.0/go.mod h1:4mBwpdRMFLiuXZDCwU2lKQFsoSCo72j3HqBK9d81N2M=
|
||||
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
||||
@@ -642,7 +636,6 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq
|
||||
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
|
||||
github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=
|
||||
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
|
||||
@@ -756,8 +749,6 @@ github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq
|
||||
github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw=
|
||||
github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
|
||||
github.com/iancoleman/strcase v0.0.0-20180726023541-3605ed457bf7/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE=
|
||||
github.com/iancoleman/strcase v0.1.2 h1:gnomlvw9tnV3ITTAxzKSgTF+8kFWcU/f+TgttpXGz1U=
|
||||
github.com/iancoleman/strcase v0.1.2/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df/go.mod h1:QMZY7/J/KSQEhKWFeDesPjMj+wCHReeknARU3wqlyN4=
|
||||
github.com/ijc/Gotty v0.0.0-20170406111628-a8b993ba6abd/go.mod h1:3LVOLeyx9XVvwPgrt2be44XgSqndprz1G18rSk8KD84=
|
||||
@@ -777,10 +768,10 @@ github.com/jedib0t/go-pretty v4.3.0+incompatible/go.mod h1:XemHduiw8R651AF9Pt4Fw
|
||||
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||
github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a/go.mod h1:yL958EeXv8Ylng6IfnvG4oflryUi3vgA3xPs9hmII1s=
|
||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||
github.com/jmespath/go-jmespath v0.3.0 h1:OS12ieG61fsCg5+qLJ+SsW9NicxNkg3b25OyT2yCeUc=
|
||||
github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik=
|
||||
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
|
||||
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
|
||||
github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
|
||||
github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
|
||||
github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U=
|
||||
github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ=
|
||||
@@ -884,8 +875,8 @@ github.com/marten-seemann/qtls v0.3.2/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwm
|
||||
github.com/marten-seemann/qtls v0.4.1/go.mod h1:pxVXcHHw1pNIt8Qo0pwSYQEoZ8yYOOPXTCZLQQunvRc=
|
||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA=
|
||||
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
github.com/mattn/go-colorable v0.1.7 h1:bQGKb3vps/j0E9GfJQ03JyhRuxsvdAanXlT9BTw3mdw=
|
||||
github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
@@ -1072,10 +1063,10 @@ github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnh
|
||||
github.com/ory/fosite v0.29.0/go.mod h1:0atSZmXO7CAcs6NPMI/Qtot8tmZYj04Nddoold4S2h0=
|
||||
github.com/ory/fosite v0.30.2/go.mod h1:Lq9qQ9Sl6mcea2Tt8J7PU+wUeFYPZ+vg7N3zPVKGbN8=
|
||||
github.com/ory/fosite v0.32.2/go.mod h1:UeBhRgW6nAjTcd8S7kAo0IFsY/rTPyOXPq/t8N20Q8I=
|
||||
github.com/ory/fosite v0.33.0 h1:tK+3Luazv4vIBJY3uagOBryAQ3IG3cs6kfo8piGBhAY=
|
||||
github.com/ory/fosite v0.33.0/go.mod h1:h+ize9gk0GvRyGjabriqSEmTkMhny+O95cijb8DVqPE=
|
||||
github.com/ory/fosite v0.35.0 h1:ugOMHhlcfAjBmIwLOVCK0LQMnYMP/8J/reb2+VEHrfg=
|
||||
github.com/ory/fosite v0.34.0 h1:lCUX4f5BoiXBIRUYKeTne+aRl0v6StgWpyYKq+7ILw0=
|
||||
github.com/ory/fosite v0.34.0/go.mod h1:h+ize9gk0GvRyGjabriqSEmTkMhny+O95cijb8DVqPE=
|
||||
github.com/ory/fosite v0.35.0/go.mod h1:h+ize9gk0GvRyGjabriqSEmTkMhny+O95cijb8DVqPE=
|
||||
github.com/ory/fosite v0.35.1/go.mod h1:h+ize9gk0GvRyGjabriqSEmTkMhny+O95cijb8DVqPE=
|
||||
github.com/ory/go-acc v0.0.0-20181118080137-ddc355013f90/go.mod h1:sxnvPCxChFuSmTJGj8FdMupeq1BezCiEpDjTUXQ4hf4=
|
||||
github.com/ory/go-acc v0.2.1/go.mod h1:0omgy2aa3nDBJ45VAKeLHH8ccPBudxLeic4xiDRtug0=
|
||||
github.com/ory/go-acc v0.2.5 h1:31irXHzG2vnKQSE4weJm7AdfrnpaVjVCq3nD7viXCJE=
|
||||
@@ -1394,7 +1385,6 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.4 h1:LYy1Hy3MJdrCdMwwzxA/dRok4ejH+RwNGbuoD9fCjto=
|
||||
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.5 h1:dntmOdLpSpHlVqbW5Eay97DelsZHe+55D+xC6i0dDS0=
|
||||
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
|
||||
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
@@ -1641,7 +1631,6 @@ golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200720211630-cb9d2d5c5666 h1:gVCS+QOncANNPlmlO1AhlU3oxs4V9z+gTtPwIk3p2N8=
|
||||
golang.org/x/sys v0.0.0-20200720211630-cb9d2d5c5666/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200918174421-af09f7315aff h1:1CPUrky56AcgSpxz/KfgzQWzfG09u5YOL8MvPYBlrL8=
|
||||
|
||||
@@ -4,22 +4,22 @@ package command
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/owncloud/ocis/storage/pkg/command"
|
||||
svcconfig "github.com/owncloud/ocis/storage/pkg/config"
|
||||
"github.com/owncloud/ocis/storage/pkg/flagset"
|
||||
"github.com/owncloud/ocis/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
)
|
||||
|
||||
// StorageStorageHomeCommand is the entrypoint for the reva-storage-home command.
|
||||
func StorageStorageHomeCommand(cfg *config.Config) *cli.Command {
|
||||
// StorageHomeCommand is the entrypoint for the storage-home command.
|
||||
func StorageHomeCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "storage-storage-home",
|
||||
Usage: "Start storage storage service for home mount",
|
||||
Name: "storage-home",
|
||||
Usage: "Start storage and data provider for /home mount",
|
||||
Category: "Extensions",
|
||||
Flags: flagset.StorageHomeWithConfig(cfg.Storage),
|
||||
Action: func(c *cli.Context) error {
|
||||
scfg := configureStorageStorageHome(cfg)
|
||||
scfg := configureStorageHome(cfg)
|
||||
|
||||
return cli.HandleAction(
|
||||
command.StorageHome(scfg).Action,
|
||||
@@ -29,7 +29,7 @@ func StorageStorageHomeCommand(cfg *config.Config) *cli.Command {
|
||||
}
|
||||
}
|
||||
|
||||
func configureStorageStorageHome(cfg *config.Config) *svcconfig.Config {
|
||||
func configureStorageHome(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Storage.Log.Level = cfg.Log.Level
|
||||
cfg.Storage.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Storage.Log.Color = cfg.Log.Color
|
||||
@@ -46,5 +46,5 @@ func configureStorageStorageHome(cfg *config.Config) *svcconfig.Config {
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(StorageStorageHomeCommand)
|
||||
register.AddCommand(StorageHomeCommand)
|
||||
}
|
||||
@@ -2,22 +2,22 @@ package command
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/owncloud/ocis/storage/pkg/command"
|
||||
svcconfig "github.com/owncloud/ocis/storage/pkg/config"
|
||||
"github.com/owncloud/ocis/storage/pkg/flagset"
|
||||
"github.com/owncloud/ocis/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
)
|
||||
|
||||
// StorageStorageMetadataCommand is the entrypoint for the reva-storage-metadata command.
|
||||
func StorageStorageMetadataCommand(cfg *config.Config) *cli.Command {
|
||||
// StorageMetadataCommand is the entrypoint for the storage-metadata command.
|
||||
func StorageMetadataCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "storage-storage-metadata",
|
||||
Usage: "Start storage storage service for metadata mount",
|
||||
Name: "storage-metadata",
|
||||
Usage: "Start storage and data service for metadata",
|
||||
Category: "Extensions",
|
||||
Flags: flagset.StorageMetadata(cfg.Storage),
|
||||
Action: func(c *cli.Context) error {
|
||||
revaStorageMetadataCommand := command.StorageMetadata(configureStorageStorageMetadata(cfg))
|
||||
revaStorageMetadataCommand := command.StorageMetadata(configureStorageMetadata(cfg))
|
||||
|
||||
if err := revaStorageMetadataCommand.Before(c); err != nil {
|
||||
return err
|
||||
@@ -28,7 +28,7 @@ func StorageStorageMetadataCommand(cfg *config.Config) *cli.Command {
|
||||
}
|
||||
}
|
||||
|
||||
func configureStorageStorageMetadata(cfg *config.Config) *svcconfig.Config {
|
||||
func configureStorageMetadata(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Storage.Log.Level = cfg.Log.Level
|
||||
cfg.Storage.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Storage.Log.Color = cfg.Log.Color
|
||||
@@ -45,5 +45,5 @@ func configureStorageStorageMetadata(cfg *config.Config) *svcconfig.Config {
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(StorageStorageMetadataCommand)
|
||||
register.AddCommand(StorageMetadataCommand)
|
||||
}
|
||||
+8
-8
@@ -4,22 +4,22 @@ package command
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/owncloud/ocis/storage/pkg/command"
|
||||
svcconfig "github.com/owncloud/ocis/storage/pkg/config"
|
||||
"github.com/owncloud/ocis/storage/pkg/flagset"
|
||||
"github.com/owncloud/ocis/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
)
|
||||
|
||||
// StorageStoragePublicLinkCommand is the entrypoint for the reva-storage-oc command.
|
||||
func StorageStoragePublicLinkCommand(cfg *config.Config) *cli.Command {
|
||||
// StoragePublicLinkCommand is the entrypoint for the reva-storage-oc command.
|
||||
func StoragePublicLinkCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "storage-storage-public-link",
|
||||
Name: "storage-public-link",
|
||||
Usage: "Start storage public link storage",
|
||||
Category: "Extensions",
|
||||
Flags: flagset.StoragePublicLink(cfg.Storage),
|
||||
Action: func(c *cli.Context) error {
|
||||
scfg := configureStorageStoragePublicLink(cfg)
|
||||
scfg := configureStoragePublicLink(cfg)
|
||||
|
||||
return cli.HandleAction(
|
||||
command.StoragePublicLink(scfg).Action,
|
||||
@@ -29,7 +29,7 @@ func StorageStoragePublicLinkCommand(cfg *config.Config) *cli.Command {
|
||||
}
|
||||
}
|
||||
|
||||
func configureStorageStoragePublicLink(cfg *config.Config) *svcconfig.Config {
|
||||
func configureStoragePublicLink(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Storage.Log.Level = cfg.Log.Level
|
||||
cfg.Storage.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Storage.Log.Color = cfg.Log.Color
|
||||
@@ -46,5 +46,5 @@ func configureStorageStoragePublicLink(cfg *config.Config) *svcconfig.Config {
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(StorageStoragePublicLinkCommand)
|
||||
register.AddCommand(StoragePublicLinkCommand)
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/owncloud/ocis/storage/pkg/command"
|
||||
svcconfig "github.com/owncloud/ocis/storage/pkg/config"
|
||||
"github.com/owncloud/ocis/storage/pkg/flagset"
|
||||
)
|
||||
|
||||
// StorageStorageEOSCommand is the entrypoint for the reva-storage-oc command.
|
||||
func StorageStorageEOSCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "storage-storage-eos",
|
||||
Usage: "Start storage storage service for eos mount",
|
||||
Category: "Extensions",
|
||||
Flags: flagset.StorageEOSWithConfig(cfg.Storage),
|
||||
Action: func(c *cli.Context) error {
|
||||
scfg := configureStorageStorageEOS(cfg)
|
||||
|
||||
return cli.HandleAction(
|
||||
command.StorageEOS(scfg).Action,
|
||||
c,
|
||||
)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func configureStorageStorageEOS(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Storage.Log.Level = cfg.Log.Level
|
||||
cfg.Storage.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Storage.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Storage.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Storage.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Storage.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.Storage
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(StorageStorageEOSCommand)
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/storage/pkg/command"
|
||||
svcconfig "github.com/owncloud/ocis/storage/pkg/config"
|
||||
"github.com/owncloud/ocis/storage/pkg/flagset"
|
||||
"github.com/owncloud/ocis/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
)
|
||||
|
||||
// StorageStorageEOSDataCommand is the entrypoint for the reva-storage-eos-data command.
|
||||
func StorageStorageEOSDataCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "storage-storage-eos-data",
|
||||
Usage: "Start storage storage data provider for eos mount",
|
||||
Category: "Extensions",
|
||||
Flags: flagset.StorageEOSDataWithConfig(cfg.Storage),
|
||||
Action: func(c *cli.Context) error {
|
||||
scfg := configureStorageStorageEOSData(cfg)
|
||||
|
||||
return cli.HandleAction(
|
||||
command.StorageEOSData(scfg).Action,
|
||||
c,
|
||||
)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func configureStorageStorageEOSData(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Storage.Log.Level = cfg.Log.Level
|
||||
cfg.Storage.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Storage.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Storage.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Storage.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Storage.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.Storage
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(StorageStorageEOSDataCommand)
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/storage/pkg/command"
|
||||
svcconfig "github.com/owncloud/ocis/storage/pkg/config"
|
||||
"github.com/owncloud/ocis/storage/pkg/flagset"
|
||||
"github.com/owncloud/ocis/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
)
|
||||
|
||||
// StorageStorageHomeDataCommand is the entrypoint for the reva-storage-home-data command.
|
||||
func StorageStorageHomeDataCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "storage-storage-home-data",
|
||||
Usage: "Start storage storage data provider for home mount",
|
||||
Category: "Extensions",
|
||||
Flags: flagset.StorageHomeDataWithConfig(cfg.Storage),
|
||||
Action: func(c *cli.Context) error {
|
||||
scfg := configureStorageStorageHomeData(cfg)
|
||||
|
||||
return cli.HandleAction(
|
||||
command.StorageHomeData(scfg).Action,
|
||||
c,
|
||||
)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func configureStorageStorageHomeData(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Storage.Log.Level = cfg.Log.Level
|
||||
cfg.Storage.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Storage.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Storage.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Storage.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Storage.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.Storage
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(StorageStorageHomeDataCommand)
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/storage/pkg/command"
|
||||
svcconfig "github.com/owncloud/ocis/storage/pkg/config"
|
||||
"github.com/owncloud/ocis/storage/pkg/flagset"
|
||||
"github.com/owncloud/ocis/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
)
|
||||
|
||||
// StorageStorageOCCommand is the entrypoint for the reva-storage-oc command.
|
||||
func StorageStorageOCCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "storage-storage-oc",
|
||||
Usage: "Start storage storage service for oc mount",
|
||||
Category: "Extensions",
|
||||
Flags: flagset.StorageOCWithConfig(cfg.Storage),
|
||||
Action: func(c *cli.Context) error {
|
||||
scfg := configureStorageStorageOC(cfg)
|
||||
|
||||
return cli.HandleAction(
|
||||
command.StorageOC(scfg).Action,
|
||||
c,
|
||||
)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func configureStorageStorageOC(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Storage.Log.Level = cfg.Log.Level
|
||||
cfg.Storage.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Storage.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Storage.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Storage.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Storage.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.Storage
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(StorageStorageOCCommand)
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
// +build !simple
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/storage/pkg/command"
|
||||
svcconfig "github.com/owncloud/ocis/storage/pkg/config"
|
||||
"github.com/owncloud/ocis/storage/pkg/flagset"
|
||||
"github.com/owncloud/ocis/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
)
|
||||
|
||||
// StorageStorageOCDataCommand is the entrypoint for the reva-storage-oc-data command.
|
||||
func StorageStorageOCDataCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "storage-storage-oc-data",
|
||||
Usage: "Start storage storage data provider for oc mount",
|
||||
Category: "Extensions",
|
||||
Flags: flagset.StorageOCDataWithConfig(cfg.Storage),
|
||||
Action: func(c *cli.Context) error {
|
||||
scfg := configureStorageStorageOCData(cfg)
|
||||
|
||||
return cli.HandleAction(
|
||||
command.StorageOCData(scfg).Action,
|
||||
c,
|
||||
)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func configureStorageStorageOCData(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Storage.Log.Level = cfg.Log.Level
|
||||
cfg.Storage.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Storage.Log.Color = cfg.Log.Color
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled
|
||||
cfg.Storage.Tracing.Type = cfg.Tracing.Type
|
||||
cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint
|
||||
cfg.Storage.Tracing.Collector = cfg.Tracing.Collector
|
||||
cfg.Storage.Tracing.Service = cfg.Tracing.Service
|
||||
}
|
||||
|
||||
return cfg.Storage
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(StorageStorageOCDataCommand)
|
||||
}
|
||||
@@ -4,32 +4,32 @@ package command
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/owncloud/ocis/storage/pkg/command"
|
||||
svcconfig "github.com/owncloud/ocis/storage/pkg/config"
|
||||
"github.com/owncloud/ocis/storage/pkg/flagset"
|
||||
"github.com/owncloud/ocis/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
)
|
||||
|
||||
// StorageStorageRootCommand is the entrypoint for the reva-storage-root command.
|
||||
func StorageStorageRootCommand(cfg *config.Config) *cli.Command {
|
||||
// StorageUserProviderCommand is the entrypoint for the storage-userprovider command.
|
||||
func StorageUserProviderCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "storage-storage-root",
|
||||
Usage: "Start storage root storage",
|
||||
Name: "storage-userprovider",
|
||||
Usage: "Start storage userprovider service",
|
||||
Category: "Extensions",
|
||||
Flags: flagset.StorageRootWithConfig(cfg.Storage),
|
||||
Flags: flagset.UsersWithConfig(cfg.Storage),
|
||||
Action: func(c *cli.Context) error {
|
||||
scfg := configureStorageStorageRoot(cfg)
|
||||
scfg := configureStorageUserProvider(cfg)
|
||||
|
||||
return cli.HandleAction(
|
||||
command.StorageRoot(scfg).Action,
|
||||
command.Users(scfg).Action,
|
||||
c,
|
||||
)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func configureStorageStorageRoot(cfg *config.Config) *svcconfig.Config {
|
||||
func configureStorageUserProvider(cfg *config.Config) *svcconfig.Config {
|
||||
cfg.Storage.Log.Level = cfg.Log.Level
|
||||
cfg.Storage.Log.Pretty = cfg.Log.Pretty
|
||||
cfg.Storage.Log.Color = cfg.Log.Color
|
||||
@@ -46,5 +46,5 @@ func configureStorageStorageRoot(cfg *config.Config) *svcconfig.Config {
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(StorageStorageRootCommand)
|
||||
register.AddCommand(StorageUserProviderCommand)
|
||||
}
|
||||
@@ -4,25 +4,25 @@ package command
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/owncloud/ocis/storage/pkg/command"
|
||||
svcconfig "github.com/owncloud/ocis/storage/pkg/config"
|
||||
"github.com/owncloud/ocis/storage/pkg/flagset"
|
||||
"github.com/owncloud/ocis/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
)
|
||||
|
||||
// StorageUsersCommand is the entrypoint for the reva-users command.
|
||||
// StorageUsersCommand is the entrypoint for the storage-users command.
|
||||
func StorageUsersCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "storage-users",
|
||||
Usage: "Start storage users service",
|
||||
Usage: "Start storage and data provider for /users mount",
|
||||
Category: "Extensions",
|
||||
Flags: flagset.UsersWithConfig(cfg.Storage),
|
||||
Flags: flagset.StorageUsersWithConfig(cfg.Storage),
|
||||
Action: func(c *cli.Context) error {
|
||||
scfg := configureStorageUsers(cfg)
|
||||
|
||||
return cli.HandleAction(
|
||||
command.Users(scfg).Action,
|
||||
command.StorageUsers(scfg).Action,
|
||||
c,
|
||||
)
|
||||
},
|
||||
|
||||
@@ -40,17 +40,13 @@ var (
|
||||
"webdav",
|
||||
"storage-frontend",
|
||||
"storage-gateway",
|
||||
"storage-users",
|
||||
"storage-userprovider",
|
||||
"storage-auth-basic",
|
||||
"storage-auth-bearer",
|
||||
"storage-storage-home",
|
||||
"storage-storage-home-data",
|
||||
"storage-storage-eos",
|
||||
"storage-storage-eos-data",
|
||||
"storage-storage-oc",
|
||||
"storage-storage-oc-data",
|
||||
"storage-storage-public-link",
|
||||
"storage-storage-metadata",
|
||||
"storage-home",
|
||||
"storage-users",
|
||||
"storage-metadata",
|
||||
"storage-public-link",
|
||||
"glauth",
|
||||
"konnectd",
|
||||
"thumbnails",
|
||||
|
||||
@@ -386,8 +386,6 @@ apiShareManagementBasicToShares/createShareToSharesFolder.feature:498
|
||||
apiShareManagementBasicToShares/createShareToSharesFolder.feature:501
|
||||
apiShareManagementBasicToShares/deleteShareFromShares.feature:28
|
||||
apiShareManagementBasicToShares/deleteShareFromShares.feature:29
|
||||
apiShareManagementBasicToShares/deleteShareFromShares.feature:43
|
||||
apiShareManagementBasicToShares/deleteShareFromShares.feature:44
|
||||
apiShareManagementBasicToShares/deleteShareFromShares.feature:89
|
||||
apiShareManagementBasicToShares/deleteShareFromShares.feature:163
|
||||
apiShareManagementBasicToShares/deleteShareFromShares.feature:164
|
||||
@@ -406,6 +404,12 @@ apiShareManagementBasicToShares/excludeGroupFromReceivingSharesToSharesFolder.fe
|
||||
apiShareManagementBasicToShares/excludeGroupFromReceivingSharesToSharesFolder.feature:153
|
||||
apiShareManagementBasicToShares/excludeGroupFromReceivingSharesToSharesFolder.feature:154
|
||||
#
|
||||
# https://github.com/owncloud/ocis/issues/720 shares are mounted into /Shares folder even after the sharer deletes the collaborator
|
||||
# https://github.com/owncloud/ocis/issues/721 deleting share response does not contain `data` field
|
||||
#
|
||||
apiShareManagementBasicToShares/deleteShareFromShares.feature:43
|
||||
apiShareManagementBasicToShares/deleteShareFromShares.feature:44
|
||||
#
|
||||
# https://github.com/owncloud/product/issues/203 file_target in share response
|
||||
#
|
||||
apiShareManagementBasicToShares/createShareToSharesFolder.feature:367
|
||||
@@ -477,6 +481,9 @@ apiShareOperationsToShares/getWebDAVSharePermissions.feature:143
|
||||
apiShareOperationsToShares/gettingShares.feature:167
|
||||
apiShareOperationsToShares/gettingShares.feature:168
|
||||
#
|
||||
apiSharePublicLink1/createPublicLinkShare.feature:793
|
||||
apiSharePublicLink1/createPublicLinkShare.feature:804
|
||||
#
|
||||
# https://github.com/owncloud/product/issues/271 Cannot set mtime on upload
|
||||
#
|
||||
apiSharePublicLink1/createPublicLinkShare.feature:775
|
||||
@@ -1363,11 +1370,11 @@ apiWebdavUpload2/uploadFileToBlacklistedNameUsingNewChunking.feature:50
|
||||
# https://github.com/owncloud/ocis-reva/issues/15 blacklisted filenames like .htaccess & file.parts can be uploaded
|
||||
#
|
||||
apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature:13
|
||||
apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature:20
|
||||
apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature:19
|
||||
apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature:35
|
||||
apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature:36
|
||||
apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature:37
|
||||
apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature:38
|
||||
apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature:39
|
||||
apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature:42
|
||||
apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature:40
|
||||
#
|
||||
# https://github.com/owncloud/ocis-reva/issues/56 remote.php/dav/uploads endpoint does not exist
|
||||
#
|
||||
@@ -1381,11 +1388,11 @@ apiWebdavUpload2/uploadFileToExcludedDirectoryUsingNewChunking.feature:52
|
||||
# https://github.com/owncloud/ocis-reva/issues/15 blacklisted filenames like .htaccess & file.parts can be uploaded
|
||||
#
|
||||
apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:13
|
||||
apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:21
|
||||
apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:20
|
||||
apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:37
|
||||
apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:38
|
||||
apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:39
|
||||
apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:40
|
||||
apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:41
|
||||
apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:44
|
||||
apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:42
|
||||
#
|
||||
# https://github.com/owncloud/ocis-reva/issues/56 remote.php/dav/uploads endpoint does not exist
|
||||
#
|
||||
@@ -1407,16 +1414,16 @@ apiWebdavUpload2/uploadFileUsingNewChunking.feature:158
|
||||
# https://github.com/owncloud/ocis-reva/issues/17 uploading with old-chunking does not work
|
||||
#
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:13
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:26
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:35
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:44
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:25
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:34
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:43
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:75
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:76
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:77
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:96
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:97
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:98
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:99
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:100
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:101
|
||||
#
|
||||
# https://github.com/owncloud/ocis/issues/187 Previews via webDAV API tests fail on OCIS
|
||||
#
|
||||
@@ -1492,21 +1499,6 @@ apiWebdavEtagPropagation1/deleteFileFolder.feature:152
|
||||
apiWebdavEtagPropagation1/deleteFileFolder.feature:182
|
||||
apiWebdavEtagPropagation1/deleteFileFolder.feature:183
|
||||
#
|
||||
# https://github.com/owncloud/product/issues/238 renaming a files does not change etag of containing folder
|
||||
#
|
||||
apiWebdavEtagPropagation1/moveFileFolder.feature:20
|
||||
apiWebdavEtagPropagation1/moveFileFolder.feature:21
|
||||
apiWebdavEtagPropagation1/moveFileFolder.feature:58
|
||||
apiWebdavEtagPropagation1/moveFileFolder.feature:59
|
||||
apiWebdavEtagPropagation1/moveFileFolder.feature:74
|
||||
apiWebdavEtagPropagation1/moveFileFolder.feature:75
|
||||
apiWebdavEtagPropagation1/moveFileFolder.feature:93
|
||||
apiWebdavEtagPropagation1/moveFileFolder.feature:94
|
||||
apiWebdavEtagPropagation1/moveFileFolder.feature:112
|
||||
apiWebdavEtagPropagation1/moveFileFolder.feature:113
|
||||
apiWebdavEtagPropagation1/moveFileFolder.feature:306
|
||||
apiWebdavEtagPropagation1/moveFileFolder.feature:321
|
||||
#
|
||||
# https://github.com/owncloud/product/issues/239 moving a file from one folder to an other does not change the etag of the source folder
|
||||
#
|
||||
apiWebdavEtagPropagation1/moveFileFolder.feature:39
|
||||
@@ -1518,8 +1510,6 @@ apiWebdavEtagPropagation1/moveFileFolder.feature:201
|
||||
apiWebdavEtagPropagation1/moveFileFolder.feature:202
|
||||
apiWebdavEtagPropagation1/moveFileFolder.feature:235
|
||||
apiWebdavEtagPropagation1/moveFileFolder.feature:236
|
||||
apiWebdavEtagPropagation1/moveFileFolder.feature:269
|
||||
apiWebdavEtagPropagation1/moveFileFolder.feature:270
|
||||
apiWebdavEtagPropagation1/moveFileFolder.feature:303
|
||||
apiWebdavEtagPropagation1/moveFileFolder.feature:304
|
||||
#
|
||||
|
||||
@@ -383,8 +383,6 @@ apiShareManagementBasicToShares/createShareToSharesFolder.feature:498
|
||||
apiShareManagementBasicToShares/createShareToSharesFolder.feature:501
|
||||
apiShareManagementBasicToShares/deleteShareFromShares.feature:28
|
||||
apiShareManagementBasicToShares/deleteShareFromShares.feature:29
|
||||
apiShareManagementBasicToShares/deleteShareFromShares.feature:43
|
||||
apiShareManagementBasicToShares/deleteShareFromShares.feature:44
|
||||
apiShareManagementBasicToShares/deleteShareFromShares.feature:89
|
||||
apiShareManagementBasicToShares/deleteShareFromShares.feature:163
|
||||
apiShareManagementBasicToShares/deleteShareFromShares.feature:164
|
||||
@@ -403,6 +401,12 @@ apiShareManagementBasicToShares/excludeGroupFromReceivingSharesToSharesFolder.fe
|
||||
apiShareManagementBasicToShares/excludeGroupFromReceivingSharesToSharesFolder.feature:153
|
||||
apiShareManagementBasicToShares/excludeGroupFromReceivingSharesToSharesFolder.feature:154
|
||||
#
|
||||
# https://github.com/owncloud/ocis/issues/720 shares are mounted into /Shares folder even after the sharer deletes the collaborator
|
||||
# https://github.com/owncloud/ocis/issues/721 deleting share response does not contain `data` field
|
||||
#
|
||||
apiShareManagementBasicToShares/deleteShareFromShares.feature:43
|
||||
apiShareManagementBasicToShares/deleteShareFromShares.feature:44
|
||||
#
|
||||
# https://github.com/owncloud/product/issues/207 Response is empty when accepting a share
|
||||
#
|
||||
apiShareManagementBasicToShares/createShareToSharesFolder.feature:342
|
||||
@@ -1350,31 +1354,31 @@ apiWebdavUpload2/uploadFileUsingNewChunking.feature:158
|
||||
# https://github.com/owncloud/ocis-reva/issues/15 blacklisted filenames like .htaccess & file.parts can be uploaded
|
||||
#
|
||||
apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature:13
|
||||
apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature:20
|
||||
apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature:19
|
||||
apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature:35
|
||||
apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature:36
|
||||
apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature:37
|
||||
apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature:38
|
||||
apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature:39
|
||||
apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature:42
|
||||
apiWebdavUpload2/uploadFileToBlacklistedNameUsingOldChunking.feature:40
|
||||
apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:13
|
||||
apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:21
|
||||
apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:20
|
||||
apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:37
|
||||
apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:38
|
||||
apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:39
|
||||
apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:40
|
||||
apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:41
|
||||
apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:44
|
||||
apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:42
|
||||
#
|
||||
# https://github.com/owncloud/ocis-reva/issues/17 uploading with old-chunking does not work
|
||||
#
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:13
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:26
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:35
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:44
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:25
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:34
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:43
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:75
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:76
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:77
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:96
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:97
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:98
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:99
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:100
|
||||
apiWebdavUpload2/uploadFileUsingOldChunking.feature:101
|
||||
#
|
||||
# https://github.com/owncloud/ocis/issues/187 Previews via webDAV API tests fail on OCIS
|
||||
#
|
||||
|
||||
+4
-1
@@ -1,7 +1,7 @@
|
||||
@api @files_sharing-app-required @issue-ocis-reva-243
|
||||
Feature: sharing
|
||||
|
||||
@issue-ocis-reva-356
|
||||
@issue-ocis-720 @issue-ocis-721
|
||||
# after fixing all issues delete this Scenario and use the one from oC10 core
|
||||
Scenario Outline: delete a share
|
||||
Given user "Alice" has been created with default attributes and without skeleton files
|
||||
@@ -9,9 +9,12 @@ Feature: sharing
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
And using OCS API version "<ocs_api_version>"
|
||||
And user "Alice" has shared file "textfile0.txt" with user "Brian"
|
||||
And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
|
||||
When user "Alice" deletes the last share using the sharing API
|
||||
Then the OCS status code should be "<ocs_status_code>"
|
||||
And the HTTP status code should be "200"
|
||||
When user "Brian" requests "/remote.php/dav/files" with "PROPFIND" using basic auth
|
||||
Then the HTTP status code should be "500"
|
||||
Examples:
|
||||
| ocs_api_version | ocs_status_code |
|
||||
| 1 | 100 |
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ module github.com/owncloud/ocis/storage
|
||||
go 1.13
|
||||
|
||||
require (
|
||||
github.com/cs3org/reva v1.3.1-0.20201021065855-dc400f81ecbc
|
||||
github.com/cs3org/reva v1.3.1-0.20201021130722-dd3a8c0f3881
|
||||
github.com/gofrs/uuid v3.3.0+incompatible
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e // indirect
|
||||
github.com/micro/cli/v2 v2.1.2
|
||||
|
||||
+14
-2
@@ -106,6 +106,7 @@ github.com/aws/aws-sdk-go v1.23.19/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpi
|
||||
github.com/aws/aws-sdk-go v1.33.19/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
|
||||
github.com/aws/aws-sdk-go v1.34.12 h1:7UbBEYDUa4uW0YmRnOd806MS1yoJMcaodBWDzvBShAI=
|
||||
github.com/aws/aws-sdk-go v1.34.12/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
|
||||
github.com/aws/aws-sdk-go v1.35.0/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48=
|
||||
github.com/aws/aws-sdk-go v1.35.9/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k=
|
||||
github.com/aws/aws-xray-sdk-go v0.9.4/go.mod h1:XtMKdBQfpVut+tJEwI7+dJFRxxRdxHDyVNp2tHXRq04=
|
||||
github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc=
|
||||
@@ -188,10 +189,18 @@ github.com/cs3org/reva v1.2.1-0.20200911111727-51649e37df2d h1:vohUfrOZVrbbzt7JU
|
||||
github.com/cs3org/reva v1.2.1-0.20200911111727-51649e37df2d/go.mod h1:Q1/JB40ZKtlhZUxz+ZqB/O/VlrnQX//NYdPPRPsP0UE=
|
||||
github.com/cs3org/reva v1.2.2-0.20200924071957-e6676516e61e h1:khITGSnfDXtByQsLezoXgocUgGHJBBn0BPsUihGvk7w=
|
||||
github.com/cs3org/reva v1.2.2-0.20200924071957-e6676516e61e/go.mod h1:DOV5SjpOBKN+aWfOHLdA4KiLQkpyC786PQaXEdRAZ0M=
|
||||
github.com/cs3org/reva v1.3.1-0.20201020152305-05ab93ed7a66 h1:RI/prn0/25zv1UCXB8FPp3VY+oIRz7kKGHT2wultvUw=
|
||||
github.com/cs3org/reva v1.3.1-0.20201020152305-05ab93ed7a66/go.mod h1:rTJhfVoZggB5iSPH5oWqQSO+W1iTQIxNmaX/ueS9GAU=
|
||||
github.com/cs3org/reva v1.2.2-0.20201006093611-4a9be347ac29 h1:bGdr8WQI3khh8/Uo7icnWOvIyGxnGUVvSSLvtEliuIE=
|
||||
github.com/cs3org/reva v1.2.2-0.20201006093611-4a9be347ac29/go.mod h1:c0MYy0goE5OGC8WPb5LLMZtCqymwSk2fiKVQANzy0zg=
|
||||
github.com/cs3org/reva v1.2.2-0.20201007135248-bccddc4b5a48 h1:ICRTh96BemJ+oOSgp8j4EM32Ye10jh+UWjMxKbVr30g=
|
||||
github.com/cs3org/reva v1.2.2-0.20201007135248-bccddc4b5a48/go.mod h1:A4Q/nQ8Vs+HeAduSFnM37fqxEM3uXVxhaHrNL+gWcBY=
|
||||
github.com/cs3org/reva v1.3.1-0.20201009145025-fb08084ce5d4 h1:zWu5iNGr6l3IAIbZJaUW4u6qNqb5bznD0DwqfxCUATI=
|
||||
github.com/cs3org/reva v1.3.1-0.20201009145025-fb08084ce5d4/go.mod h1:aZyarc9hwSGDYZXf0ucVS8uk0OUtK2Q5VK/m5ZaULf8=
|
||||
github.com/cs3org/reva v1.3.1-0.20201019131523-e221f0ba5025 h1:Sr7XcVeegD/DD/b2M6tJl4R+J4FNr41guiJ9Ge0Rlss=
|
||||
github.com/cs3org/reva v1.3.1-0.20201019131523-e221f0ba5025/go.mod h1:rTJhfVoZggB5iSPH5oWqQSO+W1iTQIxNmaX/ueS9GAU=
|
||||
github.com/cs3org/reva v1.3.1-0.20201021065855-dc400f81ecbc h1:8y6N/bscmzdXd4yAv6bIJiqggter8iEmb4cYMhuZkE8=
|
||||
github.com/cs3org/reva v1.3.1-0.20201021065855-dc400f81ecbc/go.mod h1:rTJhfVoZggB5iSPH5oWqQSO+W1iTQIxNmaX/ueS9GAU=
|
||||
github.com/cs3org/reva v1.3.1-0.20201021130722-dd3a8c0f3881 h1:xhpamvgyDr0jCtjXZCTk8qOdnslxhz8dHym5KLh7gl8=
|
||||
github.com/cs3org/reva v1.3.1-0.20201021130722-dd3a8c0f3881/go.mod h1:NplJavkhPZvy8/9K9m95g6uddq3pATO62bovvevpsBw=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
@@ -773,7 +782,9 @@ github.com/ory/fosite v0.32.2 h1:iRV495P/9EyoYQ8qEHYxFQeeYCdDFawqjAML+qiMF9s=
|
||||
github.com/ory/fosite v0.32.2/go.mod h1:UeBhRgW6nAjTcd8S7kAo0IFsY/rTPyOXPq/t8N20Q8I=
|
||||
github.com/ory/fosite v0.33.0 h1:tK+3Luazv4vIBJY3uagOBryAQ3IG3cs6kfo8piGBhAY=
|
||||
github.com/ory/fosite v0.33.0/go.mod h1:h+ize9gk0GvRyGjabriqSEmTkMhny+O95cijb8DVqPE=
|
||||
github.com/ory/fosite v0.34.0/go.mod h1:h+ize9gk0GvRyGjabriqSEmTkMhny+O95cijb8DVqPE=
|
||||
github.com/ory/fosite v0.35.0/go.mod h1:h+ize9gk0GvRyGjabriqSEmTkMhny+O95cijb8DVqPE=
|
||||
github.com/ory/fosite v0.35.1/go.mod h1:h+ize9gk0GvRyGjabriqSEmTkMhny+O95cijb8DVqPE=
|
||||
github.com/ory/go-acc v0.0.0-20181118080137-ddc355013f90/go.mod h1:sxnvPCxChFuSmTJGj8FdMupeq1BezCiEpDjTUXQ4hf4=
|
||||
github.com/ory/go-acc v0.2.1 h1:Pwcmwd/cSnwJsYN76+w3HU7oXeWFTkwj/KUj1qGDrVw=
|
||||
github.com/ory/go-acc v0.2.1/go.mod h1:0omgy2aa3nDBJ45VAKeLHH8ccPBudxLeic4xiDRtug0=
|
||||
@@ -1390,6 +1401,7 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji
|
||||
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc v1.32.0 h1:zWTV+LMdc3kaiJMSTOFz2UgSBgx8RNQoTGiZu3fR9S0=
|
||||
google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
|
||||
@@ -73,18 +73,18 @@ func AuthBasic(cfg *config.Config) *cli.Command {
|
||||
|
||||
rcfg := map[string]interface{}{
|
||||
"core": map[string]interface{}{
|
||||
"max_cpus": cfg.Reva.Users.MaxCPUs,
|
||||
"max_cpus": cfg.Reva.AuthBasic.MaxCPUs,
|
||||
"tracing_enabled": cfg.Tracing.Enabled,
|
||||
"tracing_endpoint": cfg.Tracing.Endpoint,
|
||||
"tracing_collector": cfg.Tracing.Collector,
|
||||
"tracing_service_name": "auth-basic",
|
||||
"tracing_service_name": c.Command.Name,
|
||||
},
|
||||
"shared": map[string]interface{}{
|
||||
"jwt_secret": cfg.Reva.JWTSecret,
|
||||
},
|
||||
"grpc": map[string]interface{}{
|
||||
"network": cfg.Reva.AuthBasic.Network,
|
||||
"address": cfg.Reva.AuthBasic.Addr,
|
||||
"network": cfg.Reva.AuthBasic.GRPCNetwork,
|
||||
"address": cfg.Reva.AuthBasic.GRPCAddr,
|
||||
// TODO build services dynamically
|
||||
"services": map[string]interface{}{
|
||||
"authprovider": map[string]interface{}{
|
||||
|
||||
@@ -73,18 +73,18 @@ func AuthBearer(cfg *config.Config) *cli.Command {
|
||||
|
||||
rcfg := map[string]interface{}{
|
||||
"core": map[string]interface{}{
|
||||
"max_cpus": cfg.Reva.Users.MaxCPUs,
|
||||
"max_cpus": cfg.Reva.AuthBearer.MaxCPUs,
|
||||
"tracing_enabled": cfg.Tracing.Enabled,
|
||||
"tracing_endpoint": cfg.Tracing.Endpoint,
|
||||
"tracing_collector": cfg.Tracing.Collector,
|
||||
"tracing_service_name": "auth-bearer",
|
||||
"tracing_service_name": c.Command.Name,
|
||||
},
|
||||
"shared": map[string]interface{}{
|
||||
"jwt_secret": cfg.Reva.JWTSecret,
|
||||
},
|
||||
"grpc": map[string]interface{}{
|
||||
"network": cfg.Reva.AuthBearer.Network,
|
||||
"address": cfg.Reva.AuthBearer.Addr,
|
||||
"network": cfg.Reva.AuthBearer.GRPCNetwork,
|
||||
"address": cfg.Reva.AuthBearer.GRPCAddr,
|
||||
// TODO build services dynamically
|
||||
"services": map[string]interface{}{
|
||||
"authprovider": map[string]interface{}{
|
||||
|
||||
@@ -83,7 +83,7 @@ func drivers(cfg *config.Config) map[string]interface{} {
|
||||
"redis": cfg.Reva.Storages.OwnCloud.Redis,
|
||||
"enable_home": cfg.Reva.Storages.OwnCloud.EnableHome,
|
||||
"scan": cfg.Reva.Storages.OwnCloud.Scan,
|
||||
"userprovidersvc": cfg.Reva.Users.URL,
|
||||
"userprovidersvc": cfg.Reva.Users.Endpoint,
|
||||
},
|
||||
"ocis": map[string]interface{}{
|
||||
"root": cfg.Reva.Storages.Common.Root,
|
||||
@@ -91,6 +91,7 @@ func drivers(cfg *config.Config) map[string]interface{} {
|
||||
"user_layout": cfg.Reva.Storages.Common.UserLayout,
|
||||
"treetime_accounting": true,
|
||||
"treesize_accounting": true,
|
||||
"owner": "95cb8724-03b2-11eb-a0a6-c33ef8ef53ad", // the accounts service system account uuid
|
||||
},
|
||||
"s3": map[string]interface{}{
|
||||
"region": cfg.Reva.Storages.S3.Region,
|
||||
|
||||
@@ -6,7 +6,6 @@ import (
|
||||
"os"
|
||||
"os/signal"
|
||||
"path"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/cs3org/reva/cmd/revad/runtime"
|
||||
@@ -103,15 +102,15 @@ func Frontend(cfg *config.Config) *cli.Command {
|
||||
"tracing_enabled": cfg.Tracing.Enabled,
|
||||
"tracing_endpoint": cfg.Tracing.Endpoint,
|
||||
"tracing_collector": cfg.Tracing.Collector,
|
||||
"tracing_service_name": "frontend",
|
||||
"tracing_service_name": c.Command.Name,
|
||||
},
|
||||
"shared": map[string]interface{}{
|
||||
"jwt_secret": cfg.Reva.JWTSecret,
|
||||
"gatewaysvc": cfg.Reva.Gateway.URL, // Todo or address?
|
||||
"gatewaysvc": cfg.Reva.Gateway.Endpoint, // Todo or address?
|
||||
},
|
||||
"http": map[string]interface{}{
|
||||
"network": cfg.Reva.Frontend.Network,
|
||||
"address": cfg.Reva.Frontend.Addr,
|
||||
"network": cfg.Reva.Frontend.HTTPNetwork,
|
||||
"address": cfg.Reva.Frontend.HTTPAddr,
|
||||
"middlewares": map[string]interface{}{
|
||||
"cors": map[string]interface{}{
|
||||
"allow_credentials": true,
|
||||
@@ -139,7 +138,7 @@ func Frontend(cfg *config.Config) *cli.Command {
|
||||
"config": map[string]interface{}{
|
||||
"version": "1.8",
|
||||
"website": "reva",
|
||||
"host": urlWithScheme(cfg.Reva.Frontend.URL),
|
||||
"host": cfg.Reva.Frontend.PublicURL,
|
||||
"contact": "admin@localhost",
|
||||
"ssl": "false",
|
||||
},
|
||||
@@ -298,13 +297,3 @@ func Frontend(cfg *config.Config) *cli.Command {
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// urlWithScheme checks if the given string is prefixed with "http". If it is not, "http://" will be added as prefix.
|
||||
// As we can't tell if http or https should be the preferred scheme, the correct approach would be to fail on urls
|
||||
// without scheme. As long as we have default urls in our flagsets which don't have a scheme, this is a feasible workaround.
|
||||
func urlWithScheme(str string) string {
|
||||
if !strings.HasPrefix(str, "http") {
|
||||
str = "http://" + str
|
||||
}
|
||||
return str
|
||||
}
|
||||
|
||||
@@ -80,35 +80,35 @@ func Gateway(cfg *config.Config) *cli.Command {
|
||||
"tracing_enabled": cfg.Tracing.Enabled,
|
||||
"tracing_endpoint": cfg.Tracing.Endpoint,
|
||||
"tracing_collector": cfg.Tracing.Collector,
|
||||
"tracing_service_name": "gateway",
|
||||
"tracing_service_name": c.Command.Name,
|
||||
},
|
||||
"shared": map[string]interface{}{
|
||||
"jwt_secret": cfg.Reva.JWTSecret,
|
||||
"gatewaysvc": cfg.Reva.Gateway.URL, // Todo or address?
|
||||
"gatewaysvc": cfg.Reva.Gateway.Endpoint,
|
||||
},
|
||||
"grpc": map[string]interface{}{
|
||||
"network": cfg.Reva.Gateway.Network,
|
||||
"address": cfg.Reva.Gateway.Addr,
|
||||
"network": cfg.Reva.Gateway.GRPCNetwork,
|
||||
"address": cfg.Reva.Gateway.GRPCAddr,
|
||||
// TODO build services dynamically
|
||||
"services": map[string]interface{}{
|
||||
"gateway": map[string]interface{}{
|
||||
// registries is located on the gateway
|
||||
"authregistrysvc": cfg.Reva.Gateway.URL,
|
||||
"storageregistrysvc": cfg.Reva.Gateway.URL,
|
||||
"appregistrysvc": cfg.Reva.Gateway.URL,
|
||||
"authregistrysvc": cfg.Reva.Gateway.Endpoint,
|
||||
"storageregistrysvc": cfg.Reva.Gateway.Endpoint,
|
||||
"appregistrysvc": cfg.Reva.Gateway.Endpoint,
|
||||
// user metadata is located on the users services
|
||||
"preferencessvc": cfg.Reva.Users.URL,
|
||||
"userprovidersvc": cfg.Reva.Users.URL,
|
||||
"preferencessvc": cfg.Reva.Users.Endpoint,
|
||||
"userprovidersvc": cfg.Reva.Users.Endpoint,
|
||||
// sharing is located on the sharing service
|
||||
"usershareprovidersvc": cfg.Reva.Sharing.URL,
|
||||
"publicshareprovidersvc": cfg.Reva.Sharing.URL,
|
||||
"ocmshareprovidersvc": cfg.Reva.Sharing.URL,
|
||||
"usershareprovidersvc": cfg.Reva.Sharing.Endpoint,
|
||||
"publicshareprovidersvc": cfg.Reva.Sharing.Endpoint,
|
||||
"ocmshareprovidersvc": cfg.Reva.Sharing.Endpoint,
|
||||
"commit_share_to_storage_grant": cfg.Reva.Gateway.CommitShareToStorageGrant,
|
||||
"commit_share_to_storage_ref": cfg.Reva.Gateway.CommitShareToStorageRef,
|
||||
"share_folder": cfg.Reva.Gateway.ShareFolder, // ShareFolder is the location where to create shares in the recipient's storage provider.
|
||||
// other
|
||||
"disable_home_creation_on_login": cfg.Reva.Gateway.DisableHomeCreationOnLogin,
|
||||
"datagateway": urlWithScheme(cfg.Reva.DataGateway.URL),
|
||||
"datagateway": cfg.Reva.DataGateway.PublicURL,
|
||||
"transfer_shared_secret": cfg.Reva.TransferSecret,
|
||||
"transfer_expires": cfg.Reva.TransferExpires,
|
||||
},
|
||||
@@ -117,9 +117,9 @@ func Gateway(cfg *config.Config) *cli.Command {
|
||||
"drivers": map[string]interface{}{
|
||||
"static": map[string]interface{}{
|
||||
"rules": map[string]interface{}{
|
||||
"basic": cfg.Reva.AuthBasic.URL,
|
||||
"bearer": cfg.Reva.AuthBearer.URL,
|
||||
"publicshares": cfg.Reva.StoragePublicLink.URL,
|
||||
"basic": cfg.Reva.AuthBasic.Endpoint,
|
||||
"bearer": cfg.Reva.AuthBearer.Endpoint,
|
||||
"publicshares": cfg.Reva.StoragePublicLink.Endpoint,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -142,7 +142,7 @@ func Gateway(cfg *config.Config) *cli.Command {
|
||||
ctx,
|
||||
"com.owncloud.storage",
|
||||
uuid.String(),
|
||||
cfg.Reva.Gateway.Addr,
|
||||
cfg.Reva.Gateway.GRPCAddr,
|
||||
logger,
|
||||
)
|
||||
|
||||
@@ -239,21 +239,12 @@ func rules(cfg *config.Config) map[string]interface{} {
|
||||
|
||||
// generate rules based on default config
|
||||
return map[string]interface{}{
|
||||
cfg.Reva.StorageRoot.MountPath: cfg.Reva.StorageRoot.URL,
|
||||
cfg.Reva.StorageRoot.MountID: cfg.Reva.StorageRoot.URL,
|
||||
cfg.Reva.StorageHome.MountPath: cfg.Reva.StorageHome.URL,
|
||||
cfg.Reva.StorageHome.MountID: cfg.Reva.StorageHome.URL,
|
||||
cfg.Reva.StorageEOS.MountPath: cfg.Reva.StorageEOS.URL,
|
||||
cfg.Reva.StorageEOS.MountID: cfg.Reva.StorageEOS.URL,
|
||||
cfg.Reva.StorageOC.MountPath: cfg.Reva.StorageOC.URL,
|
||||
cfg.Reva.StorageOC.MountID: cfg.Reva.StorageOC.URL,
|
||||
cfg.Reva.StorageS3.MountPath: cfg.Reva.StorageS3.URL,
|
||||
cfg.Reva.StorageS3.MountID: cfg.Reva.StorageS3.URL,
|
||||
cfg.Reva.StorageWND.MountPath: cfg.Reva.StorageWND.URL,
|
||||
cfg.Reva.StorageWND.MountID: cfg.Reva.StorageWND.URL,
|
||||
cfg.Reva.StorageCustom.MountPath: cfg.Reva.StorageCustom.URL,
|
||||
cfg.Reva.StorageCustom.MountID: cfg.Reva.StorageCustom.URL,
|
||||
cfg.Reva.StoragePublicLink.MountPath: cfg.Reva.StoragePublicLink.URL,
|
||||
cfg.Reva.StorageHome.MountPath: cfg.Reva.StorageHome.Endpoint,
|
||||
cfg.Reva.StorageHome.MountID: cfg.Reva.StorageHome.Endpoint,
|
||||
cfg.Reva.StorageUsers.MountPath: cfg.Reva.StorageUsers.Endpoint,
|
||||
cfg.Reva.StorageUsers.MountID: cfg.Reva.StorageUsers.Endpoint,
|
||||
cfg.Reva.StoragePublicLink.MountPath: cfg.Reva.StoragePublicLink.Endpoint,
|
||||
// public link storage returns the mount id of the actual storage
|
||||
// medatada storage not part of the global namespace
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,15 +80,10 @@ func Execute() error {
|
||||
AuthBasic(cfg),
|
||||
AuthBearer(cfg),
|
||||
Sharing(cfg),
|
||||
StorageRoot(cfg),
|
||||
StorageHome(cfg),
|
||||
StorageHomeData(cfg),
|
||||
StorageUsers(cfg),
|
||||
StoragePublicLink(cfg),
|
||||
StorageOC(cfg),
|
||||
StorageMetadata(cfg),
|
||||
StorageOCData(cfg),
|
||||
StorageEOS(cfg),
|
||||
StorageEOSData(cfg),
|
||||
Health(cfg),
|
||||
},
|
||||
}
|
||||
|
||||
@@ -73,18 +73,18 @@ func Sharing(cfg *config.Config) *cli.Command {
|
||||
|
||||
rcfg := map[string]interface{}{
|
||||
"core": map[string]interface{}{
|
||||
"max_cpus": cfg.Reva.Users.MaxCPUs,
|
||||
"max_cpus": cfg.Reva.Sharing.MaxCPUs,
|
||||
"tracing_enabled": cfg.Tracing.Enabled,
|
||||
"tracing_endpoint": cfg.Tracing.Endpoint,
|
||||
"tracing_collector": cfg.Tracing.Collector,
|
||||
"tracing_service_name": "sharing",
|
||||
"tracing_service_name": c.Command.Name,
|
||||
},
|
||||
"shared": map[string]interface{}{
|
||||
"jwt_secret": cfg.Reva.JWTSecret,
|
||||
},
|
||||
"grpc": map[string]interface{}{
|
||||
"network": cfg.Reva.Sharing.Network,
|
||||
"address": cfg.Reva.Sharing.Addr,
|
||||
"network": cfg.Reva.Sharing.GRPCNetwork,
|
||||
"address": cfg.Reva.Sharing.GRPCAddr,
|
||||
// TODO build services dynamically
|
||||
"services": map[string]interface{}{
|
||||
"usershareprovider": map[string]interface{}{
|
||||
|
||||
@@ -1,175 +0,0 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"os/signal"
|
||||
"path"
|
||||
"time"
|
||||
|
||||
"github.com/cs3org/reva/cmd/revad/runtime"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/storage/pkg/config"
|
||||
"github.com/owncloud/ocis/storage/pkg/flagset"
|
||||
"github.com/owncloud/ocis/storage/pkg/server/debug"
|
||||
)
|
||||
|
||||
// StorageEOS is the entrypoint for the storage-eos command.
|
||||
func StorageEOS(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "storage-eos",
|
||||
Usage: "Start storage-eos service",
|
||||
Flags: flagset.StorageEOSWithConfig(cfg),
|
||||
Before: func(c *cli.Context) error {
|
||||
cfg.Reva.StorageEOS.Services = c.StringSlice("service")
|
||||
|
||||
return nil
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := NewLogger(cfg)
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
switch t := cfg.Tracing.Type; t {
|
||||
case "agent":
|
||||
logger.Error().
|
||||
Str("type", t).
|
||||
Msg("Storage only supports the jaeger tracing backend")
|
||||
|
||||
case "jaeger":
|
||||
logger.Info().
|
||||
Str("type", t).
|
||||
Msg("configuring storage to use the jaeger tracing backend")
|
||||
|
||||
case "zipkin":
|
||||
logger.Error().
|
||||
Str("type", t).
|
||||
Msg("Storage only supports the jaeger tracing backend")
|
||||
|
||||
default:
|
||||
logger.Warn().
|
||||
Str("type", t).
|
||||
Msg("Unknown tracing backend")
|
||||
}
|
||||
|
||||
} else {
|
||||
logger.Debug().
|
||||
Msg("Tracing is not enabled")
|
||||
}
|
||||
|
||||
var (
|
||||
gr = run.Group{}
|
||||
ctx, cancel = context.WithCancel(context.Background())
|
||||
//metrics = metrics.New()
|
||||
)
|
||||
|
||||
defer cancel()
|
||||
|
||||
{
|
||||
uuid := uuid.Must(uuid.NewV4())
|
||||
pidFile := path.Join(os.TempDir(), "revad-"+c.Command.Name+"-"+uuid.String()+".pid")
|
||||
|
||||
rcfg := map[string]interface{}{
|
||||
"core": map[string]interface{}{
|
||||
"max_cpus": cfg.Reva.StorageEOS.MaxCPUs,
|
||||
"tracing_enabled": cfg.Tracing.Enabled,
|
||||
"tracing_endpoint": cfg.Tracing.Endpoint,
|
||||
"tracing_collector": cfg.Tracing.Collector,
|
||||
"tracing_service_name": "storage-eos",
|
||||
},
|
||||
"shared": map[string]interface{}{
|
||||
"jwt_secret": cfg.Reva.JWTSecret,
|
||||
},
|
||||
"grpc": map[string]interface{}{
|
||||
"network": cfg.Reva.StorageEOS.Network,
|
||||
"address": cfg.Reva.StorageEOS.Addr,
|
||||
// TODO build services dynamically
|
||||
"services": map[string]interface{}{
|
||||
"storageprovider": map[string]interface{}{
|
||||
"driver": cfg.Reva.StorageEOS.Driver,
|
||||
"drivers": drivers(cfg),
|
||||
"mount_path": cfg.Reva.StorageEOS.MountPath,
|
||||
"mount_id": cfg.Reva.StorageEOS.MountID,
|
||||
"expose_data_server": cfg.Reva.StorageEOS.ExposeDataServer,
|
||||
// TODO use cfg.Reva.SStorageEOSData.URL, ?
|
||||
"data_server_url": cfg.Reva.StorageEOS.DataServerURL,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
gr.Add(func() error {
|
||||
runtime.RunWithOptions(
|
||||
rcfg,
|
||||
pidFile,
|
||||
runtime.WithLogger(&logger.Logger),
|
||||
)
|
||||
return nil
|
||||
}, func(_ error) {
|
||||
logger.Info().
|
||||
Str("server", c.Command.Name).
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
})
|
||||
}
|
||||
|
||||
{
|
||||
server, err := debug.Server(
|
||||
debug.Name(c.Command.Name+"-debug"),
|
||||
debug.Addr(cfg.Reva.StorageEOS.DebugAddr),
|
||||
debug.Logger(logger),
|
||||
debug.Context(ctx),
|
||||
debug.Config(cfg),
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
logger.Info().
|
||||
Err(err).
|
||||
Str("server", c.Command.Name+"-debug").
|
||||
Msg("Failed to initialize server")
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
gr.Add(func() error {
|
||||
return server.ListenAndServe()
|
||||
}, func(_ error) {
|
||||
ctx, timeout := context.WithTimeout(ctx, 5*time.Second)
|
||||
|
||||
defer timeout()
|
||||
defer cancel()
|
||||
|
||||
if err := server.Shutdown(ctx); err != nil {
|
||||
logger.Info().
|
||||
Err(err).
|
||||
Str("server", c.Command.Name+"-debug").
|
||||
Msg("Failed to shutdown server")
|
||||
} else {
|
||||
logger.Info().
|
||||
Str("server", c.Command.Name+"-debug").
|
||||
Msg("Shutting down server")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
{
|
||||
stop := make(chan os.Signal, 1)
|
||||
|
||||
gr.Add(func() error {
|
||||
signal.Notify(stop, os.Interrupt)
|
||||
|
||||
<-stop
|
||||
|
||||
return nil
|
||||
}, func(err error) {
|
||||
close(stop)
|
||||
cancel()
|
||||
})
|
||||
}
|
||||
|
||||
return gr.Run()
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,175 +0,0 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"os/signal"
|
||||
"path"
|
||||
"time"
|
||||
|
||||
"github.com/cs3org/reva/cmd/revad/runtime"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/storage/pkg/config"
|
||||
"github.com/owncloud/ocis/storage/pkg/flagset"
|
||||
"github.com/owncloud/ocis/storage/pkg/server/debug"
|
||||
)
|
||||
|
||||
// StorageEOSData is the entrypoint for the storage-oc-data command.
|
||||
func StorageEOSData(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "storage-eos-data",
|
||||
Usage: "Start storage-eos-data service",
|
||||
Flags: flagset.StorageEOSDataWithConfig(cfg),
|
||||
Before: func(c *cli.Context) error {
|
||||
cfg.Reva.StorageEOSData.Services = c.StringSlice("service")
|
||||
|
||||
return nil
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := NewLogger(cfg)
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
switch t := cfg.Tracing.Type; t {
|
||||
case "agent":
|
||||
logger.Error().
|
||||
Str("type", t).
|
||||
Msg("Reva only supports the jaeger tracing backend")
|
||||
|
||||
case "jaeger":
|
||||
logger.Info().
|
||||
Str("type", t).
|
||||
Msg("configuring storage to use the jaeger tracing backend")
|
||||
|
||||
case "zipkin":
|
||||
logger.Error().
|
||||
Str("type", t).
|
||||
Msg("Reva only supports the jaeger tracing backend")
|
||||
|
||||
default:
|
||||
logger.Warn().
|
||||
Str("type", t).
|
||||
Msg("Unknown tracing backend")
|
||||
}
|
||||
|
||||
} else {
|
||||
logger.Debug().
|
||||
Msg("Tracing is not enabled")
|
||||
}
|
||||
|
||||
var (
|
||||
gr = run.Group{}
|
||||
ctx, cancel = context.WithCancel(context.Background())
|
||||
//metrics = metrics.New()
|
||||
)
|
||||
|
||||
defer cancel()
|
||||
|
||||
{
|
||||
uuid := uuid.Must(uuid.NewV4())
|
||||
pidFile := path.Join(os.TempDir(), "revad-"+c.Command.Name+"-"+uuid.String()+".pid")
|
||||
|
||||
rcfg := map[string]interface{}{
|
||||
"core": map[string]interface{}{
|
||||
"max_cpus": cfg.Reva.StorageEOSData.MaxCPUs,
|
||||
"tracing_enabled": cfg.Tracing.Enabled,
|
||||
"tracing_endpoint": cfg.Tracing.Endpoint,
|
||||
"tracing_collector": cfg.Tracing.Collector,
|
||||
"tracing_service_name": "storage-eos-data",
|
||||
},
|
||||
"shared": map[string]interface{}{
|
||||
"jwt_secret": cfg.Reva.JWTSecret,
|
||||
"gatewaysvc": cfg.Reva.Gateway.URL, // Todo or address?
|
||||
},
|
||||
"http": map[string]interface{}{
|
||||
"network": cfg.Reva.StorageEOSData.Network,
|
||||
"address": cfg.Reva.StorageEOSData.Addr,
|
||||
// TODO build services dynamically
|
||||
"services": map[string]interface{}{
|
||||
"dataprovider": map[string]interface{}{
|
||||
"prefix": cfg.Reva.StorageEOSData.Prefix,
|
||||
"driver": cfg.Reva.StorageEOSData.Driver,
|
||||
"drivers": drivers(cfg),
|
||||
"timeout": 86400,
|
||||
"insecure": true,
|
||||
"disable_tus": false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
gr.Add(func() error {
|
||||
runtime.RunWithOptions(
|
||||
rcfg,
|
||||
pidFile,
|
||||
runtime.WithLogger(&logger.Logger),
|
||||
)
|
||||
return nil
|
||||
}, func(_ error) {
|
||||
logger.Info().
|
||||
Str("server", c.Command.Name).
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
})
|
||||
}
|
||||
|
||||
{
|
||||
server, err := debug.Server(
|
||||
debug.Name(c.Command.Name+"-debug"),
|
||||
debug.Addr(cfg.Reva.StorageEOSData.DebugAddr),
|
||||
debug.Logger(logger),
|
||||
debug.Context(ctx),
|
||||
debug.Config(cfg),
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
logger.Info().
|
||||
Err(err).
|
||||
Str("server", c.Command.Name+"-debug").
|
||||
Msg("Failed to initialize server")
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
gr.Add(func() error {
|
||||
return server.ListenAndServe()
|
||||
}, func(_ error) {
|
||||
ctx, timeout := context.WithTimeout(ctx, 5*time.Second)
|
||||
|
||||
defer timeout()
|
||||
defer cancel()
|
||||
|
||||
if err := server.Shutdown(ctx); err != nil {
|
||||
logger.Info().
|
||||
Err(err).
|
||||
Str("server", c.Command.Name+"-debug").
|
||||
Msg("Failed to shutdown server")
|
||||
} else {
|
||||
logger.Info().
|
||||
Str("server", c.Command.Name+"-debug").
|
||||
Msg("Shutting down server")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
{
|
||||
stop := make(chan os.Signal, 1)
|
||||
|
||||
gr.Add(func() error {
|
||||
signal.Notify(stop, os.Interrupt)
|
||||
|
||||
<-stop
|
||||
|
||||
return nil
|
||||
}, func(err error) {
|
||||
close(stop)
|
||||
cancel()
|
||||
})
|
||||
}
|
||||
|
||||
return gr.Run()
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -80,18 +80,19 @@ func StorageHome(cfg *config.Config) *cli.Command {
|
||||
}
|
||||
rcfg := map[string]interface{}{
|
||||
"core": map[string]interface{}{
|
||||
"max_cpus": cfg.Reva.Users.MaxCPUs,
|
||||
"max_cpus": cfg.Reva.StorageHome.MaxCPUs,
|
||||
"tracing_enabled": cfg.Tracing.Enabled,
|
||||
"tracing_endpoint": cfg.Tracing.Endpoint,
|
||||
"tracing_collector": cfg.Tracing.Collector,
|
||||
"tracing_service_name": "storage-home",
|
||||
"tracing_service_name": c.Command.Name,
|
||||
},
|
||||
"shared": map[string]interface{}{
|
||||
"jwt_secret": cfg.Reva.JWTSecret,
|
||||
"gatewaysvc": cfg.Reva.Gateway.Endpoint,
|
||||
},
|
||||
"grpc": map[string]interface{}{
|
||||
"network": cfg.Reva.StorageHome.Network,
|
||||
"address": cfg.Reva.StorageHome.Addr,
|
||||
"network": cfg.Reva.StorageHome.GRPCNetwork,
|
||||
"address": cfg.Reva.StorageHome.GRPCAddr,
|
||||
// TODO build services dynamically
|
||||
"services": map[string]interface{}{
|
||||
"storageprovider": map[string]interface{}{
|
||||
@@ -100,8 +101,22 @@ func StorageHome(cfg *config.Config) *cli.Command {
|
||||
"mount_path": cfg.Reva.StorageHome.MountPath,
|
||||
"mount_id": cfg.Reva.StorageHome.MountID,
|
||||
"expose_data_server": cfg.Reva.StorageHome.ExposeDataServer,
|
||||
// TODO use cfg.Reva.StorageHomeData.URL, ?
|
||||
"data_server_url": cfg.Reva.StorageHome.DataServerURL,
|
||||
"data_server_url": cfg.Reva.StorageHome.DataServerURL,
|
||||
},
|
||||
},
|
||||
},
|
||||
"http": map[string]interface{}{
|
||||
"network": cfg.Reva.StorageHome.HTTPNetwork,
|
||||
"address": cfg.Reva.StorageHome.HTTPAddr,
|
||||
// TODO build services dynamically
|
||||
"services": map[string]interface{}{
|
||||
"dataprovider": map[string]interface{}{
|
||||
"prefix": cfg.Reva.StorageHome.HTTPPrefix,
|
||||
"driver": cfg.Reva.StorageHome.Driver,
|
||||
"drivers": drivers(cfg),
|
||||
"timeout": 86400,
|
||||
"insecure": true,
|
||||
"disable_tus": false,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -89,38 +89,39 @@ func StorageMetadata(cfg *config.Config) *cli.Command {
|
||||
|
||||
rcfg := map[string]interface{}{
|
||||
"core": map[string]interface{}{
|
||||
"max_cpus": "100",
|
||||
"tracing_enabled": false,
|
||||
"max_cpus": cfg.Reva.StorageMetadata.MaxCPUs,
|
||||
"tracing_enabled": cfg.Tracing.Enabled,
|
||||
"tracing_endpoint": cfg.Tracing.Endpoint,
|
||||
"tracing_collector": cfg.Tracing.Collector,
|
||||
"tracing_service_name": "storage-metadata",
|
||||
"tracing_service_name": c.Command.Name,
|
||||
},
|
||||
"shared": map[string]interface{}{
|
||||
"jwt_secret": cfg.Reva.JWTSecret,
|
||||
"gatewaysvc": cfg.Reva.Gateway.Endpoint,
|
||||
},
|
||||
"grpc": map[string]interface{}{
|
||||
"network": cfg.Reva.StorageMetadata.Network,
|
||||
"address": cfg.Reva.StorageMetadata.Addr,
|
||||
"network": cfg.Reva.StorageMetadata.GRPCNetwork,
|
||||
"address": cfg.Reva.StorageMetadata.GRPCAddr,
|
||||
"interceptors": map[string]interface{}{
|
||||
"log": map[string]interface{}{},
|
||||
},
|
||||
"services": map[string]interface{}{
|
||||
"storageprovider": map[string]interface{}{
|
||||
"mount_path": "/meta",
|
||||
"data_server_url": cfg.Reva.StorageMetadataData.URL,
|
||||
"driver": cfg.Reva.StorageMetadata.Driver,
|
||||
"drivers": drivers(cfg),
|
||||
"data_server_url": cfg.Reva.StorageMetadata.DataServerURL,
|
||||
},
|
||||
},
|
||||
},
|
||||
"http": map[string]interface{}{
|
||||
"network": cfg.Reva.StorageMetadataData.Network,
|
||||
"address": cfg.Reva.StorageMetadataData.Addr,
|
||||
"network": cfg.Reva.StorageMetadata.HTTPNetwork,
|
||||
"address": cfg.Reva.StorageMetadata.HTTPAddr,
|
||||
// TODO build services dynamically
|
||||
"services": map[string]interface{}{
|
||||
"dataprovider": map[string]interface{}{
|
||||
"prefix": "data",
|
||||
"driver": cfg.Reva.StorageMetadataData.Driver,
|
||||
"driver": cfg.Reva.StorageMetadata.Driver,
|
||||
"drivers": drivers(cfg),
|
||||
"timeout": 86400,
|
||||
"insecure": true,
|
||||
|
||||
@@ -1,175 +0,0 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"os/signal"
|
||||
"path"
|
||||
"time"
|
||||
|
||||
"github.com/cs3org/reva/cmd/revad/runtime"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/storage/pkg/config"
|
||||
"github.com/owncloud/ocis/storage/pkg/flagset"
|
||||
"github.com/owncloud/ocis/storage/pkg/server/debug"
|
||||
)
|
||||
|
||||
// StorageOC is the entrypoint for the storage-oc command.
|
||||
func StorageOC(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "storage-oc",
|
||||
Usage: "Start storage-oc service",
|
||||
Flags: flagset.StorageOCWithConfig(cfg),
|
||||
Before: func(c *cli.Context) error {
|
||||
cfg.Reva.StorageOC.Services = c.StringSlice("service")
|
||||
|
||||
return nil
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := NewLogger(cfg)
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
switch t := cfg.Tracing.Type; t {
|
||||
case "agent":
|
||||
logger.Error().
|
||||
Str("type", t).
|
||||
Msg("Reva only supports the jaeger tracing backend")
|
||||
|
||||
case "jaeger":
|
||||
logger.Info().
|
||||
Str("type", t).
|
||||
Msg("configuring storage to use the jaeger tracing backend")
|
||||
|
||||
case "zipkin":
|
||||
logger.Error().
|
||||
Str("type", t).
|
||||
Msg("Reva only supports the jaeger tracing backend")
|
||||
|
||||
default:
|
||||
logger.Warn().
|
||||
Str("type", t).
|
||||
Msg("Unknown tracing backend")
|
||||
}
|
||||
|
||||
} else {
|
||||
logger.Debug().
|
||||
Msg("Tracing is not enabled")
|
||||
}
|
||||
|
||||
var (
|
||||
gr = run.Group{}
|
||||
ctx, cancel = context.WithCancel(context.Background())
|
||||
//metrics = metrics.New()
|
||||
)
|
||||
|
||||
defer cancel()
|
||||
|
||||
{
|
||||
uuid := uuid.Must(uuid.NewV4())
|
||||
pidFile := path.Join(os.TempDir(), "revad-"+c.Command.Name+"-"+uuid.String()+".pid")
|
||||
|
||||
rcfg := map[string]interface{}{
|
||||
"core": map[string]interface{}{
|
||||
"max_cpus": cfg.Reva.StorageOC.MaxCPUs,
|
||||
"tracing_enabled": cfg.Tracing.Enabled,
|
||||
"tracing_endpoint": cfg.Tracing.Endpoint,
|
||||
"tracing_collector": cfg.Tracing.Collector,
|
||||
"tracing_service_name": "storage-oc",
|
||||
},
|
||||
"shared": map[string]interface{}{
|
||||
"jwt_secret": cfg.Reva.JWTSecret,
|
||||
},
|
||||
"grpc": map[string]interface{}{
|
||||
"network": cfg.Reva.StorageOC.Network,
|
||||
"address": cfg.Reva.StorageOC.Addr,
|
||||
// TODO build services dynamically
|
||||
"services": map[string]interface{}{
|
||||
"storageprovider": map[string]interface{}{
|
||||
"driver": cfg.Reva.StorageOC.Driver,
|
||||
"drivers": drivers(cfg),
|
||||
"mount_path": cfg.Reva.StorageOC.MountPath,
|
||||
"mount_id": cfg.Reva.StorageOC.MountID,
|
||||
"expose_data_server": cfg.Reva.StorageOC.ExposeDataServer,
|
||||
// TODO use cfg.Reva.SStorageOCData.URL, ?
|
||||
"data_server_url": cfg.Reva.StorageOC.DataServerURL,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
gr.Add(func() error {
|
||||
runtime.RunWithOptions(
|
||||
rcfg,
|
||||
pidFile,
|
||||
runtime.WithLogger(&logger.Logger),
|
||||
)
|
||||
return nil
|
||||
}, func(_ error) {
|
||||
logger.Info().
|
||||
Str("server", c.Command.Name).
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
})
|
||||
}
|
||||
|
||||
{
|
||||
server, err := debug.Server(
|
||||
debug.Name(c.Command.Name+"-debug"),
|
||||
debug.Addr(cfg.Reva.StorageOC.DebugAddr),
|
||||
debug.Logger(logger),
|
||||
debug.Context(ctx),
|
||||
debug.Config(cfg),
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
logger.Info().
|
||||
Err(err).
|
||||
Str("server", c.Command.Name+"-debug").
|
||||
Msg("Failed to initialize server")
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
gr.Add(func() error {
|
||||
return server.ListenAndServe()
|
||||
}, func(_ error) {
|
||||
ctx, timeout := context.WithTimeout(ctx, 5*time.Second)
|
||||
|
||||
defer timeout()
|
||||
defer cancel()
|
||||
|
||||
if err := server.Shutdown(ctx); err != nil {
|
||||
logger.Info().
|
||||
Err(err).
|
||||
Str("server", c.Command.Name+"-debug").
|
||||
Msg("Failed to shutdown server")
|
||||
} else {
|
||||
logger.Info().
|
||||
Str("server", c.Command.Name+"-debug").
|
||||
Msg("Shutting down server")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
{
|
||||
stop := make(chan os.Signal, 1)
|
||||
|
||||
gr.Add(func() error {
|
||||
signal.Notify(stop, os.Interrupt)
|
||||
|
||||
<-stop
|
||||
|
||||
return nil
|
||||
}, func(err error) {
|
||||
close(stop)
|
||||
cancel()
|
||||
})
|
||||
}
|
||||
|
||||
return gr.Run()
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,175 +0,0 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"os/signal"
|
||||
"path"
|
||||
"time"
|
||||
|
||||
"github.com/cs3org/reva/cmd/revad/runtime"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/storage/pkg/config"
|
||||
"github.com/owncloud/ocis/storage/pkg/flagset"
|
||||
"github.com/owncloud/ocis/storage/pkg/server/debug"
|
||||
)
|
||||
|
||||
// StorageOCData is the entrypoint for the storage-oc-data command.
|
||||
func StorageOCData(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "storage-oc-data",
|
||||
Usage: "Start storage-oc-data service",
|
||||
Flags: flagset.StorageOCDataWithConfig(cfg),
|
||||
Before: func(c *cli.Context) error {
|
||||
cfg.Reva.StorageOCData.Services = c.StringSlice("service")
|
||||
|
||||
return nil
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := NewLogger(cfg)
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
switch t := cfg.Tracing.Type; t {
|
||||
case "agent":
|
||||
logger.Error().
|
||||
Str("type", t).
|
||||
Msg("Reva only supports the jaeger tracing backend")
|
||||
|
||||
case "jaeger":
|
||||
logger.Info().
|
||||
Str("type", t).
|
||||
Msg("configuring storage to use the jaeger tracing backend")
|
||||
|
||||
case "zipkin":
|
||||
logger.Error().
|
||||
Str("type", t).
|
||||
Msg("Reva only supports the jaeger tracing backend")
|
||||
|
||||
default:
|
||||
logger.Warn().
|
||||
Str("type", t).
|
||||
Msg("Unknown tracing backend")
|
||||
}
|
||||
|
||||
} else {
|
||||
logger.Debug().
|
||||
Msg("Tracing is not enabled")
|
||||
}
|
||||
|
||||
var (
|
||||
gr = run.Group{}
|
||||
ctx, cancel = context.WithCancel(context.Background())
|
||||
//metrics = metrics.New()
|
||||
)
|
||||
|
||||
defer cancel()
|
||||
|
||||
{
|
||||
uuid := uuid.Must(uuid.NewV4())
|
||||
pidFile := path.Join(os.TempDir(), "revad-"+c.Command.Name+"-"+uuid.String()+".pid")
|
||||
|
||||
rcfg := map[string]interface{}{
|
||||
"core": map[string]interface{}{
|
||||
"max_cpus": cfg.Reva.StorageOCData.MaxCPUs,
|
||||
"tracing_enabled": cfg.Tracing.Enabled,
|
||||
"tracing_endpoint": cfg.Tracing.Endpoint,
|
||||
"tracing_collector": cfg.Tracing.Collector,
|
||||
"tracing_service_name": "storage-oc-data",
|
||||
},
|
||||
"shared": map[string]interface{}{
|
||||
"jwt_secret": cfg.Reva.JWTSecret,
|
||||
"gatewaysvc": cfg.Reva.Gateway.URL, // Todo or address?
|
||||
},
|
||||
"http": map[string]interface{}{
|
||||
"network": cfg.Reva.StorageOCData.Network,
|
||||
"address": cfg.Reva.StorageOCData.Addr,
|
||||
// TODO build services dynamically
|
||||
"services": map[string]interface{}{
|
||||
"dataprovider": map[string]interface{}{
|
||||
"prefix": cfg.Reva.StorageOCData.Prefix,
|
||||
"driver": cfg.Reva.StorageOCData.Driver,
|
||||
"drivers": drivers(cfg),
|
||||
"timeout": 86400,
|
||||
"insecure": true,
|
||||
"disable_tus": false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
gr.Add(func() error {
|
||||
runtime.RunWithOptions(
|
||||
rcfg,
|
||||
pidFile,
|
||||
runtime.WithLogger(&logger.Logger),
|
||||
)
|
||||
return nil
|
||||
}, func(_ error) {
|
||||
logger.Info().
|
||||
Str("server", c.Command.Name).
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
})
|
||||
}
|
||||
|
||||
{
|
||||
server, err := debug.Server(
|
||||
debug.Name(c.Command.Name+"-debug"),
|
||||
debug.Addr(cfg.Reva.StorageOCData.DebugAddr),
|
||||
debug.Logger(logger),
|
||||
debug.Context(ctx),
|
||||
debug.Config(cfg),
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
logger.Info().
|
||||
Err(err).
|
||||
Str("server", c.Command.Name+"-debug").
|
||||
Msg("Failed to initialize server")
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
gr.Add(func() error {
|
||||
return server.ListenAndServe()
|
||||
}, func(_ error) {
|
||||
ctx, timeout := context.WithTimeout(ctx, 5*time.Second)
|
||||
|
||||
defer timeout()
|
||||
defer cancel()
|
||||
|
||||
if err := server.Shutdown(ctx); err != nil {
|
||||
logger.Info().
|
||||
Err(err).
|
||||
Str("server", c.Command.Name+"-debug").
|
||||
Msg("Failed to shutdown server")
|
||||
} else {
|
||||
logger.Info().
|
||||
Str("server", c.Command.Name+"-debug").
|
||||
Msg("Shutting down server")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
{
|
||||
stop := make(chan os.Signal, 1)
|
||||
|
||||
gr.Add(func() error {
|
||||
signal.Notify(stop, os.Interrupt)
|
||||
|
||||
<-stop
|
||||
|
||||
return nil
|
||||
}, func(err error) {
|
||||
close(stop)
|
||||
cancel()
|
||||
})
|
||||
}
|
||||
|
||||
return gr.Run()
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -72,27 +72,28 @@ func StoragePublicLink(cfg *config.Config) *cli.Command {
|
||||
"tracing_enabled": cfg.Tracing.Enabled,
|
||||
"tracing_endpoint": cfg.Tracing.Endpoint,
|
||||
"tracing_collector": cfg.Tracing.Collector,
|
||||
"tracing_service_name": "storage-public-link",
|
||||
"tracing_service_name": c.Command.Name,
|
||||
},
|
||||
"shared": map[string]interface{}{
|
||||
"jwt_secret": cfg.Reva.JWTSecret,
|
||||
"gatewaysvc": cfg.Reva.Gateway.Endpoint,
|
||||
},
|
||||
"grpc": map[string]interface{}{
|
||||
"network": cfg.Reva.StoragePublicLink.Network,
|
||||
"address": cfg.Reva.StoragePublicLink.Addr,
|
||||
"network": cfg.Reva.StoragePublicLink.GRPCNetwork,
|
||||
"address": cfg.Reva.StoragePublicLink.GRPCAddr,
|
||||
"interceptors": map[string]interface{}{
|
||||
"log": map[string]interface{}{},
|
||||
},
|
||||
"services": map[string]interface{}{
|
||||
"publicstorageprovider": map[string]interface{}{
|
||||
"mount_path": cfg.Reva.StoragePublicLink.MountPath,
|
||||
"gateway_addr": cfg.Reva.Gateway.URL,
|
||||
"gateway_addr": cfg.Reva.Gateway.Endpoint,
|
||||
},
|
||||
"authprovider": map[string]interface{}{
|
||||
"auth_manager": "publicshares",
|
||||
"auth_managers": map[string]interface{}{
|
||||
"publicshares": map[string]interface{}{
|
||||
"gateway_addr": cfg.Reva.Gateway.URL,
|
||||
"gateway_addr": cfg.Reva.Gateway.Endpoint,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,174 +0,0 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"os/signal"
|
||||
"path"
|
||||
"time"
|
||||
|
||||
"github.com/cs3org/reva/cmd/revad/runtime"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/storage/pkg/config"
|
||||
"github.com/owncloud/ocis/storage/pkg/flagset"
|
||||
"github.com/owncloud/ocis/storage/pkg/server/debug"
|
||||
)
|
||||
|
||||
// StorageRoot is the entrypoint for the storage-root command.
|
||||
func StorageRoot(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "storage-root",
|
||||
Usage: "Start storage-root service",
|
||||
Flags: flagset.StorageRootWithConfig(cfg),
|
||||
Before: func(c *cli.Context) error {
|
||||
cfg.Reva.StorageRoot.Services = c.StringSlice("service")
|
||||
|
||||
return nil
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := NewLogger(cfg)
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
switch t := cfg.Tracing.Type; t {
|
||||
case "agent":
|
||||
logger.Error().
|
||||
Str("type", t).
|
||||
Msg("Storage only supports the jaeger tracing backend")
|
||||
|
||||
case "jaeger":
|
||||
logger.Info().
|
||||
Str("type", t).
|
||||
Msg("configuring storage to use the jaeger tracing backend")
|
||||
|
||||
case "zipkin":
|
||||
logger.Error().
|
||||
Str("type", t).
|
||||
Msg("Storage only supports the jaeger tracing backend")
|
||||
|
||||
default:
|
||||
logger.Warn().
|
||||
Str("type", t).
|
||||
Msg("Unknown tracing backend")
|
||||
}
|
||||
|
||||
} else {
|
||||
logger.Debug().
|
||||
Msg("Tracing is not enabled")
|
||||
}
|
||||
|
||||
var (
|
||||
gr = run.Group{}
|
||||
ctx, cancel = context.WithCancel(context.Background())
|
||||
//metrics = metrics.New()
|
||||
)
|
||||
|
||||
defer cancel()
|
||||
|
||||
{
|
||||
uuid := uuid.Must(uuid.NewV4())
|
||||
pidFile := path.Join(os.TempDir(), "revad-"+c.Command.Name+"-"+uuid.String()+".pid")
|
||||
|
||||
rcfg := map[string]interface{}{
|
||||
"core": map[string]interface{}{
|
||||
"max_cpus": cfg.Reva.StorageRoot.MaxCPUs,
|
||||
"tracing_enabled": cfg.Tracing.Enabled,
|
||||
"tracing_endpoint": cfg.Tracing.Endpoint,
|
||||
"tracing_collector": cfg.Tracing.Collector,
|
||||
"tracing_service_name": "storage-root",
|
||||
},
|
||||
"shared": map[string]interface{}{
|
||||
"jwt_secret": cfg.Reva.JWTSecret,
|
||||
},
|
||||
"grpc": map[string]interface{}{
|
||||
"network": cfg.Reva.StorageRoot.Network,
|
||||
"address": cfg.Reva.StorageRoot.Addr,
|
||||
// TODO build services dynamically
|
||||
"services": map[string]interface{}{
|
||||
"storageprovider": map[string]interface{}{
|
||||
"driver": cfg.Reva.StorageRoot.Driver,
|
||||
"drivers": drivers(cfg),
|
||||
"mount_path": cfg.Reva.StorageRoot.MountPath,
|
||||
"mount_id": cfg.Reva.StorageRoot.MountID,
|
||||
"expose_data_server": cfg.Reva.StorageRoot.ExposeDataServer,
|
||||
"data_server_url": cfg.Reva.StorageRoot.DataServerURL,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
gr.Add(func() error {
|
||||
runtime.RunWithOptions(
|
||||
rcfg,
|
||||
pidFile,
|
||||
runtime.WithLogger(&logger.Logger),
|
||||
)
|
||||
return nil
|
||||
}, func(_ error) {
|
||||
logger.Info().
|
||||
Str("server", c.Command.Name).
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
})
|
||||
}
|
||||
|
||||
{
|
||||
server, err := debug.Server(
|
||||
debug.Name(c.Command.Name+"-debug"),
|
||||
debug.Addr(cfg.Reva.StorageRoot.DebugAddr),
|
||||
debug.Logger(logger),
|
||||
debug.Context(ctx),
|
||||
debug.Config(cfg),
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
logger.Info().
|
||||
Err(err).
|
||||
Str("server", c.Command.Name+"-debug").
|
||||
Msg("Failed to initialize server")
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
gr.Add(func() error {
|
||||
return server.ListenAndServe()
|
||||
}, func(_ error) {
|
||||
ctx, timeout := context.WithTimeout(ctx, 5*time.Second)
|
||||
|
||||
defer timeout()
|
||||
defer cancel()
|
||||
|
||||
if err := server.Shutdown(ctx); err != nil {
|
||||
logger.Info().
|
||||
Err(err).
|
||||
Str("server", c.Command.Name+"-debug").
|
||||
Msg("Failed to shutdown server")
|
||||
} else {
|
||||
logger.Info().
|
||||
Str("server", c.Command.Name+"-debug").
|
||||
Msg("Shutting down server")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
{
|
||||
stop := make(chan os.Signal, 1)
|
||||
|
||||
gr.Add(func() error {
|
||||
signal.Notify(stop, os.Interrupt)
|
||||
|
||||
<-stop
|
||||
|
||||
return nil
|
||||
}, func(err error) {
|
||||
close(stop)
|
||||
cancel()
|
||||
})
|
||||
}
|
||||
|
||||
return gr.Run()
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -16,14 +16,14 @@ import (
|
||||
"github.com/owncloud/ocis/storage/pkg/server/debug"
|
||||
)
|
||||
|
||||
// StorageHomeData is the entrypoint for the storage-home-data command.
|
||||
func StorageHomeData(cfg *config.Config) *cli.Command {
|
||||
// StorageUsers is the entrypoint for the storage-users command.
|
||||
func StorageUsers(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "storage-home-data",
|
||||
Usage: "Start storage-home-data service",
|
||||
Flags: flagset.StorageHomeDataWithConfig(cfg),
|
||||
Name: "storage-users",
|
||||
Usage: "Start storage-users service",
|
||||
Flags: flagset.StorageUsersWithConfig(cfg),
|
||||
Before: func(c *cli.Context) error {
|
||||
cfg.Reva.StorageHomeData.Services = c.StringSlice("service")
|
||||
cfg.Reva.StorageHome.Services = c.StringSlice("service")
|
||||
|
||||
return nil
|
||||
},
|
||||
@@ -80,24 +80,39 @@ func StorageHomeData(cfg *config.Config) *cli.Command {
|
||||
}
|
||||
rcfg := map[string]interface{}{
|
||||
"core": map[string]interface{}{
|
||||
"max_cpus": cfg.Reva.Users.MaxCPUs,
|
||||
"max_cpus": cfg.Reva.StorageUsers.MaxCPUs,
|
||||
"tracing_enabled": cfg.Tracing.Enabled,
|
||||
"tracing_endpoint": cfg.Tracing.Endpoint,
|
||||
"tracing_collector": cfg.Tracing.Collector,
|
||||
"tracing_service_name": "storage-home-data",
|
||||
"tracing_service_name": c.Command.Name,
|
||||
},
|
||||
"shared": map[string]interface{}{
|
||||
"jwt_secret": cfg.Reva.JWTSecret,
|
||||
"gatewaysvc": cfg.Reva.Gateway.URL, // Todo or address?
|
||||
"gatewaysvc": cfg.Reva.Gateway.Endpoint,
|
||||
},
|
||||
"grpc": map[string]interface{}{
|
||||
"network": cfg.Reva.StorageUsers.GRPCNetwork,
|
||||
"address": cfg.Reva.StorageUsers.GRPCAddr,
|
||||
// TODO build services dynamically
|
||||
"services": map[string]interface{}{
|
||||
"storageprovider": map[string]interface{}{
|
||||
"driver": cfg.Reva.StorageUsers.Driver,
|
||||
"drivers": drivers(cfg),
|
||||
"mount_path": cfg.Reva.StorageUsers.MountPath,
|
||||
"mount_id": cfg.Reva.StorageUsers.MountID,
|
||||
"expose_data_server": cfg.Reva.StorageUsers.ExposeDataServer,
|
||||
"data_server_url": cfg.Reva.StorageUsers.DataServerURL,
|
||||
},
|
||||
},
|
||||
},
|
||||
"http": map[string]interface{}{
|
||||
"network": cfg.Reva.StorageHomeData.Network,
|
||||
"address": cfg.Reva.StorageHomeData.Addr,
|
||||
"network": cfg.Reva.StorageUsers.HTTPNetwork,
|
||||
"address": cfg.Reva.StorageUsers.HTTPAddr,
|
||||
// TODO build services dynamically
|
||||
"services": map[string]interface{}{
|
||||
"dataprovider": map[string]interface{}{
|
||||
"prefix": cfg.Reva.StorageHomeData.Prefix,
|
||||
"driver": cfg.Reva.StorageHomeData.Driver,
|
||||
"prefix": cfg.Reva.StorageUsers.HTTPPrefix,
|
||||
"driver": cfg.Reva.StorageUsers.Driver,
|
||||
"drivers": drivers(cfg),
|
||||
"timeout": 86400,
|
||||
"insecure": true,
|
||||
@@ -126,7 +141,7 @@ func StorageHomeData(cfg *config.Config) *cli.Command {
|
||||
{
|
||||
server, err := debug.Server(
|
||||
debug.Name(c.Command.Name+"-debug"),
|
||||
debug.Addr(cfg.Reva.StorageHomeData.DebugAddr),
|
||||
debug.Addr(cfg.Reva.StorageUsers.DebugAddr),
|
||||
debug.Logger(logger),
|
||||
debug.Context(ctx),
|
||||
debug.Config(cfg),
|
||||
@@ -76,14 +76,14 @@ func Users(cfg *config.Config) *cli.Command {
|
||||
"tracing_enabled": cfg.Tracing.Enabled,
|
||||
"tracing_endpoint": cfg.Tracing.Endpoint,
|
||||
"tracing_collector": cfg.Tracing.Collector,
|
||||
"tracing_service_name": "users",
|
||||
"tracing_service_name": c.Command.Name,
|
||||
},
|
||||
"shared": map[string]interface{}{
|
||||
"jwt_secret": cfg.Reva.JWTSecret,
|
||||
},
|
||||
"grpc": map[string]interface{}{
|
||||
"network": cfg.Reva.Users.Network,
|
||||
"address": cfg.Reva.Users.Addr,
|
||||
"network": cfg.Reva.Users.GRPCNetwork,
|
||||
"address": cfg.Reva.Users.GRPCAddr,
|
||||
// TODO build services dynamically
|
||||
"services": map[string]interface{}{
|
||||
"userprovider": map[string]interface{}{
|
||||
|
||||
@@ -46,14 +46,19 @@ type Port struct {
|
||||
// MaxCPUs can be a number or a percentage
|
||||
MaxCPUs string
|
||||
LogLevel string
|
||||
// Network can be tcp, udp or unix
|
||||
Network string
|
||||
// Addr to listen on, hostname:port (0.0.0.0:9999 for all interfaces) or socket (/var/run/reva/sock)
|
||||
Addr string
|
||||
// GRPCNetwork can be tcp, udp or unix
|
||||
GRPCNetwork string
|
||||
// GRPCAddr to listen on, hostname:port (0.0.0.0:9999 for all interfaces) or socket (/var/run/reva/sock)
|
||||
GRPCAddr string
|
||||
// Protocol can be grpc or http
|
||||
// HTTPNetwork can be tcp, udp or unix
|
||||
HTTPNetwork string
|
||||
// HTTPAddr to listen on, hostname:port (0.0.0.0:9100 for all interfaces) or socket (/var/run/reva/sock)
|
||||
HTTPAddr string
|
||||
// Protocol can be grpc or http
|
||||
Protocol string
|
||||
// URL is used by the gateway and registries (eg http://localhost:9100 or https://cloud.example.com)
|
||||
URL string
|
||||
// Endpoint is used by the gateway and registries (eg localhost:9100 or cloud.example.com)
|
||||
Endpoint string
|
||||
// DebugAddr for the debug endpoint to bind to
|
||||
DebugAddr string
|
||||
// Services can be used to give a list of services that should be started on this port
|
||||
@@ -77,6 +82,13 @@ type FrontendPort struct {
|
||||
DatagatewayPrefix string
|
||||
OCDavPrefix string
|
||||
OCSPrefix string
|
||||
PublicURL string
|
||||
}
|
||||
|
||||
// DataGatewayPort has a public url
|
||||
type DataGatewayPort struct {
|
||||
Port
|
||||
PublicURL string
|
||||
}
|
||||
|
||||
// StoragePort defines the available storage configuration.
|
||||
@@ -86,10 +98,11 @@ type StoragePort struct {
|
||||
MountPath string
|
||||
MountID string
|
||||
ExposeDataServer bool
|
||||
DataServerURL string
|
||||
// url the data gateway will use to route requests
|
||||
DataServerURL string
|
||||
|
||||
// for HTTP ports with only one http service
|
||||
Prefix string
|
||||
HTTPPrefix string
|
||||
TempFolder string
|
||||
}
|
||||
|
||||
@@ -273,32 +286,19 @@ type Reva struct {
|
||||
OCDav OCDav
|
||||
Storages StorageConfig
|
||||
// Ports are used to configure which services to start on which port
|
||||
Frontend FrontendPort
|
||||
DataGateway Port
|
||||
Gateway Gateway
|
||||
StorageRegistry StorageRegistry
|
||||
Users Users
|
||||
AuthProvider Users
|
||||
AuthBasic Port
|
||||
AuthBearer Port
|
||||
Sharing Sharing
|
||||
StorageRoot StoragePort
|
||||
StorageRootData StoragePort
|
||||
StorageHome StoragePort
|
||||
StorageHomeData StoragePort
|
||||
StorageEOS StoragePort
|
||||
StorageEOSData StoragePort
|
||||
StorageOC StoragePort
|
||||
StorageOCData StoragePort
|
||||
StorageS3 StoragePort
|
||||
StorageS3Data StoragePort
|
||||
StorageWND StoragePort
|
||||
StorageWNDData StoragePort
|
||||
StorageCustom StoragePort
|
||||
StorageCustomData StoragePort
|
||||
StoragePublicLink PublicStorage
|
||||
StorageMetadata StoragePort
|
||||
StorageMetadataData StoragePort
|
||||
Frontend FrontendPort
|
||||
DataGateway DataGatewayPort
|
||||
Gateway Gateway
|
||||
StorageRegistry StorageRegistry
|
||||
Users Users
|
||||
AuthProvider Users
|
||||
AuthBasic Port
|
||||
AuthBearer Port
|
||||
Sharing Sharing
|
||||
StorageHome StoragePort
|
||||
StorageUsers StoragePort
|
||||
StoragePublicLink PublicStorage
|
||||
StorageMetadata StoragePort
|
||||
// Configs can be used to configure the reva instance.
|
||||
// Services and Ports will be ignored if this is used
|
||||
Configs map[string]interface{}
|
||||
|
||||
@@ -43,29 +43,15 @@ func AuthBasicWithConfig(cfg *config.Config) []cli.Flag {
|
||||
Name: "network",
|
||||
Value: "tcp",
|
||||
Usage: "Network to use for the storage auth-basic service, can be 'tcp', 'udp' or 'unix'",
|
||||
EnvVars: []string{"STORAGE_AUTH_BASIC_NETWORK"},
|
||||
Destination: &cfg.Reva.AuthBasic.Network,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "protocol",
|
||||
Value: "grpc",
|
||||
Usage: "protocol for storage service, can be 'http' or 'grpc'",
|
||||
EnvVars: []string{"STORAGE_AUTH_BASIC_PROTOCOL"},
|
||||
Destination: &cfg.Reva.AuthBasic.Protocol,
|
||||
EnvVars: []string{"STORAGE_AUTH_BASIC_GRPC_NETWORK"},
|
||||
Destination: &cfg.Reva.AuthBasic.GRPCNetwork,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "addr",
|
||||
Value: "0.0.0.0:9146",
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_AUTH_BASIC_ADDR"},
|
||||
Destination: &cfg.Reva.AuthBasic.Addr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "url",
|
||||
Value: "localhost:9146",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_AUTH_BASIC_URL"},
|
||||
Destination: &cfg.Reva.AuthBasic.URL,
|
||||
EnvVars: []string{"STORAGE_AUTH_BASIC_GRPC_ADDR"},
|
||||
Destination: &cfg.Reva.AuthBasic.GRPCAddr,
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "service",
|
||||
|
||||
@@ -48,14 +48,14 @@ func AuthBearerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
Destination: &cfg.Reva.OIDC.IDClaim,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "oidc-uid-claim",
|
||||
Name: "oidc-uid-claim",
|
||||
Value: "",
|
||||
Usage: "OIDC uid claim",
|
||||
EnvVars: []string{"STORAGE_OIDC_UID_CLAIM"},
|
||||
Destination: &cfg.Reva.OIDC.UIDClaim,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "oidc-gid-claim",
|
||||
Name: "oidc-gid-claim",
|
||||
Value: "",
|
||||
Usage: "OIDC gid claim",
|
||||
EnvVars: []string{"STORAGE_OIDC_GID_CLAIM"},
|
||||
@@ -70,29 +70,15 @@ func AuthBearerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
Name: "network",
|
||||
Value: "tcp",
|
||||
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
|
||||
EnvVars: []string{"STORAGE_AUTH_BEARER_NETWORK"},
|
||||
Destination: &cfg.Reva.AuthBearer.Network,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "protocol",
|
||||
Value: "grpc",
|
||||
Usage: "protocol for storage service, can be 'http' or 'grpc'",
|
||||
EnvVars: []string{"STORAGE_AUTH_BEARER_PROTOCOL"},
|
||||
Destination: &cfg.Reva.AuthBearer.Protocol,
|
||||
EnvVars: []string{"STORAGE_AUTH_BEARER_GRPC_NETWORK"},
|
||||
Destination: &cfg.Reva.AuthBearer.GRPCNetwork,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "addr",
|
||||
Value: "0.0.0.0:9148",
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_AUTH_BEARER_ADDR"},
|
||||
Destination: &cfg.Reva.AuthBearer.Addr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "url",
|
||||
Value: "localhost:9148",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_AUTH_BEARER_URL"},
|
||||
Destination: &cfg.Reva.AuthBearer.URL,
|
||||
EnvVars: []string{"STORAGE_AUTH_BEARER_GRPC_ADDR"},
|
||||
Destination: &cfg.Reva.AuthBearer.GRPCAddr,
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "service",
|
||||
|
||||
@@ -42,7 +42,7 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
|
||||
// this can eg. be set to /eos/users
|
||||
&cli.StringFlag{
|
||||
Name: "dav-files-namespace",
|
||||
Value: "/oc/",
|
||||
Value: "/users/",
|
||||
Usage: "Namespace prefix for the webdav /dav/files endpoint",
|
||||
EnvVars: []string{"DAV_FILES_NAMESPACE"},
|
||||
Destination: &cfg.Reva.OCDav.DavFilesNamespace,
|
||||
@@ -56,29 +56,22 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
|
||||
Name: "network",
|
||||
Value: "tcp",
|
||||
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
|
||||
EnvVars: []string{"STORAGE_FRONTEND_NETWORK"},
|
||||
Destination: &cfg.Reva.Frontend.Network,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "protocol",
|
||||
Value: "http",
|
||||
Usage: "protocol for storage service, can be 'http' or 'grpc'",
|
||||
EnvVars: []string{"STORAGE_FRONTEND_PROTOCOL"},
|
||||
Destination: &cfg.Reva.Frontend.Protocol,
|
||||
EnvVars: []string{"STORAGE_FRONTEND_HTTP_NETWORK"},
|
||||
Destination: &cfg.Reva.Frontend.HTTPNetwork,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "addr",
|
||||
Value: "0.0.0.0:9140",
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_FRONTEND_ADDR"},
|
||||
Destination: &cfg.Reva.Frontend.Addr,
|
||||
EnvVars: []string{"STORAGE_FRONTEND_HTTP_ADDR"},
|
||||
Destination: &cfg.Reva.Frontend.HTTPAddr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "url",
|
||||
Name: "public-url",
|
||||
Value: "https://localhost:9200",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_FRONTEND_URL"},
|
||||
Destination: &cfg.Reva.Frontend.URL,
|
||||
EnvVars: []string{"STORAGE_FRONTEND_PUBLIC_URL"},
|
||||
Destination: &cfg.Reva.Frontend.PublicURL,
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "service",
|
||||
@@ -114,8 +107,8 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
|
||||
Name: "gateway-url",
|
||||
Value: "localhost:9142",
|
||||
Usage: "URL to use for the storage gateway service",
|
||||
EnvVars: []string{"STORAGE_GATEWAY_URL"},
|
||||
Destination: &cfg.Reva.Gateway.URL,
|
||||
EnvVars: []string{"STORAGE_GATEWAY_ENDPOINT"},
|
||||
Destination: &cfg.Reva.Gateway.Endpoint,
|
||||
},
|
||||
|
||||
// Chunking
|
||||
|
||||
+63
-107
@@ -45,29 +45,22 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
|
||||
Name: "network",
|
||||
Value: "tcp",
|
||||
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
|
||||
EnvVars: []string{"STORAGE_GATEWAY_NETWORK"},
|
||||
Destination: &cfg.Reva.Gateway.Network,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "protocol",
|
||||
Value: "grpc",
|
||||
Usage: "protocol for storage service, can be 'http' or 'grpc'",
|
||||
EnvVars: []string{"STORAGE_GATEWAY_PROTOCOL"},
|
||||
Destination: &cfg.Reva.Gateway.Protocol,
|
||||
EnvVars: []string{"STORAGE_GATEWAY_GRPC_NETWORK"},
|
||||
Destination: &cfg.Reva.Gateway.GRPCNetwork,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "addr",
|
||||
Value: "0.0.0.0:9142",
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_GATEWAY_ADDR"},
|
||||
Destination: &cfg.Reva.Gateway.Addr,
|
||||
EnvVars: []string{"STORAGE_GATEWAY_GRPC_ADDR"},
|
||||
Destination: &cfg.Reva.Gateway.GRPCAddr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "url",
|
||||
Name: "endpoint",
|
||||
Value: "localhost:9142",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_GATEWAY_URL"},
|
||||
Destination: &cfg.Reva.Gateway.URL,
|
||||
Usage: "endpoint to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_GATEWAY_ENDPOINT"},
|
||||
Destination: &cfg.Reva.Gateway.Endpoint,
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "service",
|
||||
@@ -107,6 +100,21 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
|
||||
|
||||
// other services
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "auth-basic-endpoint",
|
||||
Value: "localhost:9146",
|
||||
Usage: "endpoint to use for the basic auth provider",
|
||||
EnvVars: []string{"STORAGE_AUTH_BASIC_ENDPOINT"},
|
||||
Destination: &cfg.Reva.AuthBasic.Endpoint,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "auth-bearer-endpoint",
|
||||
Value: "localhost:9148",
|
||||
Usage: "endpoint to use for the bearer auth provider",
|
||||
EnvVars: []string{"STORAGE_AUTH_BEARER_ENDPOINT"},
|
||||
Destination: &cfg.Reva.AuthBearer.Endpoint,
|
||||
},
|
||||
|
||||
// storage registry
|
||||
|
||||
&cli.StringFlag{
|
||||
@@ -127,81 +135,47 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
|
||||
Name: "storage-home-provider",
|
||||
Value: "/home",
|
||||
Usage: "mount point of the storage provider for user homes in the global namespace",
|
||||
EnvVars: []string{"STORAGE_STORAGE_HOME_PROVIDER"},
|
||||
EnvVars: []string{"STORAGE_REGISTRY_HOME_PROVIDER"},
|
||||
Destination: &cfg.Reva.StorageRegistry.HomeProvider,
|
||||
},
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "frontend-url",
|
||||
Name: "public-url",
|
||||
Value: "https://localhost:9200",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_FRONTEND_URL"},
|
||||
Destination: &cfg.Reva.Frontend.URL,
|
||||
EnvVars: []string{"STORAGE_FRONTEND_PUBLIC_URL"},
|
||||
Destination: &cfg.Reva.Frontend.PublicURL,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "datagateway-url",
|
||||
Value: "https://localhost:9200/data",
|
||||
Usage: "URL to use for the storage datagateway",
|
||||
EnvVars: []string{"STORAGE_DATAGATEWAY_URL"},
|
||||
Destination: &cfg.Reva.DataGateway.URL,
|
||||
EnvVars: []string{"STORAGE_DATAGATEWAY_PUBLIC_URL"},
|
||||
Destination: &cfg.Reva.DataGateway.PublicURL,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "users-url",
|
||||
Name: "userprovider-endpoint",
|
||||
Value: "localhost:9144",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_USERS_URL"},
|
||||
Destination: &cfg.Reva.Users.URL,
|
||||
Usage: "endpoint to use for the userprovider",
|
||||
EnvVars: []string{"STORAGE_USERPROVIDER_ENDPOINT"},
|
||||
Destination: &cfg.Reva.Users.Endpoint,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "auth-basic-url",
|
||||
Value: "localhost:9146",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_AUTH_BASIC_URL"},
|
||||
Destination: &cfg.Reva.AuthBasic.URL,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "auth-bearer-url",
|
||||
Value: "localhost:9148",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_AUTH_BEARER_URL"},
|
||||
Destination: &cfg.Reva.AuthBearer.URL,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "sharing-url",
|
||||
Name: "sharing-endpoint",
|
||||
Value: "localhost:9150",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_SHARING_URL"},
|
||||
Destination: &cfg.Reva.Sharing.URL,
|
||||
Usage: "endpoint to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_SHARING_ENDPOINT"},
|
||||
Destination: &cfg.Reva.Sharing.Endpoint,
|
||||
},
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "storage-root-url",
|
||||
Value: "localhost:9152",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_STORAGE_ROOT_URL"},
|
||||
Destination: &cfg.Reva.StorageRoot.URL,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-root-mount-path",
|
||||
Value: "/",
|
||||
Usage: "mount path",
|
||||
EnvVars: []string{"STORAGE_STORAGE_ROOT_MOUNT_PATH"},
|
||||
Destination: &cfg.Reva.StorageRoot.MountPath,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-root-mount-id",
|
||||
Value: "1284d238-aa92-42ce-bdc4-0b0000009152",
|
||||
Usage: "mount id",
|
||||
EnvVars: []string{"STORAGE_STORAGE_ROOT_MOUNT_ID"},
|
||||
Destination: &cfg.Reva.StorageRoot.MountID,
|
||||
},
|
||||
// register home storage
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "storage-home-url",
|
||||
Name: "storage-home-endpoint",
|
||||
Value: "localhost:9154",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_STORAGE_HOME_URL"},
|
||||
Destination: &cfg.Reva.StorageHome.URL,
|
||||
Usage: "endpoint to use for the home storage",
|
||||
EnvVars: []string{"STORAGE_STORAGE_HOME_ENDPOINT"},
|
||||
Destination: &cfg.Reva.StorageHome.Endpoint,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-home-mount-path",
|
||||
@@ -218,60 +192,42 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
|
||||
Destination: &cfg.Reva.StorageHome.MountID,
|
||||
},
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-url",
|
||||
Value: "localhost:9158",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_STORAGE_EOS_URL"},
|
||||
Destination: &cfg.Reva.StorageEOS.URL,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-mount-path",
|
||||
Value: "/eos",
|
||||
Usage: "mount path",
|
||||
EnvVars: []string{"STORAGE_STORAGE_EOS_MOUNT_PATH"},
|
||||
Destination: &cfg.Reva.StorageEOS.MountPath,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-mount-id",
|
||||
Value: "1284d238-aa92-42ce-bdc4-0b0000009158",
|
||||
Usage: "mount id",
|
||||
EnvVars: []string{"STORAGE_STORAGE_EOS_MOUNT_ID"},
|
||||
Destination: &cfg.Reva.StorageEOS.MountID,
|
||||
},
|
||||
// register users storage
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "storage-oc-url",
|
||||
Value: "localhost:9162",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_STORAGE_OC_URL"},
|
||||
Destination: &cfg.Reva.StorageOC.URL,
|
||||
Name: "storage-users-endpoint",
|
||||
Value: "localhost:9157",
|
||||
Usage: "endpoint to use for the users storage",
|
||||
EnvVars: []string{"STORAGE_USERS_ENDPOINT"},
|
||||
Destination: &cfg.Reva.StorageUsers.Endpoint,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-oc-mount-path",
|
||||
Value: "/oc",
|
||||
Name: "storage-users-mount-path",
|
||||
Value: "/users",
|
||||
Usage: "mount path",
|
||||
EnvVars: []string{"STORAGE_STORAGE_OC_MOUNT_PATH"},
|
||||
Destination: &cfg.Reva.StorageOC.MountPath,
|
||||
EnvVars: []string{"STORAGE_USERS_MOUNT_PATH"},
|
||||
Destination: &cfg.Reva.StorageUsers.MountPath,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-oc-mount-id",
|
||||
Value: "1284d238-aa92-42ce-bdc4-0b0000009162",
|
||||
Name: "storage-users-mount-id",
|
||||
Value: "1284d238-aa92-42ce-bdc4-0b0000009157",
|
||||
Usage: "mount id",
|
||||
EnvVars: []string{"STORAGE_STORAGE_OC_MOUNT_ID"},
|
||||
Destination: &cfg.Reva.StorageOC.MountID,
|
||||
EnvVars: []string{"STORAGE_USERS_MOUNT_ID"},
|
||||
Destination: &cfg.Reva.StorageUsers.MountID,
|
||||
},
|
||||
|
||||
// register public link storage
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "public-link-url",
|
||||
Name: "public-link-endpoint",
|
||||
Value: "localhost:9178",
|
||||
Usage: "URL to use for the public links service",
|
||||
EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_URL"},
|
||||
Destination: &cfg.Reva.StoragePublicLink.URL,
|
||||
Usage: "endpoint to use for the public links service",
|
||||
EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_ENDPOINT"},
|
||||
Destination: &cfg.Reva.StoragePublicLink.Endpoint,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-public-link-mount-path",
|
||||
Value: "/public/",
|
||||
Value: "/public",
|
||||
Usage: "mount path",
|
||||
EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_MOUNT_PATH"},
|
||||
Destination: &cfg.Reva.StoragePublicLink.MountPath,
|
||||
|
||||
@@ -26,29 +26,15 @@ func SharingWithConfig(cfg *config.Config) []cli.Flag {
|
||||
Name: "network",
|
||||
Value: "tcp",
|
||||
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
|
||||
EnvVars: []string{"STORAGE_SHARING_NETWORK"},
|
||||
Destination: &cfg.Reva.Sharing.Network,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "protocol",
|
||||
Value: "grpc",
|
||||
Usage: "protocol for storage service, can be 'http' or 'grpc'",
|
||||
EnvVars: []string{"STORAGE_SHARING_PROTOCOL"},
|
||||
Destination: &cfg.Reva.Sharing.Protocol,
|
||||
EnvVars: []string{"STORAGE_SHARING_GRPC_NETWORK"},
|
||||
Destination: &cfg.Reva.Sharing.GRPCNetwork,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "addr",
|
||||
Value: "0.0.0.0:9150",
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_SHARING_ADDR"},
|
||||
Destination: &cfg.Reva.Sharing.Addr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "url",
|
||||
Value: "localhost:9150",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_SHARING_URL"},
|
||||
Destination: &cfg.Reva.Sharing.URL,
|
||||
EnvVars: []string{"STORAGE_SHARING_GRPC_ADDR"},
|
||||
Destination: &cfg.Reva.Sharing.GRPCAddr,
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "service",
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
package flagset
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/storage/pkg/config"
|
||||
)
|
||||
|
||||
// StorageEOSWithConfig applies cfg to the root flagset
|
||||
func StorageEOSWithConfig(cfg *config.Config) []cli.Flag {
|
||||
flags := []cli.Flag{
|
||||
|
||||
// debug ports are the odd ports
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: "0.0.0.0:9159",
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"STORAGE_STORAGE_EOS_DEBUG_ADDR"},
|
||||
Destination: &cfg.Reva.StorageEOS.DebugAddr,
|
||||
},
|
||||
|
||||
// Storage eos
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "network",
|
||||
Value: "tcp",
|
||||
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
|
||||
EnvVars: []string{"STORAGE_STORAGE_EOS_NETWORK"},
|
||||
Destination: &cfg.Reva.StorageEOS.Network,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "protocol",
|
||||
Value: "grpc",
|
||||
Usage: "protocol for storage service, can be 'http' or 'grpc'",
|
||||
EnvVars: []string{"STORAGE_STORAGE_EOS_PROTOCOL"},
|
||||
Destination: &cfg.Reva.StorageEOS.Protocol,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "addr",
|
||||
Value: "0.0.0.0:9158",
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_STORAGE_EOS_ADDR"},
|
||||
Destination: &cfg.Reva.StorageEOS.Addr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "url",
|
||||
Value: "localhost:9158",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_STORAGE_EOS_URL"},
|
||||
Destination: &cfg.Reva.StorageEOS.URL,
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "service",
|
||||
Value: cli.NewStringSlice("storageprovider"),
|
||||
Usage: "--service storageprovider [--service otherservice]",
|
||||
EnvVars: []string{"STORAGE_STORAGE_EOS_SERVICES"},
|
||||
},
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "driver",
|
||||
Value: "eos",
|
||||
Usage: "storage driver for eos mount: eg. local, eos, owncloud, ocis or s3",
|
||||
EnvVars: []string{"STORAGE_STORAGE_EOS_DRIVER"},
|
||||
Destination: &cfg.Reva.StorageEOS.Driver,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "mount-path",
|
||||
Value: "/eos",
|
||||
Usage: "mount path",
|
||||
EnvVars: []string{"STORAGE_STORAGE_EOS_MOUNT_PATH"},
|
||||
Destination: &cfg.Reva.StorageEOS.MountPath,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "mount-id",
|
||||
Value: "1284d238-aa92-42ce-bdc4-0b0000009158",
|
||||
Usage: "mount id",
|
||||
EnvVars: []string{"STORAGE_STORAGE_EOS_MOUNT_ID"},
|
||||
Destination: &cfg.Reva.StorageEOS.MountID,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "expose-data-server",
|
||||
Value: false,
|
||||
Usage: "exposes a dedicated data server",
|
||||
EnvVars: []string{"STORAGE_STORAGE_EOS_EXPOSE_DATA_SERVER"},
|
||||
Destination: &cfg.Reva.StorageEOS.ExposeDataServer,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "data-server-url",
|
||||
Value: "http://localhost:9160/data",
|
||||
Usage: "data server url",
|
||||
EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_SERVER_URL"},
|
||||
Destination: &cfg.Reva.StorageEOS.DataServerURL,
|
||||
},
|
||||
}
|
||||
|
||||
flags = append(flags, TracingWithConfig(cfg)...)
|
||||
flags = append(flags, DebugWithConfig(cfg)...)
|
||||
flags = append(flags, SecretWithConfig(cfg)...)
|
||||
flags = append(flags, DriverEOSWithConfig(cfg)...)
|
||||
flags = append(flags, DriverLocalWithConfig(cfg)...)
|
||||
flags = append(flags, DriverOwnCloudWithConfig(cfg)...)
|
||||
flags = append(flags, DriverOCISWithConfig(cfg)...)
|
||||
|
||||
return flags
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
package flagset
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/storage/pkg/config"
|
||||
)
|
||||
|
||||
// StorageEOSDataWithConfig applies cfg to the root flagset
|
||||
func StorageEOSDataWithConfig(cfg *config.Config) []cli.Flag {
|
||||
flags := []cli.Flag{
|
||||
|
||||
// debug ports are the odd ports
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: "0.0.0.0:9161",
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"STORAGE_STORAGE_OC_DATA_DEBUG_ADDR"},
|
||||
Destination: &cfg.Reva.StorageEOSData.DebugAddr,
|
||||
},
|
||||
|
||||
// Services
|
||||
|
||||
// Storage eos data
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "network",
|
||||
Value: "tcp",
|
||||
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
|
||||
EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_NETWORK"},
|
||||
Destination: &cfg.Reva.StorageEOSData.Network,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "protocol",
|
||||
Value: "http",
|
||||
Usage: "protocol for storage service, can be 'http' or 'grpc'",
|
||||
EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_PROTOCOL"},
|
||||
Destination: &cfg.Reva.StorageEOSData.Protocol,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "addr",
|
||||
Value: "0.0.0.0:9160",
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_ADDR"},
|
||||
Destination: &cfg.Reva.StorageEOSData.Addr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "url",
|
||||
Value: "localhost:9160",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_URL"},
|
||||
Destination: &cfg.Reva.StorageEOSData.URL,
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "service",
|
||||
Value: cli.NewStringSlice("dataprovider"),
|
||||
Usage: "--service dataprovider [--service otherservice]",
|
||||
EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_SERVICES"},
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "driver",
|
||||
Value: "eos",
|
||||
Usage: "storage driver for eos data mount: eg. local, eos, owncloud, ocis or s3",
|
||||
EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_DRIVER"},
|
||||
Destination: &cfg.Reva.StorageEOSData.Driver,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "prefix",
|
||||
Value: "data",
|
||||
Usage: "prefix for the http endpoint, without leading slash",
|
||||
EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_PREFIX"},
|
||||
Destination: &cfg.Reva.StorageEOSData.Prefix,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "temp-folder",
|
||||
Value: "/var/tmp/",
|
||||
Usage: "temp folder",
|
||||
EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_TEMP_FOLDER"},
|
||||
Destination: &cfg.Reva.StorageEOSData.TempFolder,
|
||||
},
|
||||
|
||||
// Gateway
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "gateway-url",
|
||||
Value: "localhost:9142",
|
||||
Usage: "URL to use for the storage gateway service",
|
||||
EnvVars: []string{"STORAGE_GATEWAY_URL"},
|
||||
Destination: &cfg.Reva.Gateway.URL,
|
||||
},
|
||||
|
||||
// User provider
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "users-url",
|
||||
Value: "localhost:9144",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_USERS_URL"},
|
||||
Destination: &cfg.Reva.Users.URL,
|
||||
},
|
||||
}
|
||||
|
||||
flags = append(flags, TracingWithConfig(cfg)...)
|
||||
flags = append(flags, DebugWithConfig(cfg)...)
|
||||
flags = append(flags, SecretWithConfig(cfg)...)
|
||||
flags = append(flags, DriverEOSWithConfig(cfg)...)
|
||||
flags = append(flags, DriverLocalWithConfig(cfg)...)
|
||||
flags = append(flags, DriverOwnCloudWithConfig(cfg)...)
|
||||
flags = append(flags, DriverOCISWithConfig(cfg)...)
|
||||
|
||||
return flags
|
||||
}
|
||||
@@ -12,9 +12,9 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
|
||||
// debug ports are the odd ports
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: "0.0.0.0:9155",
|
||||
Value: "0.0.0.0:9156",
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"STORAGE_STORAGE_HOME_DEBUG_ADDR"},
|
||||
EnvVars: []string{"STORAGE_HOME_DEBUG_ADDR"},
|
||||
Destination: &cfg.Reva.StorageHome.DebugAddr,
|
||||
},
|
||||
|
||||
@@ -23,95 +23,121 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
|
||||
// Storage home
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "network",
|
||||
Name: "grpc-network",
|
||||
Value: "tcp",
|
||||
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
|
||||
EnvVars: []string{"STORAGE_STORAGE_HOME_NETWORK"},
|
||||
Destination: &cfg.Reva.StorageHome.Network,
|
||||
EnvVars: []string{"STORAGE_HOME_GRPC_NETWORK"},
|
||||
Destination: &cfg.Reva.StorageHome.GRPCNetwork,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "protocol",
|
||||
Value: "grpc",
|
||||
Usage: "protocol for storage service, can be 'http' or 'grpc'",
|
||||
EnvVars: []string{"STORAGE_STORAGE_HOME_PROTOCOL"},
|
||||
Destination: &cfg.Reva.StorageHome.Protocol,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "addr",
|
||||
Name: "grpc-addr",
|
||||
Value: "0.0.0.0:9154",
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_STORAGE_HOME_ADDR"},
|
||||
Destination: &cfg.Reva.StorageHome.Addr,
|
||||
EnvVars: []string{"STORAGE_HOME_GRPC_ADDR"},
|
||||
Destination: &cfg.Reva.StorageHome.GRPCAddr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "url",
|
||||
Value: "localhost:9154",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_STORAGE_HOME_URL"},
|
||||
Destination: &cfg.Reva.StorageHome.URL,
|
||||
Name: "http-network",
|
||||
Value: "tcp",
|
||||
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
|
||||
EnvVars: []string{"STORAGE_HOME_HTTP_NETWORK"},
|
||||
Destination: &cfg.Reva.StorageHome.HTTPNetwork,
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "service",
|
||||
Value: cli.NewStringSlice("storageprovider"),
|
||||
Usage: "--service storageprovider [--service otherservice]",
|
||||
EnvVars: []string{"STORAGE_STORAGE_HOME_SERVICES"},
|
||||
&cli.StringFlag{
|
||||
Name: "http-addr",
|
||||
Value: "0.0.0.0:9155",
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_HOME_HTTP_ADDR"},
|
||||
Destination: &cfg.Reva.StorageHome.HTTPAddr,
|
||||
},
|
||||
|
||||
// TODO allow disabling grpc / http services
|
||||
/*
|
||||
&cli.StringSliceFlag{
|
||||
Name: "grpc-service",
|
||||
Value: cli.NewStringSlice("storageprovider"),
|
||||
Usage: "--service storageprovider [--service otherservice]",
|
||||
EnvVars: []string{"STORAGE_HOME_GRPC_SERVICES"},
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "http-service",
|
||||
Value: cli.NewStringSlice("dataprovider"),
|
||||
Usage: "--service dataprovider [--service otherservice]",
|
||||
EnvVars: []string{"STORAGE_HOME_HTTP_SERVICES"},
|
||||
},
|
||||
*/
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "driver",
|
||||
Value: "owncloud",
|
||||
Value: "ocis",
|
||||
Usage: "storage driver for home mount: eg. local, eos, owncloud, ocis or s3",
|
||||
EnvVars: []string{"STORAGE_STORAGE_HOME_DRIVER"},
|
||||
EnvVars: []string{"STORAGE_HOME_DRIVER"},
|
||||
Destination: &cfg.Reva.StorageHome.Driver,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "mount-path",
|
||||
Value: "/home",
|
||||
Usage: "mount path",
|
||||
EnvVars: []string{"STORAGE_STORAGE_HOME_MOUNT_PATH"},
|
||||
EnvVars: []string{"STORAGE_HOME_MOUNT_PATH"},
|
||||
Destination: &cfg.Reva.StorageHome.MountPath,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "mount-id",
|
||||
// This is the mount id of the storage provider using the same storage driver
|
||||
// as /home but withoud home enabled. Set it to
|
||||
// 1284d238-aa92-42ce-bdc4-0b0000009158 for /eos
|
||||
// 1284d238-aa92-42ce-bdc4-0b0000009162 for /oc
|
||||
Value: "1284d238-aa92-42ce-bdc4-0b0000009162", // /oc
|
||||
// as /home but withoud home enabled.
|
||||
Value: "1284d238-aa92-42ce-bdc4-0b0000009157", // /users
|
||||
Usage: "mount id",
|
||||
EnvVars: []string{"STORAGE_STORAGE_HOME_MOUNT_ID"},
|
||||
EnvVars: []string{"STORAGE_HOME_MOUNT_ID"},
|
||||
Destination: &cfg.Reva.StorageHome.MountID,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "expose-data-server",
|
||||
Value: false,
|
||||
Usage: "exposes a dedicated data server",
|
||||
EnvVars: []string{"STORAGE_STORAGE_HOME_EXPOSE_DATA_SERVER"},
|
||||
EnvVars: []string{"STORAGE_HOME_EXPOSE_DATA_SERVER"},
|
||||
Destination: &cfg.Reva.StorageHome.ExposeDataServer,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "data-server-url",
|
||||
Value: "http://localhost:9156/data",
|
||||
Value: "http://localhost:9155/data",
|
||||
Usage: "data server url",
|
||||
EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_SERVER_URL"},
|
||||
EnvVars: []string{"STORAGE_HOME_DATA_SERVER_URL"},
|
||||
Destination: &cfg.Reva.StorageHome.DataServerURL,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "http-prefix",
|
||||
Value: "data",
|
||||
Usage: "prefix for the http endpoint, without leading slash",
|
||||
EnvVars: []string{"STORAGE_HOME_HTTP_PREFIX"},
|
||||
Destination: &cfg.Reva.StorageHome.HTTPPrefix,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "enable-home",
|
||||
Value: true,
|
||||
Usage: "enable the creation of home directories",
|
||||
EnvVars: []string{"STORAGE_STORAGE_HOME_ENABLE_HOME"},
|
||||
EnvVars: []string{"STORAGE_HOME_ENABLE_HOME"},
|
||||
Destination: &cfg.Reva.Storages.Home.EnableHome,
|
||||
},
|
||||
|
||||
// some drivers need to look up users at the gateway
|
||||
|
||||
// Gateway
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "gateway-endpoint",
|
||||
Value: "localhost:9142",
|
||||
Usage: "endpoint to use for the storage gateway service",
|
||||
EnvVars: []string{"STORAGE_GATEWAY_ENDPOINT"},
|
||||
Destination: &cfg.Reva.Gateway.Endpoint,
|
||||
},
|
||||
// User provider
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "users-url",
|
||||
Name: "users-endpoint",
|
||||
Value: "localhost:9144",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_USERS_URL"},
|
||||
Destination: &cfg.Reva.Users.URL,
|
||||
Usage: "endpoint to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_USERPROVIDER_ENDPOINT"},
|
||||
Destination: &cfg.Reva.Users.Endpoint,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
package flagset
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/storage/pkg/config"
|
||||
)
|
||||
|
||||
// StorageHomeDataWithConfig applies cfg to the root flagset
|
||||
func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag {
|
||||
flags := []cli.Flag{
|
||||
|
||||
// debug ports are the odd ports
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: "0.0.0.0:9157",
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_DEBUG_ADDR"},
|
||||
Destination: &cfg.Reva.StorageHomeData.DebugAddr,
|
||||
},
|
||||
|
||||
// Services
|
||||
|
||||
// Storage home data
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "network",
|
||||
Value: "tcp",
|
||||
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
|
||||
EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_NETWORK"},
|
||||
Destination: &cfg.Reva.StorageHomeData.Network,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "protocol",
|
||||
Value: "http",
|
||||
Usage: "protocol for storage service, can be 'http' or 'grpc'",
|
||||
EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_PROTOCOL"},
|
||||
Destination: &cfg.Reva.StorageHomeData.Protocol,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "addr",
|
||||
Value: "0.0.0.0:9156",
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_ADDR"},
|
||||
Destination: &cfg.Reva.StorageHomeData.Addr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "url",
|
||||
Value: "localhost:9156",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_URL"},
|
||||
Destination: &cfg.Reva.StorageHomeData.URL,
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "service",
|
||||
Value: cli.NewStringSlice("dataprovider"),
|
||||
Usage: "--service dataprovider [--service otherservice]",
|
||||
EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_SERVICES"},
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "driver",
|
||||
Value: "owncloud",
|
||||
Usage: "storage driver for home data mount: eg. local, eos, owncloud, ocis or s3",
|
||||
EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_DRIVER"},
|
||||
Destination: &cfg.Reva.StorageHomeData.Driver,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "prefix",
|
||||
Value: "data",
|
||||
Usage: "prefix for the http endpoint, without leading slash",
|
||||
EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_PREFIX"},
|
||||
Destination: &cfg.Reva.StorageHomeData.Prefix,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "temp-folder",
|
||||
Value: "/var/tmp/",
|
||||
Usage: "temp folder",
|
||||
EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_TEMP_FOLDER"},
|
||||
Destination: &cfg.Reva.StorageHomeData.TempFolder,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "enable-home",
|
||||
Value: true,
|
||||
Usage: "enable the creation of home directories",
|
||||
EnvVars: []string{"STORAGE_STORAGE_HOME_ENABLE_HOME"},
|
||||
Destination: &cfg.Reva.Storages.Home.EnableHome,
|
||||
},
|
||||
|
||||
// Gateway
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "gateway-url",
|
||||
Value: "localhost:9142",
|
||||
Usage: "URL to use for the storage gateway service",
|
||||
EnvVars: []string{"STORAGE_GATEWAY_URL"},
|
||||
Destination: &cfg.Reva.Gateway.URL,
|
||||
},
|
||||
|
||||
// User provider
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "users-url",
|
||||
Value: "localhost:9144",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_USERS_URL"},
|
||||
Destination: &cfg.Reva.Users.URL,
|
||||
},
|
||||
}
|
||||
|
||||
flags = append(flags, TracingWithConfig(cfg)...)
|
||||
flags = append(flags, DebugWithConfig(cfg)...)
|
||||
flags = append(flags, SecretWithConfig(cfg)...)
|
||||
flags = append(flags, DriverEOSWithConfig(cfg)...)
|
||||
flags = append(flags, DriverLocalWithConfig(cfg)...)
|
||||
flags = append(flags, DriverOwnCloudWithConfig(cfg)...)
|
||||
flags = append(flags, DriverOCISWithConfig(cfg)...)
|
||||
|
||||
return flags
|
||||
}
|
||||
@@ -12,57 +12,72 @@ func StorageMetadata(cfg *config.Config) []cli.Flag {
|
||||
Name: "debug-addr",
|
||||
Value: "0.0.0.0:9217",
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"STORAGE_STORAGE_METADATA_DEBUG_ADDR"},
|
||||
EnvVars: []string{"STORAGE_METADATA_DEBUG_ADDR"},
|
||||
Destination: &cfg.Reva.StorageMetadata.DebugAddr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "network",
|
||||
Name: "grpc-network",
|
||||
Value: "tcp",
|
||||
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
|
||||
EnvVars: []string{"STORAGE_STORAGE_METADATA_NETWORK"},
|
||||
Destination: &cfg.Reva.StorageMetadata.Network,
|
||||
EnvVars: []string{"STORAGE_METADATA_GRPC_NETWORK"},
|
||||
Destination: &cfg.Reva.StorageMetadata.GRPCNetwork,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "provider-addr",
|
||||
Name: "grpc-addr",
|
||||
Value: "0.0.0.0:9215",
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_STORAGE_METADATA_PROVIDER_ADDR"},
|
||||
Destination: &cfg.Reva.StorageMetadata.Addr,
|
||||
EnvVars: []string{"STORAGE_METADATA_GRPC_PROVIDER_ADDR"},
|
||||
Destination: &cfg.Reva.StorageMetadata.GRPCAddr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "data-server-url",
|
||||
Value: "http://localhost:9216",
|
||||
Usage: "URL of the data-server the storage-provider uses",
|
||||
EnvVars: []string{"STORAGE_STORAGE_METADATA_DATA_SERVER_URL"},
|
||||
Usage: "URL of the data-provider the storage-provider uses",
|
||||
EnvVars: []string{"STORAGE_METADATA_DATA_SERVER_URL"},
|
||||
Destination: &cfg.Reva.StorageMetadata.DataServerURL,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "data-server-addr",
|
||||
Value: "0.0.0.0:9216",
|
||||
Usage: "Address to bind the metadata data-server to",
|
||||
EnvVars: []string{"STORAGE_STORAGE_METADATA_DATA_SERVER_ADDR"},
|
||||
Destination: &cfg.Reva.StorageMetadataData.Addr,
|
||||
Name: "http-network",
|
||||
Value: "tcp",
|
||||
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
|
||||
EnvVars: []string{"STORAGE_METADATA_HTTP_NETWORK"},
|
||||
Destination: &cfg.Reva.StorageMetadata.HTTPNetwork,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-provider-driver",
|
||||
Value: "local",
|
||||
Name: "http-addr",
|
||||
Value: "0.0.0.0:9216",
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_METADATA_HTTP_ADDR"},
|
||||
Destination: &cfg.Reva.StorageMetadata.HTTPAddr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "driver",
|
||||
Value: "ocis",
|
||||
Usage: "storage driver for metadata mount: eg. local, eos, owncloud, ocis or s3",
|
||||
EnvVars: []string{"STORAGE_STORAGE_METADATA_PROVIDER_DRIVER"},
|
||||
EnvVars: []string{"STORAGE_METADATA_DRIVER"},
|
||||
Destination: &cfg.Reva.StorageMetadata.Driver,
|
||||
},
|
||||
|
||||
// some drivers need to look up users at the gateway
|
||||
|
||||
// Gateway
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "data-provider-driver",
|
||||
Value: "local",
|
||||
Usage: "storage driver for data-provider mount: eg. local, eos, owncloud, ocis or s3",
|
||||
EnvVars: []string{"STORAGE_STORAGE_METADATA_DATA_PROVIDER_DRIVER"},
|
||||
Destination: &cfg.Reva.StorageMetadataData.Driver,
|
||||
Name: "gateway-endpoint",
|
||||
Value: "localhost:9142",
|
||||
Usage: "endpoint to use for the gateway service",
|
||||
EnvVars: []string{"STORAGE_GATEWAY_ENDPOINT"},
|
||||
Destination: &cfg.Reva.Gateway.Endpoint,
|
||||
},
|
||||
|
||||
// User provider
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "storage-root",
|
||||
Value: "/var/tmp/ocis/metadata",
|
||||
Usage: "the path to the metadata storage root",
|
||||
EnvVars: []string{"STORAGE_STORAGE_METADATA_ROOT"},
|
||||
Destination: &cfg.Reva.Storages.Common.Root,
|
||||
Name: "userprovider-endpoint",
|
||||
Value: "localhost:9144",
|
||||
Usage: "endpoint to use for the userprovider service",
|
||||
EnvVars: []string{"STORAGE_USERPROVIDER_ENDPOINT"},
|
||||
Destination: &cfg.Reva.Users.Endpoint,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -73,7 +88,15 @@ func StorageMetadata(cfg *config.Config) []cli.Flag {
|
||||
flags = append(flags, DriverLocalWithConfig(cfg)...)
|
||||
flags = append(flags, DriverOwnCloudWithConfig(cfg)...)
|
||||
flags = append(flags, DriverOCISWithConfig(cfg)...)
|
||||
|
||||
flags = append(flags,
|
||||
&cli.StringFlag{
|
||||
Name: "storage-root",
|
||||
Value: "/var/tmp/ocis/metadata",
|
||||
Usage: "the path to the metadata storage root",
|
||||
EnvVars: []string{"STORAGE_METADATA_ROOT"},
|
||||
Destination: &cfg.Reva.Storages.Common.Root,
|
||||
},
|
||||
)
|
||||
return flags
|
||||
|
||||
}
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
package flagset
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/storage/pkg/config"
|
||||
)
|
||||
|
||||
// StorageOCWithConfig applies cfg to the root flagset
|
||||
func StorageOCWithConfig(cfg *config.Config) []cli.Flag {
|
||||
flags := []cli.Flag{
|
||||
|
||||
// debug ports are the odd ports
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: "0.0.0.0:9163",
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"STORAGE_STORAGE_OC_DEBUG_ADDR"},
|
||||
Destination: &cfg.Reva.StorageOC.DebugAddr,
|
||||
},
|
||||
|
||||
// Services
|
||||
|
||||
// Storage oc
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "network",
|
||||
Value: "tcp",
|
||||
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
|
||||
EnvVars: []string{"STORAGE_STORAGE_OC_NETWORK"},
|
||||
Destination: &cfg.Reva.StorageOC.Network,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "protocol",
|
||||
Value: "grpc",
|
||||
Usage: "protocol for storage service, can be 'http' or 'grpc'",
|
||||
EnvVars: []string{"STORAGE_STORAGE_OC_PROTOCOL"},
|
||||
Destination: &cfg.Reva.StorageOC.Protocol,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "addr",
|
||||
Value: "0.0.0.0:9162",
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_STORAGE_OC_ADDR"},
|
||||
Destination: &cfg.Reva.StorageOC.Addr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "url",
|
||||
Value: "localhost:9162",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_STORAGE_OC_URL"},
|
||||
Destination: &cfg.Reva.StorageOC.URL,
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "service",
|
||||
Value: cli.NewStringSlice("storageprovider"),
|
||||
Usage: "--service storageprovider [--service otherservice]",
|
||||
EnvVars: []string{"STORAGE_STORAGE_OC_SERVICES"},
|
||||
},
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "driver",
|
||||
Value: "owncloud",
|
||||
Usage: "storage driver for oc mount: eg. local, eos, owncloud, ocis or s3",
|
||||
EnvVars: []string{"STORAGE_STORAGE_OC_DRIVER"},
|
||||
Destination: &cfg.Reva.StorageOC.Driver,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "mount-path",
|
||||
Value: "/oc",
|
||||
Usage: "mount path",
|
||||
EnvVars: []string{"STORAGE_STORAGE_OC_MOUNT_PATH"},
|
||||
Destination: &cfg.Reva.StorageOC.MountPath,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "mount-id",
|
||||
Value: "1284d238-aa92-42ce-bdc4-0b0000009162",
|
||||
Usage: "mount id",
|
||||
EnvVars: []string{"STORAGE_STORAGE_OC_MOUNT_ID"},
|
||||
Destination: &cfg.Reva.StorageOC.MountID,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "expose-data-server",
|
||||
Value: false,
|
||||
Usage: "exposes a dedicated data server",
|
||||
EnvVars: []string{"STORAGE_STORAGE_OC_EXPOSE_DATA_SERVER"},
|
||||
Destination: &cfg.Reva.StorageOC.ExposeDataServer,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "data-server-url",
|
||||
Value: "http://localhost:9164/data",
|
||||
Usage: "data server url",
|
||||
EnvVars: []string{"STORAGE_STORAGE_OC_DATA_SERVER_URL"},
|
||||
Destination: &cfg.Reva.StorageOC.DataServerURL,
|
||||
},
|
||||
|
||||
// User provider
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "users-url",
|
||||
Value: "localhost:9144",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_USERS_URL"},
|
||||
Destination: &cfg.Reva.Users.URL,
|
||||
},
|
||||
}
|
||||
|
||||
flags = append(flags, TracingWithConfig(cfg)...)
|
||||
flags = append(flags, DebugWithConfig(cfg)...)
|
||||
flags = append(flags, SecretWithConfig(cfg)...)
|
||||
flags = append(flags, DriverEOSWithConfig(cfg)...)
|
||||
flags = append(flags, DriverLocalWithConfig(cfg)...)
|
||||
flags = append(flags, DriverOwnCloudWithConfig(cfg)...)
|
||||
flags = append(flags, DriverOCISWithConfig(cfg)...)
|
||||
|
||||
return flags
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
package flagset
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/storage/pkg/config"
|
||||
)
|
||||
|
||||
// StorageOCDataWithConfig applies cfg to the root flagset
|
||||
func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag {
|
||||
flags := []cli.Flag{
|
||||
|
||||
// debug ports are the odd ports
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: "0.0.0.0:9165",
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"STORAGE_STORAGE_OC_DATA_DEBUG_ADDR"},
|
||||
Destination: &cfg.Reva.StorageOCData.DebugAddr,
|
||||
},
|
||||
|
||||
// Services
|
||||
|
||||
// Storage oc data
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "network",
|
||||
Value: "tcp",
|
||||
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
|
||||
EnvVars: []string{"STORAGE_STORAGE_OC_DATA_NETWORK"},
|
||||
Destination: &cfg.Reva.StorageOCData.Network,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "protocol",
|
||||
Value: "http",
|
||||
Usage: "protocol for storage service, can be 'http' or 'grpc'",
|
||||
EnvVars: []string{"STORAGE_STORAGE_OC_DATA_PROTOCOL"},
|
||||
Destination: &cfg.Reva.StorageOCData.Protocol,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "addr",
|
||||
Value: "0.0.0.0:9164",
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_STORAGE_OC_DATA_ADDR"},
|
||||
Destination: &cfg.Reva.StorageOCData.Addr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "url",
|
||||
Value: "localhost:9164",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_STORAGE_OC_DATA_URL"},
|
||||
Destination: &cfg.Reva.StorageOCData.URL,
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "service",
|
||||
Value: cli.NewStringSlice("dataprovider"),
|
||||
Usage: "--service dataprovider [--service otherservice]",
|
||||
EnvVars: []string{"STORAGE_STORAGE_OC_DATA_SERVICES"},
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "driver",
|
||||
Value: "owncloud",
|
||||
Usage: "storage driver for oc data mount: eg. local, eos, owncloud, ocis or s3",
|
||||
EnvVars: []string{"STORAGE_STORAGE_OC_DATA_DRIVER"},
|
||||
Destination: &cfg.Reva.StorageOCData.Driver,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "prefix",
|
||||
Value: "data",
|
||||
Usage: "prefix for the http endpoint, without leading slash",
|
||||
EnvVars: []string{"STORAGE_STORAGE_OC_DATA_PREFIX"},
|
||||
Destination: &cfg.Reva.StorageOCData.Prefix,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "temp-folder",
|
||||
Value: "/var/tmp/",
|
||||
Usage: "temp folder",
|
||||
EnvVars: []string{"STORAGE_STORAGE_OC_DATA_TEMP_FOLDER"},
|
||||
Destination: &cfg.Reva.StorageOCData.TempFolder,
|
||||
},
|
||||
|
||||
// Gateway
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "gateway-url",
|
||||
Value: "localhost:9142",
|
||||
Usage: "URL to use for the storage gateway service",
|
||||
EnvVars: []string{"STORAGE_GATEWAY_URL"},
|
||||
Destination: &cfg.Reva.Gateway.URL,
|
||||
},
|
||||
|
||||
// User provider
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "users-url",
|
||||
Value: "localhost:9144",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_USERS_URL"},
|
||||
Destination: &cfg.Reva.Users.URL,
|
||||
},
|
||||
}
|
||||
|
||||
flags = append(flags, TracingWithConfig(cfg)...)
|
||||
flags = append(flags, DebugWithConfig(cfg)...)
|
||||
flags = append(flags, SecretWithConfig(cfg)...)
|
||||
flags = append(flags, DriverEOSWithConfig(cfg)...)
|
||||
flags = append(flags, DriverLocalWithConfig(cfg)...)
|
||||
flags = append(flags, DriverOwnCloudWithConfig(cfg)...)
|
||||
flags = append(flags, DriverOCISWithConfig(cfg)...)
|
||||
|
||||
return flags
|
||||
}
|
||||
@@ -13,7 +13,7 @@ func StoragePublicLink(cfg *config.Config) []cli.Flag {
|
||||
Name: "debug-addr",
|
||||
Value: "0.0.0.0:9179",
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_DEBUG_ADDR"},
|
||||
EnvVars: []string{"STORAGE_PUBLIC_LINK_DEBUG_ADDR"},
|
||||
Destination: &cfg.Reva.StoragePublicLink.DebugAddr,
|
||||
},
|
||||
|
||||
@@ -21,45 +21,31 @@ func StoragePublicLink(cfg *config.Config) []cli.Flag {
|
||||
Name: "network",
|
||||
Value: "tcp",
|
||||
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
|
||||
EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_NETWORK"},
|
||||
Destination: &cfg.Reva.StoragePublicLink.Network,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "protocol",
|
||||
Value: "grpc",
|
||||
Usage: "protocol for storage service, can be 'http' or 'grpc'",
|
||||
EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_PROTOCOL"},
|
||||
Destination: &cfg.Reva.StoragePublicLink.Protocol,
|
||||
EnvVars: []string{"STORAGE_PUBLIC_LINK_GRPC_NETWORK"},
|
||||
Destination: &cfg.Reva.StoragePublicLink.GRPCNetwork,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "addr",
|
||||
Value: "0.0.0.0:9178",
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_ADDR"},
|
||||
Destination: &cfg.Reva.StoragePublicLink.Addr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "url",
|
||||
Value: "localhost:9178",
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_URL"},
|
||||
Destination: &cfg.Reva.StoragePublicLink.URL,
|
||||
EnvVars: []string{"STORAGE_PUBLIC_LINK_GRPC_ADDR"},
|
||||
Destination: &cfg.Reva.StoragePublicLink.GRPCAddr,
|
||||
},
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "mount-path",
|
||||
Value: "/public/",
|
||||
Value: "/public",
|
||||
Usage: "mount path",
|
||||
EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_MOUNT_PATH"},
|
||||
EnvVars: []string{"STORAGE_PUBLIC_LINK_MOUNT_PATH"},
|
||||
Destination: &cfg.Reva.StoragePublicLink.MountPath,
|
||||
},
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "gateway-url",
|
||||
Name: "gateway-endpoint",
|
||||
Value: "localhost:9142",
|
||||
Usage: "URL to use for the storage gateway service",
|
||||
EnvVars: []string{"STORAGE_GATEWAY_URL"},
|
||||
Destination: &cfg.Reva.Gateway.URL,
|
||||
Usage: "endpoint to use for the storage gateway service",
|
||||
EnvVars: []string{"STORAGE_GATEWAY_ENDPOINT"},
|
||||
Destination: &cfg.Reva.Gateway.Endpoint,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -1,105 +0,0 @@
|
||||
package flagset
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/storage/pkg/config"
|
||||
)
|
||||
|
||||
// StorageRootWithConfig applies cfg to the root flagset
|
||||
func StorageRootWithConfig(cfg *config.Config) []cli.Flag {
|
||||
flags := []cli.Flag{
|
||||
|
||||
// debug ports are the odd ports
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: "0.0.0.0:9153",
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"STORAGE_STORAGE_ROOT_DEBUG_ADDR"},
|
||||
Destination: &cfg.Reva.StorageRoot.DebugAddr,
|
||||
},
|
||||
|
||||
// Services
|
||||
|
||||
// Storage root
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "network",
|
||||
Value: "tcp",
|
||||
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
|
||||
EnvVars: []string{"STORAGE_STORAGE_ROOT_NETWORK"},
|
||||
Destination: &cfg.Reva.StorageRoot.Network,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "protocol",
|
||||
Value: "grpc",
|
||||
Usage: "protocol for storage service, can be 'http' or 'grpc'",
|
||||
EnvVars: []string{"STORAGE_STORAGE_ROOT_PROTOCOL"},
|
||||
Destination: &cfg.Reva.StorageRoot.Protocol,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "addr",
|
||||
Value: "0.0.0.0:9152",
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_STORAGE_ROOT_ADDR"},
|
||||
Destination: &cfg.Reva.StorageRoot.Addr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "url",
|
||||
Value: "localhost:9152",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_STORAGE_ROOT_URL"},
|
||||
Destination: &cfg.Reva.StorageRoot.URL,
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "service",
|
||||
Value: cli.NewStringSlice("storageprovider"),
|
||||
Usage: "--service storageprovider [--service otherservice]",
|
||||
EnvVars: []string{"STORAGE_STORAGE_ROOT_SERVICES"},
|
||||
},
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "driver",
|
||||
Value: "local",
|
||||
Usage: "storage driver for root mount: eg. local, eos, owncloud, ocis or s3",
|
||||
EnvVars: []string{"STORAGE_STORAGE_ROOT_DRIVER"},
|
||||
Destination: &cfg.Reva.StorageRoot.Driver,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "mount-path",
|
||||
Value: "/",
|
||||
Usage: "mount path",
|
||||
EnvVars: []string{"STORAGE_STORAGE_ROOT_MOUNT_PATH"},
|
||||
Destination: &cfg.Reva.StorageRoot.MountPath,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "mount-id",
|
||||
Value: "123e4567-e89b-12d3-a456-426655440001",
|
||||
Usage: "mount id",
|
||||
EnvVars: []string{"STORAGE_STORAGE_ROOT_MOUNT_ID"},
|
||||
Destination: &cfg.Reva.StorageRoot.MountID,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "expose-data-server",
|
||||
Usage: "exposes a dedicated data server",
|
||||
EnvVars: []string{"STORAGE_STORAGE_ROOT_EXPOSE_DATA_SERVER"},
|
||||
Destination: &cfg.Reva.StorageRoot.ExposeDataServer,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "data-server-url",
|
||||
Value: "",
|
||||
Usage: "data server url",
|
||||
EnvVars: []string{"STORAGE_STORAGE_ROOT_DATA_SERVER_URL"},
|
||||
Destination: &cfg.Reva.StorageRoot.DataServerURL,
|
||||
},
|
||||
}
|
||||
|
||||
flags = append(flags, TracingWithConfig(cfg)...)
|
||||
flags = append(flags, DebugWithConfig(cfg)...)
|
||||
flags = append(flags, SecretWithConfig(cfg)...)
|
||||
flags = append(flags, DriverEOSWithConfig(cfg)...)
|
||||
flags = append(flags, DriverLocalWithConfig(cfg)...)
|
||||
flags = append(flags, DriverOwnCloudWithConfig(cfg)...)
|
||||
flags = append(flags, DriverOCISWithConfig(cfg)...)
|
||||
|
||||
return flags
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
package flagset
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/storage/pkg/config"
|
||||
)
|
||||
|
||||
// StorageUsersWithConfig applies cfg to the root flagset
|
||||
func StorageUsersWithConfig(cfg *config.Config) []cli.Flag {
|
||||
flags := []cli.Flag{
|
||||
|
||||
// debug ports are the odd ports
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: "0.0.0.0:9159",
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"STORAGE_USERS_DEBUG_ADDR"},
|
||||
Destination: &cfg.Reva.StorageUsers.DebugAddr,
|
||||
},
|
||||
|
||||
// Services
|
||||
|
||||
// Storage home
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "grpc-network",
|
||||
Value: "tcp",
|
||||
Usage: "Network to use for the users storage, can be 'tcp', 'udp' or 'unix'",
|
||||
EnvVars: []string{"STORAGE_USERS_GRPC_NETWORK"},
|
||||
Destination: &cfg.Reva.StorageUsers.GRPCNetwork,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "grpc-addr",
|
||||
Value: "0.0.0.0:9157",
|
||||
Usage: "GRPC Address to bind users storage",
|
||||
EnvVars: []string{"STORAGE_USERS_GRPC_ADDR"},
|
||||
Destination: &cfg.Reva.StorageUsers.GRPCAddr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "http-network",
|
||||
Value: "tcp",
|
||||
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
|
||||
EnvVars: []string{"STORAGE_USERS_HTTP_NETWORK"},
|
||||
Destination: &cfg.Reva.StorageUsers.HTTPNetwork,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "http-addr",
|
||||
Value: "0.0.0.0:9158",
|
||||
Usage: "HTTP Address to bind users storage",
|
||||
EnvVars: []string{"STORAGE_USERS_HTTP_ADDR"},
|
||||
Destination: &cfg.Reva.StorageUsers.HTTPAddr,
|
||||
},
|
||||
// TODO allow disabling grpc / http services
|
||||
/*
|
||||
&cli.StringSliceFlag{
|
||||
Name: "grpc-service",
|
||||
Value: cli.NewStringSlice("storageprovider"),
|
||||
Usage: "--service storageprovider [--service otherservice]",
|
||||
EnvVars: []string{"STORAGE_USERS_GRPC_SERVICES"},
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "http-service",
|
||||
Value: cli.NewStringSlice("dataprovider"),
|
||||
Usage: "--service dataprovider [--service otherservice]",
|
||||
EnvVars: []string{"STORAGE_USERS_HTTP_SERVICES"},
|
||||
},
|
||||
*/
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "driver",
|
||||
Value: "ocis",
|
||||
Usage: "storage driver for users mount: eg. local, eos, owncloud, ocis or s3",
|
||||
EnvVars: []string{"STORAGE_USERS_DRIVER"},
|
||||
Destination: &cfg.Reva.StorageUsers.Driver,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "mount-path",
|
||||
Value: "/users",
|
||||
Usage: "mount path",
|
||||
EnvVars: []string{"STORAGE_USERS_MOUNT_PATH"},
|
||||
Destination: &cfg.Reva.StorageUsers.MountPath,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "mount-id",
|
||||
Value: "1284d238-aa92-42ce-bdc4-0b0000009157", // /users
|
||||
Usage: "mount id",
|
||||
EnvVars: []string{"STORAGE_USERS_MOUNT_ID"},
|
||||
Destination: &cfg.Reva.StorageUsers.MountID,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "expose-data-server",
|
||||
Value: false,
|
||||
Usage: "exposes a dedicated data server",
|
||||
EnvVars: []string{"STORAGE_USERS_EXPOSE_DATA_SERVER"},
|
||||
Destination: &cfg.Reva.StorageUsers.ExposeDataServer,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "data-server-url",
|
||||
Value: "http://localhost:9158/data",
|
||||
Usage: "data server url",
|
||||
EnvVars: []string{"STORAGE_USERS_DATA_SERVER_URL"},
|
||||
Destination: &cfg.Reva.StorageUsers.DataServerURL,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "http-prefix",
|
||||
Value: "data",
|
||||
Usage: "prefix for the http endpoint, without leading slash",
|
||||
EnvVars: []string{"STORAGE_USERS_HTTP_PREFIX"},
|
||||
Destination: &cfg.Reva.StorageUsers.HTTPPrefix,
|
||||
},
|
||||
|
||||
// some drivers need to look up users at the gateway
|
||||
|
||||
// Gateway
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "gateway-endpoint",
|
||||
Value: "localhost:9142",
|
||||
Usage: "endpoint to use for the storage gateway service",
|
||||
EnvVars: []string{"STORAGE_GATEWAY_ENDPOINT"},
|
||||
Destination: &cfg.Reva.Gateway.Endpoint,
|
||||
},
|
||||
// User provider
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "users-endpoint",
|
||||
Value: "localhost:9144",
|
||||
Usage: "endpoint to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_USERPROVIDER_ENDPOINT"},
|
||||
Destination: &cfg.Reva.Users.Endpoint,
|
||||
},
|
||||
}
|
||||
|
||||
flags = append(flags, TracingWithConfig(cfg)...)
|
||||
flags = append(flags, DebugWithConfig(cfg)...)
|
||||
flags = append(flags, SecretWithConfig(cfg)...)
|
||||
flags = append(flags, DriverEOSWithConfig(cfg)...)
|
||||
flags = append(flags, DriverLocalWithConfig(cfg)...)
|
||||
flags = append(flags, DriverOwnCloudWithConfig(cfg)...)
|
||||
flags = append(flags, DriverOCISWithConfig(cfg)...)
|
||||
|
||||
return flags
|
||||
}
|
||||
@@ -20,55 +20,48 @@ func UsersWithConfig(cfg *config.Config) []cli.Flag {
|
||||
|
||||
// Services
|
||||
|
||||
// Users
|
||||
// Userprovider
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "network",
|
||||
Value: "tcp",
|
||||
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
|
||||
EnvVars: []string{"STORAGE_USERS_NETWORK"},
|
||||
Destination: &cfg.Reva.Users.Network,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "protocol",
|
||||
Value: "grpc",
|
||||
Usage: "protocol for storage service, can be 'http' or 'grpc'",
|
||||
EnvVars: []string{"STORAGE_USERS_PROTOCOL"},
|
||||
Destination: &cfg.Reva.Users.Protocol,
|
||||
EnvVars: []string{"STORAGE_USERPROVIDER_NETWORK"},
|
||||
Destination: &cfg.Reva.Users.GRPCNetwork,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "addr",
|
||||
Value: "0.0.0.0:9144",
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_USERS_ADDR"},
|
||||
Destination: &cfg.Reva.Users.Addr,
|
||||
EnvVars: []string{"STORAGE_USERPROVIDER_ADDR"},
|
||||
Destination: &cfg.Reva.Users.GRPCAddr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "url",
|
||||
Name: "endpoint",
|
||||
Value: "localhost:9144",
|
||||
Usage: "URL to use for the storage service",
|
||||
EnvVars: []string{"STORAGE_USERS_URL"},
|
||||
Destination: &cfg.Reva.Users.URL,
|
||||
EnvVars: []string{"STORAGE_USERPROVIDER_ENDPOINT"},
|
||||
Destination: &cfg.Reva.Users.Endpoint,
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "service",
|
||||
Value: cli.NewStringSlice("userprovider"), // TODO preferences
|
||||
Usage: "--service userprovider [--service otherservice]",
|
||||
EnvVars: []string{"STORAGE_USERS_SERVICES"},
|
||||
EnvVars: []string{"STORAGE_USERPROVIDER_SERVICES"},
|
||||
},
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "driver",
|
||||
Value: "ldap",
|
||||
Usage: "user driver: 'demo', 'json', 'ldap', or 'rest'",
|
||||
EnvVars: []string{"STORAGE_USERS_DRIVER"},
|
||||
EnvVars: []string{"STORAGE_USERPROVIDER_DRIVER"},
|
||||
Destination: &cfg.Reva.Users.Driver,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "json-config",
|
||||
Value: "",
|
||||
Usage: "Path to users.json file",
|
||||
EnvVars: []string{"STORAGE_USERS_JSON"},
|
||||
EnvVars: []string{"STORAGE_USERPROVIDER_JSON"},
|
||||
Destination: &cfg.Reva.Users.JSON,
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user