Merge pull request #53 from owncloud/micro/cli-upgrade

updgrade the micro/cli dependency
This commit is contained in:
Jörn Friedrich Dreyer
2020-01-28 20:25:17 +01:00
committed by GitHub
37 changed files with 531 additions and 741 deletions
-29
View File
@@ -32,17 +32,6 @@ def testing(ctx):
'arch': 'amd64',
},
'steps': [
{
'name': 'frontend',
'image': 'webhippie/nodejs:latest',
'pull': 'always',
'commands': [
'yarn install --frozen-lockfile',
'yarn lint',
'yarn test',
'yarn build',
],
},
{
'name': 'generate',
'image': 'webhippie/golang:1.13',
@@ -163,15 +152,6 @@ def docker(ctx, arch):
'arch': arch,
},
'steps': [
{
'name': 'frontend',
'image': 'webhippie/nodejs:latest',
'pull': 'always',
'commands': [
'yarn install --frozen-lockfile',
'yarn build',
],
},
{
'name': 'generate',
'image': 'webhippie/golang:1.13',
@@ -310,15 +290,6 @@ def binary(ctx, name):
'arch': 'amd64',
},
'steps': [
{
'name': 'frontend',
'image': 'webhippie/nodejs:latest',
'pull': 'always',
'commands': [
'yarn install --frozen-lockfile',
'yarn build',
],
},
{
'name': 'generate',
'image': 'webhippie/golang:1.13',
+1 -1
View File
@@ -20,7 +20,7 @@ endif
PACKAGES ?= $(shell go list ./...)
SOURCES ?= $(shell find . -name "*.go" -type f -not -path "./node_modules/*")
GENERATE ?= $(IMPORT)/pkg/assets
GENERATE ?= $(PACKAGES)
TAGS ?=
+2 -2
View File
@@ -34,7 +34,7 @@ export REVA_USERS_DRIVER=ldap
If the below defaults don't match your environment change them accordingly:
```
export REVA_LDAP_HOSTNAME=localhost
export REVA_LDAP_PORT=389
export REVA_LDAP_PORT=636
export REVA_LDAP_BASE_DN='dc=owncloud,dc=com'
export REVA_LDAP_USERFILTER='(&(objectclass=posixAccount)(cn=%s))'
export REVA_LDAP_GROUPFILTER='(&(objectclass=posixGroup)(cn=%s))'
@@ -46,4 +46,4 @@ export REVA_LDAP_SCHEMA_DISPLAYNAME=displayName
export REVA_LDAP_SCHEMA_CN=cn
```
Then restart the `bin/ocis-reva users` and `bin/ocis-reva auth-basic` services for the changes to take effect.
Then restart the `bin/ocis-reva users` and `bin/ocis-reva auth-basic` services for the changes to take effect.
+2 -2
View File
@@ -9,7 +9,7 @@ require (
github.com/go-log/log v0.2.0 // indirect
github.com/gofrs/uuid v3.2.0+incompatible
github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9 // indirect
github.com/micro/cli v0.2.0
github.com/micro/cli/v2 v2.1.1
github.com/micro/go-micro v1.18.0 // indirect
github.com/oklog/run v1.0.0
github.com/owncloud/ocis-pkg v1.2.1-0.20191217084055-eab942498596
@@ -21,7 +21,7 @@ require (
github.com/spf13/viper v1.6.1
github.com/uber/jaeger-client-go v2.20.1+incompatible // indirect
golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876 // indirect
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 // indirect
golang.org/x/sys v0.0.0-20200103143344-a1369afcdac7 // indirect
google.golang.org/api v0.14.0 // indirect
google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb // indirect
+23
View File
@@ -13,6 +13,7 @@ contrib.go.opencensus.io/exporter/jaeger v0.2.0 h1:nhTv/Ry3lGmqbJ/JGvCjWxBl5ozRf
contrib.go.opencensus.io/exporter/jaeger v0.2.0/go.mod h1:ukdzwIYYHgZ7QYtwVFQUjiT28BJHiMhTERo32s6qVgM=
contrib.go.opencensus.io/exporter/ocagent v0.4.12/go.mod h1:450APlNTSR6FrvC3CTRqYosuDstRB9un7SOx2k/9ckA=
contrib.go.opencensus.io/exporter/ocagent v0.5.0/go.mod h1:ImxhfLRpxoYiSq891pBrLVhN+qmP8BTVvdH2YLs7Gl0=
contrib.go.opencensus.io/exporter/prometheus v0.1.0 h1:SByaIoWwNgMdPSgl5sMqM2KDE5H/ukPWBRo314xiDvg=
contrib.go.opencensus.io/exporter/prometheus v0.1.0/go.mod h1:cGFniUXGZlKRjzOyuZJ6mgB+PgBcCIa79kEKR8YCW+A=
contrib.go.opencensus.io/exporter/stackdriver v0.12.1/go.mod h1:iwB6wGarfphGGe/e5CWqyUk/cLzKnWsOKPVW3no6OTw=
contrib.go.opencensus.io/integrations/ocsql v0.1.4/go.mod h1:8DsSdjz3F+APR+0z0WkU1aRorQCFfRxvqjUUPMbF3fE=
@@ -85,6 +86,7 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
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 h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA=
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/ascarter/requestid v0.0.0-20170313220838-5b76ab3d4aee h1:3T/l+vMotQ7cDSLWNAn2Vg1SAQ3mdyLgBWWBitSS3uU=
github.com/ascarter/requestid v0.0.0-20170313220838-5b76ab3d4aee/go.mod h1:u7Wtt4WATGGgae9mURNGQQqxAudPKrxfsbSDSGOso+g=
@@ -149,6 +151,7 @@ github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkE
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/etcd v3.3.17+incompatible h1:f/Z3EoDSx1yjaIjLQGo1diYUlQYSBrrAQ5vP8NjwXwo=
github.com/coreos/etcd v3.3.17+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM=
github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc=
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM=
@@ -159,6 +162,7 @@ github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cpu/goacmedns v0.0.1/go.mod h1:sesf/pNnCYwUevQEQfEwY0Y3DydlQWSGZbaMElOWxok=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/cs3org/go-cs3apis v0.0.0-20191128165347-19746c015c83 h1:9bcp1jc6+36XUfuOae/w0BVrbzeVKBp/OqhTfCal40U=
@@ -282,6 +286,7 @@ github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/gomodule/redigo v2.0.0+incompatible h1:K/R+8tc58AaqLkqG2Ol3Qk+DR/TlNuhuh457pBFPtt0=
github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
@@ -387,6 +392,7 @@ github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03/go.mod h1:MK8+TM0
github.com/jedib0t/go-pretty v4.3.0+incompatible/go.mod h1:XemHduiw8R651AF9Pt4FwCTKeG3oo7hrHJAoznj9nag=
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM=
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=
@@ -462,6 +468,8 @@ github.com/mholt/certmagic v0.7.5/go.mod h1:91uJzK5K8IWtYQqTi5R2tsxV1pCde+wdGfaR
github.com/mholt/certmagic v0.8.3/go.mod h1:91uJzK5K8IWtYQqTi5R2tsxV1pCde+wdGfaRaOZi6aQ=
github.com/micro/cli v0.2.0 h1:ut3rV5JWqZjsXIa2MvGF+qMUP8DAUTvHX9Br5gO4afA=
github.com/micro/cli v0.2.0/go.mod h1:jRT9gmfVKWSS6pkKcXQ8YhUyj6bzwxK8Fp5b0Y7qNnk=
github.com/micro/cli/v2 v2.1.1 h1:uFw0SMIKmGuyHIm8lXns/NOn7V62bM5y7DnlxUM+BEQ=
github.com/micro/cli/v2 v2.1.1/go.mod h1:EguNh6DAoWKm9nmk+k/Rg0H3lQnDxqzu5x5srOtGtYg=
github.com/micro/go-micro v1.16.0/go.mod h1:A0F58bHLh2m0LAI9QyhvmbN8c1cxhAZo3cM6s+iDsrM=
github.com/micro/go-micro v1.17.1/go.mod h1:klwUJL1gkdY1MHFyz+fFJXn52dKcty4hoe95Mp571AA=
github.com/micro/go-micro v1.18.0 h1:gP70EZVHpJuUIT0YWth192JmlIci+qMOEByHm83XE9E=
@@ -502,6 +510,7 @@ github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lN
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/moul/http2curl v0.0.0-20170919181001-9ac6cf4d929b/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ=
@@ -532,6 +541,7 @@ github.com/nsqio/go-nsq v1.0.7/go.mod h1:XP5zaUs3pqf+Q71EqUJs3HYfBIqfK6G83WQMdNN
github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw=
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
github.com/oleiade/reflections v1.0.0 h1:0ir4pc6v8/PJ0yw5AEtMddfXpWBXg9cnG7SgSoJuCgY=
github.com/oleiade/reflections v1.0.0/go.mod h1:RbATFBbKYkVdqmSFtx13Bb/tVhR0lgOBXunWTZKeL4w=
github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
@@ -554,7 +564,9 @@ github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mo
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
github.com/oracle/oci-go-sdk v7.0.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
github.com/ory/fosite v0.30.2 h1:1HQZPXQ+PdeIe27H9Fjfvxem5uxVc/diIwUDk5XTEM4=
github.com/ory/fosite v0.30.2/go.mod h1:Lq9qQ9Sl6mcea2Tt8J7PU+wUeFYPZ+vg7N3zPVKGbN8=
github.com/ory/go-convenience v0.1.0 h1:zouLKfF2GoSGnJwGq+PE/nJAE6dj2Zj5QlTgmMTsTS8=
github.com/ory/go-convenience v0.1.0/go.mod h1:uEY/a60PL5c12nYz4V5cHY03IBmwIAEm8TWB0yn9KNs=
github.com/ovh/go-ovh v0.0.0-20181109152953-ba5adb4cf014/go.mod h1:joRatxRJaZBsY3JAOEMcoOp05CnZzsx4scTxi95DHyQ=
github.com/owncloud/ocis-pkg v1.2.1-0.20191217084055-eab942498596 h1:3aMNmuDCIdKsaa4YdVTQEBJMjGz8KiuIB/+xlJUCT3k=
@@ -565,6 +577,7 @@ github.com/parnurzeal/gorequest v0.2.15/go.mod h1:3Kh2QUMJoqw3icWAecsyzkpY7UzRfD
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g=
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo=
github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=
@@ -579,11 +592,13 @@ github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/xattr v0.4.1 h1:dhclzL6EqOXNaPDWqoeb9tIxATfBSmjqL0b4DpSjwRw=
github.com/pkg/xattr v0.4.1/go.mod h1:W2cGD0TBEus7MkUgv0tNZ9JutLtVO3cXu+IBRuHqnFs=
github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 h1:J9b7z+QKAmPf4YLrFg6oQUotqHQeUNWwkvo7jZp1GLU=
github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA=
github.com/pquerna/otp v1.2.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
@@ -625,10 +640,12 @@ github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqn
github.com/restic/calens v0.1.0/go.mod h1:u67f5msOjCTDYNzOf/NoAUSdmXP03YXPCwIQLYADy5M=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik=
github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
github.com/rs/zerolog v1.17.2 h1:RMRHFw2+wF7LO0QqtELQwo8hqSmqISyCJeFeAAuWcRo=
github.com/rs/zerolog v1.17.2/go.mod h1:9nvC1axdVrAHcu/s9taAVfBuIdTZLVQmKQyvrUjF5+I=
github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
@@ -640,6 +657,7 @@ github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdh
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLSAXx2ifx470yD/nUe22Dv5vBvxK/UK9UUTVs=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
@@ -827,6 +845,7 @@ golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAG
golang.org/x/oauth2 v0.0.0-20181003184128-c57b0facaced/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -928,6 +947,7 @@ google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9Ywl
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I=
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
@@ -961,6 +981,7 @@ google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8
gopkg.in/DataDog/dd-trace-go.v1 v1.19.0/go.mod h1:DVp8HmDh8PuTu2Z0fVVlBsyWaC++fzwVCaGWylTe3tg=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d h1:TxyelI5cVkbREznMhfzycHdkp5cLA7DpE+GKjSslYhM=
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw=
gopkg.in/bsm/ratelimit.v1 v1.0.0-20160220154919-db14e161995a/go.mod h1:KF9sEfUPAXdG8Oev9e99iLGnl2uJMjc5B+4y3O7x610=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
@@ -988,6 +1009,7 @@ gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eR
gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4=
gopkg.in/jcmturner/gokrb5.v7 v7.2.3/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM=
gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8=
gopkg.in/ldap.v2 v2.5.1 h1:wiu0okdNfjlBzg6UWvd1Hn8Y+Ux17/u/4nlk4CQr6tU=
gopkg.in/ldap.v2 v2.5.1/go.mod h1:oI0cpe/D7HRtBQl8aTg+ZmzFUAvu4lsv3eLXMLGFxWk=
gopkg.in/ldap.v3 v3.1.0/go.mod h1:dQjCc0R0kfyFjIlWNMH1DORwUASZyDxo2Ry1B51dXaQ=
gopkg.in/ns1/ns1-go.v2 v2.0.0-20190730140822-b51389932cbc/go.mod h1:VV+3haRsgDiVLxyifmMBrBIuCWFBPYKbRssXB9z67Hw=
@@ -997,6 +1019,7 @@ gopkg.in/resty.v1 v1.9.1/go.mod h1:vo52Hzryw9PnPHcJfPsBiFW62XhNx5OczbV9y+IMpgc=
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
gopkg.in/square/go-jose.v2 v2.1.9/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
gopkg.in/square/go-jose.v2 v2.3.1 h1:SK5KegNXmKmqE342YYN2qPHEnUYeoMiXXl1poUlI+o4=
gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98=
gopkg.in/src-d/go-git-fixtures.v3 v3.5.0/go.mod h1:dLBcvytrw/TYZsNTWCnkNF2DSIlzWYqTe3rJR56Ac7g=
-60
View File
@@ -1,60 +0,0 @@
package assets
import (
"net/http"
"os"
"path"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-pkg/log"
)
//go:generate go run github.com/UnnoTed/fileb0x embed.yml
// assets gets initialized by New and provides the handler.
type assets struct {
logger log.Logger
config *config.Config
}
// Open just implements the HTTP filesystem interface.
func (a assets) Open(original string) (http.File, error) {
if a.config.Asset.Path != "" {
if stat, err := os.Stat(a.config.Asset.Path); err == nil && stat.IsDir() {
custom := path.Join(
a.config.Asset.Path,
original,
)
if _, err := os.Stat(custom); !os.IsNotExist(err) {
f, err := os.Open(custom)
if err != nil {
return nil, err
}
return f, nil
}
} else {
a.logger.Warn().
Str("path", a.config.Asset.Path).
Msg("Assets directory doesn't exist")
}
}
return FS.OpenFile(
CTX,
original,
os.O_RDONLY,
0644,
)
}
// New returns a new http filesystem to serve assets.
func New(opts ...Option) http.FileSystem {
options := newOptions(opts...)
return assets{
config: options.Config,
}
}
-9
View File
@@ -1,9 +0,0 @@
package assets
import (
// Fake the import to make the dep tree happy.
_ "golang.org/x/net/context"
// Fake the import to make the dep tree happy.
_ "golang.org/x/net/webdav"
)
-144
View File
@@ -1,144 +0,0 @@
// Code generated by fileb0x at "2019-12-17 13:05:06.070460692 +0100 CET m=+0.000833910" from config file "embed.yml" DO NOT EDIT.
// modification hash(d41d8cd98f00b204e9800998ecf8427e.8058aec596c5fb73022d09bb97af796e)
package assets
import (
"bytes"
"compress/gzip"
"context"
"io"
"net/http"
"os"
"path"
"golang.org/x/net/webdav"
)
var (
// CTX is a context for webdav vfs
CTX = context.Background()
// FS is a virtual memory file system
FS = webdav.NewMemFS()
// Handler is used to server files through a http handler
Handler *webdav.Handler
// HTTP is the http file system
HTTP http.FileSystem = new(HTTPFS)
)
// HTTPFS implements http.FileSystem
type HTTPFS struct {
// Prefix allows to limit the path of all requests. F.e. a prefix "css" would allow only calls to /css/*
Prefix string
}
func init() {
err := CTX.Err()
if err != nil {
panic(err)
}
var f webdav.File
var rb *bytes.Reader
var r *gzip.Reader
Handler = &webdav.Handler{
FileSystem: FS,
LockSystem: webdav.NewMemLS(),
}
}
// Open a file
func (hfs *HTTPFS) Open(path string) (http.File, error) {
path = hfs.Prefix + path
f, err := FS.OpenFile(CTX, path, os.O_RDONLY, 0644)
if err != nil {
return nil, err
}
return f, nil
}
// ReadFile is adapTed from ioutil
func ReadFile(path string) ([]byte, error) {
f, err := FS.OpenFile(CTX, path, os.O_RDONLY, 0644)
if err != nil {
return nil, err
}
buf := bytes.NewBuffer(make([]byte, 0, bytes.MinRead))
// If the buffer overflows, we will get bytes.ErrTooLarge.
// Return that as an error. Any other panic remains.
defer func() {
e := recover()
if e == nil {
return
}
if panicErr, ok := e.(error); ok && panicErr == bytes.ErrTooLarge {
err = panicErr
} else {
panic(e)
}
}()
_, err = buf.ReadFrom(f)
return buf.Bytes(), err
}
// WriteFile is adapTed from ioutil
func WriteFile(filename string, data []byte, perm os.FileMode) error {
f, err := FS.OpenFile(CTX, filename, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, perm)
if err != nil {
return err
}
n, err := f.Write(data)
if err == nil && n < len(data) {
err = io.ErrShortWrite
}
if err1 := f.Close(); err == nil {
err = err1
}
return err
}
// WalkDirs looks for files in the given dir and returns a list of files in it
// usage for all files in the b0x: WalkDirs("", false)
func WalkDirs(name string, includeDirsInList bool, files ...string) ([]string, error) {
f, err := FS.OpenFile(CTX, name, os.O_RDONLY, 0)
if err != nil {
return nil, err
}
fileInfos, err := f.Readdir(0)
if err != nil {
return nil, err
}
err = f.Close()
if err != nil {
return nil, err
}
for _, info := range fileInfos {
filename := path.Join(name, info.Name())
if includeDirsInList || !info.IsDir() {
files = append(files, filename)
}
if info.IsDir() {
files, err = WalkDirs(filename, includeDirsInList, files...)
if err != nil {
return nil, err
}
}
}
return files, nil
}
-17
View File
@@ -1,17 +0,0 @@
---
pkg: "assets"
dest: "."
output: "embed.go"
fmt: true
noprefix: true
compression:
compress: true
custom:
- files:
- "../../assets/"
base: "../../assets/"
prefix: ""
...
-40
View File
@@ -1,40 +0,0 @@
package assets
import (
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-pkg/log"
)
// Option defines a single option function.
type Option func(o *Options)
// Options defines the available options for this package.
type Options struct {
Logger log.Logger
Config *config.Config
}
// newOptions initializes the available default options.
func newOptions(opts ...Option) Options {
opt := Options{}
for _, o := range opts {
o(&opt)
}
return opt
}
// Logger provides a function to set the logger option.
func Logger(val log.Logger) Option {
return func(o *Options) {
o.Logger = val
}
}
// Config provides a function to set the config option.
func Config(val *config.Config) Option {
return func(o *Options) {
o.Config = val
}
}
+8 -3
View File
@@ -9,7 +9,7 @@ import (
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
@@ -17,11 +17,16 @@ import (
)
// AuthBasic is the entrypoint for the auth-basic command.
func AuthBasic(cfg *config.Config) cli.Command {
return cli.Command{
func AuthBasic(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "auth-basic",
Usage: "Start reva authprovider for basic auth",
Flags: flagset.AuthBasicWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Reva.AuthBasic.Services = c.StringSlice("service")
return nil
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
+8 -3
View File
@@ -9,7 +9,7 @@ import (
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
@@ -17,11 +17,16 @@ import (
)
// AuthBearer is the entrypoint for the auth-bearer command.
func AuthBearer(cfg *config.Config) cli.Command {
return cli.Command{
func AuthBearer(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "auth-bearer",
Usage: "Start reva authprovider for bearer auth",
Flags: flagset.AuthBearerWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Reva.AuthBearer.Services = c.StringSlice("service")
return nil
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
+8 -3
View File
@@ -10,7 +10,7 @@ import (
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
@@ -18,11 +18,16 @@ import (
)
// Frontend is the entrypoint for the frontend command.
func Frontend(cfg *config.Config) cli.Command {
return cli.Command{
func Frontend(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "frontend",
Usage: "Start reva frontend service",
Flags: flagset.FrontendWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Reva.Frontend.Services = c.StringSlice("service")
return nil
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
+8 -3
View File
@@ -9,7 +9,7 @@ import (
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
@@ -17,11 +17,16 @@ import (
)
// Gateway is the entrypoint for the gateway command.
func Gateway(cfg *config.Config) cli.Command {
return cli.Command{
func Gateway(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "gateway",
Usage: "Start reva gateway",
Flags: flagset.GatewayWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Reva.Gateway.Services = c.StringSlice("service")
return nil
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
+3 -3
View File
@@ -4,14 +4,14 @@ import (
"fmt"
"net/http"
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
)
// Health is the entrypoint for the health command.
func Health(cfg *config.Config) cli.Command {
return cli.Command{
func Health(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "health",
Usage: "Check health status",
Flags: flagset.HealthWithConfig(cfg),
+3 -3
View File
@@ -4,7 +4,7 @@ import (
"os"
"strings"
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis-pkg/log"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
@@ -22,7 +22,7 @@ func Execute() error {
Usage: "Example service for Reva/oCIS",
Compiled: version.Compiled(),
Authors: []cli.Author{
Authors: []*cli.Author{
{
Name: "ownCloud GmbH",
Email: "support@owncloud.com",
@@ -73,7 +73,7 @@ func Execute() error {
return nil
},
Commands: []cli.Command{
Commands: []*cli.Command{
Frontend(cfg),
Gateway(cfg),
Users(cfg),
+8 -3
View File
@@ -9,7 +9,7 @@ import (
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
@@ -17,11 +17,16 @@ import (
)
// Sharing is the entrypoint for the sharing command.
func Sharing(cfg *config.Config) cli.Command {
return cli.Command{
func Sharing(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "sharing",
Usage: "Start reva sharing service",
Flags: flagset.SharingWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Reva.Sharing.Services = c.StringSlice("service")
return nil
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
+8 -3
View File
@@ -9,7 +9,7 @@ import (
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
@@ -17,11 +17,16 @@ import (
)
// StorageHome is the entrypoint for the storage-home command.
func StorageHome(cfg *config.Config) cli.Command {
return cli.Command{
func StorageHome(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-home",
Usage: "Start reva storage-home service",
Flags: flagset.StorageHomeWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Reva.StorageHome.Services = c.StringSlice("service")
return nil
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
+8 -3
View File
@@ -9,7 +9,7 @@ import (
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
@@ -17,11 +17,16 @@ import (
)
// StorageHomeData is the entrypoint for the storage-home-data command.
func StorageHomeData(cfg *config.Config) cli.Command {
return cli.Command{
func StorageHomeData(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-home-data",
Usage: "Start reva storage-home-data service",
Flags: flagset.StorageHomeDataWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Reva.StorageHomeData.Services = c.StringSlice("service")
return nil
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
+8 -3
View File
@@ -9,7 +9,7 @@ import (
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
@@ -17,11 +17,16 @@ import (
)
// StorageOC is the entrypoint for the storage-oc command.
func StorageOC(cfg *config.Config) cli.Command {
return cli.Command{
func StorageOC(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-oc",
Usage: "Start reva 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)
+8 -3
View File
@@ -9,7 +9,7 @@ import (
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
@@ -17,11 +17,16 @@ import (
)
// StorageOCData is the entrypoint for the storage-oc-data command.
func StorageOCData(cfg *config.Config) cli.Command {
return cli.Command{
func StorageOCData(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-oc-data",
Usage: "Start reva 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)
+8 -3
View File
@@ -9,7 +9,7 @@ import (
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
@@ -17,11 +17,16 @@ import (
)
// StorageRoot is the entrypoint for the storage-root command.
func StorageRoot(cfg *config.Config) cli.Command {
return cli.Command{
func StorageRoot(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-root",
Usage: "Start reva 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)
+8 -3
View File
@@ -9,7 +9,7 @@ import (
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
@@ -17,11 +17,16 @@ import (
)
// Users is the entrypoint for the sharing command.
func Users(cfg *config.Config) cli.Command {
return cli.Command{
func Users(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "users",
Usage: "Start reva users service",
Flags: flagset.UsersWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Reva.Users.Services = c.StringSlice("service")
return nil
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
+25 -3
View File
@@ -15,11 +15,13 @@ type Debug struct {
Zpages bool
}
// Gateway defines the available gateway configuration.
type Gateway struct {
Port
CommitShareToStorageGrant bool
}
// Port defines the available port configuration.
type Port struct {
// MaxCPUs can be a number or a percentage
MaxCPUs string
@@ -35,21 +37,25 @@ type Port struct {
// 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
Services string
// used to store the parsed services
servicesList []string
Services []string
// Config can be used to configure the reva instance.
// Services and Protocol will be ignored if this is used
Config map[string]interface{}
}
// Users defines the available users configuration.
type Users struct {
Port
Driver string
JSON string
}
// PathWrapperContext defines the available PathWrapperContext configuration.
type PathWrapperContext struct {
Prefix string
}
// StoragePort defines the available storage configuration.
type StoragePort struct {
Port
Driver string
@@ -65,6 +71,8 @@ type StoragePort struct {
Prefix string
TempFolder string
}
// StorageConfig combines all available storage configuration parts.
type StorageConfig struct {
EOS StorageEOS
Local StorageLocal
@@ -72,6 +80,8 @@ type StorageConfig struct {
S3 StorageS3
// TODO checksums ... figure out what that is supposed to do
}
// StorageEOS defines the available EOS storage configuration.
type StorageEOS struct {
// Namespace for metadata operations
Namespace string
@@ -119,12 +129,18 @@ type StorageEOS struct {
// SingleUsername is the username to use when SingleUserMode is enabled
SingleUsername string
}
// StorageLocal defines the available local storage configuration.
type StorageLocal struct {
Root string
}
// StorageOwnCloud defines the available ownCloud storage configuration.
type StorageOwnCloud struct {
Datadirectory string
}
// StorageS3 defines the available S3 storage configuration.
type StorageS3 struct {
Region string
AccessKey string
@@ -133,11 +149,15 @@ type StorageS3 struct {
Bucket string
Prefix string
}
// OIDC defines the available OpenID Connect configuration.
type OIDC struct {
Issuer string
Insecure bool
IDClaim string
}
// LDAP defines the available ldap configuration.
type LDAP struct {
Hostname string
Port int
@@ -149,6 +169,8 @@ type LDAP struct {
IDP string
Schema LDAPSchema
}
// LDAPSchema defines the available ldap schema configuration.
type LDAPSchema struct {
UID string
Mail string
+33 -34
View File
@@ -1,7 +1,7 @@
package flagset
import (
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis-reva/pkg/config"
)
@@ -12,35 +12,35 @@ func AuthBasicWithConfig(cfg *config.Config) []cli.Flag {
&cli.BoolFlag{
Name: "tracing-enabled",
Usage: "Enable sending traces",
EnvVar: "REVA_TRACING_ENABLED",
EnvVars: []string{"REVA_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled,
},
&cli.StringFlag{
Name: "tracing-type",
Value: "jaeger",
Usage: "Tracing backend type",
EnvVar: "REVA_TRACING_TYPE",
EnvVars: []string{"REVA_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
&cli.StringFlag{
Name: "tracing-endpoint",
Value: "",
Usage: "Endpoint for the agent",
EnvVar: "REVA_TRACING_ENDPOINT",
EnvVars: []string{"REVA_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
&cli.StringFlag{
Name: "tracing-collector",
Value: "",
Usage: "Endpoint for the collector",
EnvVar: "REVA_TRACING_COLLECTOR",
EnvVars: []string{"REVA_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
&cli.StringFlag{
Name: "tracing-service",
Value: "reva",
Usage: "Service name for tracing",
EnvVar: "REVA_TRACING_SERVICE",
EnvVars: []string{"REVA_TRACING_SERVICE"},
Destination: &cfg.Tracing.Service,
},
@@ -49,26 +49,26 @@ func AuthBasicWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9147",
Usage: "Address to bind debug server",
EnvVar: "REVA_AUTH_BASIC_DEBUG_ADDR",
EnvVars: []string{"REVA_AUTH_BASIC_DEBUG_ADDR"},
Destination: &cfg.Reva.AuthBasic.DebugAddr,
},
&cli.StringFlag{
Name: "debug-token",
Value: "",
Usage: "Token to grant metrics access",
EnvVar: "REVA_DEBUG_TOKEN",
EnvVars: []string{"REVA_DEBUG_TOKEN"},
Destination: &cfg.Debug.Token,
},
&cli.BoolFlag{
Name: "debug-pprof",
Usage: "Enable pprof debugging",
EnvVar: "REVA_DEBUG_PPROF",
EnvVars: []string{"REVA_DEBUG_PPROF"},
Destination: &cfg.Debug.Pprof,
},
&cli.BoolFlag{
Name: "debug-zpages",
Usage: "Enable zpages debugging",
EnvVar: "REVA_DEBUG_ZPAGES",
EnvVars: []string{"REVA_DEBUG_ZPAGES"},
Destination: &cfg.Debug.Zpages,
},
@@ -78,7 +78,7 @@ func AuthBasicWithConfig(cfg *config.Config) []cli.Flag {
Name: "jwt-secret",
Value: "Pive-Fumkiu4",
Usage: "Shared jwt secret for reva service communication",
EnvVar: "REVA_JWT_SECRET",
EnvVars: []string{"REVA_JWT_SECRET"},
Destination: &cfg.Reva.JWTSecret,
},
@@ -88,14 +88,14 @@ func AuthBasicWithConfig(cfg *config.Config) []cli.Flag {
Name: "users-driver",
Value: "demo",
Usage: "user driver: 'demo', 'json' or 'ldap'",
EnvVar: "REVA_USERS_DRIVER",
EnvVars: []string{"REVA_USERS_DRIVER"},
Destination: &cfg.Reva.Users.Driver,
},
&cli.StringFlag{
Name: "users-json",
Value: "",
Usage: "Path to users.json file",
EnvVar: "REVA_USERS_JSON",
EnvVars: []string{"REVA_USERS_JSON"},
Destination: &cfg.Reva.Users.JSON,
},
@@ -105,49 +105,49 @@ func AuthBasicWithConfig(cfg *config.Config) []cli.Flag {
Name: "ldap-hostname",
Value: "localhost",
Usage: "LDAP hostname",
EnvVar: "REVA_LDAP_HOSTNAME",
EnvVars: []string{"REVA_LDAP_HOSTNAME"},
Destination: &cfg.Reva.LDAP.Hostname,
},
&cli.IntFlag{
Name: "ldap-port",
Value: 636,
Usage: "LDAP port",
EnvVar: "REVA_LDAP_PORT",
EnvVars: []string{"REVA_LDAP_PORT"},
Destination: &cfg.Reva.LDAP.Port,
},
&cli.StringFlag{
Name: "ldap-base-dn",
Value: "dc=owncloud,dc=com",
Usage: "LDAP basedn",
EnvVar: "REVA_LDAP_BASE_DN",
EnvVars: []string{"REVA_LDAP_BASE_DN"},
Destination: &cfg.Reva.LDAP.BaseDN,
},
&cli.StringFlag{
Name: "ldap-userfilter",
Value: "(&(objectclass=posixAccount)(cn=%s))",
Usage: "LDAP userfilter",
EnvVar: "REVA_LDAP_USERFILTER",
EnvVars: []string{"REVA_LDAP_USERFILTER"},
Destination: &cfg.Reva.LDAP.UserFilter,
},
&cli.StringFlag{
Name: "ldap-groupfilter",
Value: "(&(objectclass=posixGroup)(cn=%s))",
Usage: "LDAP groupfilter",
EnvVar: "REVA_LDAP_GROUPFILTER",
EnvVars: []string{"REVA_LDAP_GROUPFILTER"},
Destination: &cfg.Reva.LDAP.GroupFilter,
},
&cli.StringFlag{
Name: "ldap-bind-dn",
Value: "cn=admin,dc=owncloud,dc=com",
Usage: "LDAP bind dn",
EnvVar: "REVA_LDAP_BIND_DN",
EnvVars: []string{"REVA_LDAP_BIND_DN"},
Destination: &cfg.Reva.LDAP.BindDN,
},
&cli.StringFlag{
Name: "ldap-bind-password",
Value: "admin",
Usage: "LDAP bind password",
EnvVar: "REVA_LDAP_BIND_PASSWORD",
EnvVars: []string{"REVA_LDAP_BIND_PASSWORD"},
Destination: &cfg.Reva.LDAP.BindPassword,
},
// ldap dn is always the dn
@@ -155,28 +155,28 @@ func AuthBasicWithConfig(cfg *config.Config) []cli.Flag {
Name: "ldap-schema-uid",
Value: "uid",
Usage: "LDAP schema uid",
EnvVar: "REVA_LDAP_SCHEMA_UID",
EnvVars: []string{"REVA_LDAP_SCHEMA_UID"},
Destination: &cfg.Reva.LDAP.Schema.UID,
},
&cli.StringFlag{
Name: "ldap-schema-mail",
Value: "mail",
Usage: "LDAP schema mail",
EnvVar: "REVA_LDAP_SCHEMA_Mail",
EnvVars: []string{"REVA_LDAP_SCHEMA_Mail"},
Destination: &cfg.Reva.LDAP.Schema.Mail,
},
&cli.StringFlag{
Name: "ldap-schema-displayName",
Value: "displayName",
Usage: "LDAP schema displayName",
EnvVar: "REVA_LDAP_SCHEMA_DISPLAYNAME",
EnvVars: []string{"REVA_LDAP_SCHEMA_DISPLAYNAME"},
Destination: &cfg.Reva.LDAP.Schema.DisplayName,
},
&cli.StringFlag{
Name: "ldap-schema-cn",
Value: "cn",
Usage: "LDAP schema cn",
EnvVar: "REVA_LDAP_SCHEMA_CN",
EnvVars: []string{"REVA_LDAP_SCHEMA_CN"},
Destination: &cfg.Reva.LDAP.Schema.CN,
},
@@ -188,36 +188,35 @@ func AuthBasicWithConfig(cfg *config.Config) []cli.Flag {
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva auth-basic service, can be 'tcp', 'udp' or 'unix'",
EnvVar: "REVA_AUTH_BASIC_NETWORK",
EnvVars: []string{"REVA_AUTH_BASIC_NETWORK"},
Destination: &cfg.Reva.AuthBasic.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "grpc",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVar: "REVA_AUTH_BASIC_PROTOCOL",
EnvVars: []string{"REVA_AUTH_BASIC_PROTOCOL"},
Destination: &cfg.Reva.AuthBasic.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9146",
Usage: "Address to bind reva service",
EnvVar: "REVA_AUTH_BASIC_ADDR",
EnvVars: []string{"REVA_AUTH_BASIC_ADDR"},
Destination: &cfg.Reva.AuthBasic.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9146",
Usage: "URL to use for the reva service",
EnvVar: "REVA_AUTH_BASIC_URL",
EnvVars: []string{"REVA_AUTH_BASIC_URL"},
Destination: &cfg.Reva.AuthBasic.URL,
},
&cli.StringFlag{
Name: "services",
Value: "authprovider",
Usage: "comma separated list of services to include",
EnvVar: "REVA_AUTH_BASIC_SERVICES",
Destination: &cfg.Reva.AuthBasic.Services,
&cli.StringSliceFlag{
Name: "service",
Value: cli.NewStringSlice("authprovider"),
Usage: "--service authprovider [--service otherservice]",
EnvVars: []string{"REVA_AUTH_BASIC_SERVICES"},
},
}
}
+23 -24
View File
@@ -1,7 +1,7 @@
package flagset
import (
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis-reva/pkg/config"
)
@@ -12,35 +12,35 @@ func AuthBearerWithConfig(cfg *config.Config) []cli.Flag {
&cli.BoolFlag{
Name: "tracing-enabled",
Usage: "Enable sending traces",
EnvVar: "REVA_TRACING_ENABLED",
EnvVars: []string{"REVA_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled,
},
&cli.StringFlag{
Name: "tracing-type",
Value: "jaeger",
Usage: "Tracing backend type",
EnvVar: "REVA_TRACING_TYPE",
EnvVars: []string{"REVA_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
&cli.StringFlag{
Name: "tracing-endpoint",
Value: "",
Usage: "Endpoint for the agent",
EnvVar: "REVA_TRACING_ENDPOINT",
EnvVars: []string{"REVA_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
&cli.StringFlag{
Name: "tracing-collector",
Value: "",
Usage: "Endpoint for the collector",
EnvVar: "REVA_TRACING_COLLECTOR",
EnvVars: []string{"REVA_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
&cli.StringFlag{
Name: "tracing-service",
Value: "reva",
Usage: "Service name for tracing",
EnvVar: "REVA_TRACING_SERVICE",
EnvVars: []string{"REVA_TRACING_SERVICE"},
Destination: &cfg.Tracing.Service,
},
@@ -49,26 +49,26 @@ func AuthBearerWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9149",
Usage: "Address to bind debug server",
EnvVar: "REVA_AUTH_BEARER_DEBUG_ADDR",
EnvVars: []string{"REVA_AUTH_BEARER_DEBUG_ADDR"},
Destination: &cfg.Reva.AuthBearer.DebugAddr,
},
&cli.StringFlag{
Name: "debug-token",
Value: "",
Usage: "Token to grant metrics access",
EnvVar: "REVA_DEBUG_TOKEN",
EnvVars: []string{"REVA_DEBUG_TOKEN"},
Destination: &cfg.Debug.Token,
},
&cli.BoolFlag{
Name: "debug-pprof",
Usage: "Enable pprof debugging",
EnvVar: "REVA_DEBUG_PPROF",
EnvVars: []string{"REVA_DEBUG_PPROF"},
Destination: &cfg.Debug.Pprof,
},
&cli.BoolFlag{
Name: "debug-zpages",
Usage: "Enable zpages debugging",
EnvVar: "REVA_DEBUG_ZPAGES",
EnvVars: []string{"REVA_DEBUG_ZPAGES"},
Destination: &cfg.Debug.Zpages,
},
@@ -78,7 +78,7 @@ func AuthBearerWithConfig(cfg *config.Config) []cli.Flag {
Name: "jwt-secret",
Value: "Pive-Fumkiu4",
Usage: "Shared jwt secret for reva service communication",
EnvVar: "REVA_JWT_SECRET",
EnvVars: []string{"REVA_JWT_SECRET"},
Destination: &cfg.Reva.JWTSecret,
},
@@ -88,20 +88,20 @@ func AuthBearerWithConfig(cfg *config.Config) []cli.Flag {
Name: "oidc-issuer",
Value: "http://localhost:9140",
Usage: "OIDC issuer",
EnvVar: "REVA_OIDC_ISSUER",
EnvVars: []string{"REVA_OIDC_ISSUER"},
Destination: &cfg.Reva.OIDC.Issuer,
},
&cli.BoolFlag{
Name: "oidc-insecure",
Usage: "OIDC allow insecure communication",
EnvVar: "REVA_OIDC_INSECURE",
EnvVars: []string{"REVA_OIDC_INSECURE"},
Destination: &cfg.Reva.OIDC.Insecure,
},
&cli.StringFlag{
Name: "oidc-id-claim",
Value: "sub", // sub is stable and defined as unique. the user manager needs to take care of the sub to user metadata lookup
Usage: "OIDC id claim",
EnvVar: "REVA_OIDC_ID_CLAIM",
EnvVars: []string{"REVA_OIDC_ID_CLAIM"},
Destination: &cfg.Reva.OIDC.IDClaim,
},
@@ -113,36 +113,35 @@ func AuthBearerWithConfig(cfg *config.Config) []cli.Flag {
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVar: "REVA_AUTH_BEARER_NETWORK",
EnvVars: []string{"REVA_AUTH_BEARER_NETWORK"},
Destination: &cfg.Reva.AuthBearer.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "grpc",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVar: "REVA_AUTH_BEARER_PROTOCOL",
EnvVars: []string{"REVA_AUTH_BEARER_PROTOCOL"},
Destination: &cfg.Reva.AuthBearer.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9148",
Usage: "Address to bind reva service",
EnvVar: "REVA_AUTH_BEARER_ADDR",
EnvVars: []string{"REVA_AUTH_BEARER_ADDR"},
Destination: &cfg.Reva.AuthBearer.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9148",
Usage: "URL to use for the reva service",
EnvVar: "REVA_AUTH_BEARER_URL",
EnvVars: []string{"REVA_AUTH_BEARER_URL"},
Destination: &cfg.Reva.AuthBearer.URL,
},
&cli.StringFlag{
Name: "services",
Value: "authprovider", // TODO preferences
Usage: "comma separated list of services to include",
EnvVar: "REVA_AUTH_BEARER_SERVICES",
Destination: &cfg.Reva.AuthBearer.Services,
&cli.StringSliceFlag{
Name: "service",
Value: cli.NewStringSlice("authprovider"), // TODO preferences
Usage: "--service authprovider [--service otherservice]",
EnvVars: []string{"REVA_AUTH_BEARER_SERVICES"},
},
}
}
+25 -26
View File
@@ -1,7 +1,7 @@
package flagset
import (
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis-reva/pkg/config"
)
@@ -12,35 +12,35 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
&cli.BoolFlag{
Name: "tracing-enabled",
Usage: "Enable sending traces",
EnvVar: "REVA_TRACING_ENABLED",
EnvVars: []string{"REVA_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled,
},
&cli.StringFlag{
Name: "tracing-type",
Value: "jaeger",
Usage: "Tracing backend type",
EnvVar: "REVA_TRACING_TYPE",
EnvVars: []string{"REVA_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
&cli.StringFlag{
Name: "tracing-endpoint",
Value: "",
Usage: "Endpoint for the agent",
EnvVar: "REVA_TRACING_ENDPOINT",
EnvVars: []string{"REVA_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
&cli.StringFlag{
Name: "tracing-collector",
Value: "",
Usage: "Endpoint for the collector",
EnvVar: "REVA_TRACING_COLLECTOR",
EnvVars: []string{"REVA_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
&cli.StringFlag{
Name: "tracing-service",
Value: "reva",
Usage: "Service name for tracing",
EnvVar: "REVA_TRACING_SERVICE",
EnvVars: []string{"REVA_TRACING_SERVICE"},
Destination: &cfg.Tracing.Service,
},
@@ -49,26 +49,26 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9141",
Usage: "Address to bind debug server",
EnvVar: "REVA_FRONTEND_DEBUG_ADDR",
EnvVars: []string{"REVA_FRONTEND_DEBUG_ADDR"},
Destination: &cfg.Reva.Frontend.DebugAddr,
},
&cli.StringFlag{
Name: "debug-token",
Value: "",
Usage: "Token to grant metrics access",
EnvVar: "REVA_DEBUG_TOKEN",
EnvVars: []string{"REVA_DEBUG_TOKEN"},
Destination: &cfg.Debug.Token,
},
&cli.BoolFlag{
Name: "debug-pprof",
Usage: "Enable pprof debugging",
EnvVar: "REVA_DEBUG_PPROF",
EnvVars: []string{"REVA_DEBUG_PPROF"},
Destination: &cfg.Debug.Pprof,
},
&cli.BoolFlag{
Name: "debug-zpages",
Usage: "Enable zpages debugging",
EnvVar: "REVA_DEBUG_ZPAGES",
EnvVars: []string{"REVA_DEBUG_ZPAGES"},
Destination: &cfg.Debug.Zpages,
},
@@ -78,14 +78,14 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
Name: "jwt-secret",
Value: "Pive-Fumkiu4",
Usage: "Shared jwt secret for reva service communication",
EnvVar: "REVA_JWT_SECRET",
EnvVars: []string{"REVA_JWT_SECRET"},
Destination: &cfg.Reva.JWTSecret,
},
&cli.StringFlag{
Name: "transfer-secret",
Value: "replace-me-with-a-transfer-secret",
Usage: "Transfer secret for datagateway",
EnvVar: "REVA_TRANSFER_SECRET",
EnvVars: []string{"REVA_TRANSFER_SECRET"},
Destination: &cfg.Reva.TransferSecret,
},
@@ -95,20 +95,20 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
Name: "oidc-issuer",
Value: "http://localhost:9140",
Usage: "OIDC issuer",
EnvVar: "REVA_OIDC_ISSUER",
EnvVars: []string{"REVA_OIDC_ISSUER"},
Destination: &cfg.Reva.OIDC.Issuer,
},
&cli.BoolFlag{
Name: "oidc-insecure",
Usage: "OIDC allow insecure communication",
EnvVar: "REVA_OIDC_INSECURE",
EnvVars: []string{"REVA_OIDC_INSECURE"},
Destination: &cfg.Reva.OIDC.Insecure,
},
&cli.StringFlag{
Name: "oidc-id-claim",
Value: "sub", // sub is stable and defined as unique. the user manager needs to take care of the sub to user metadata lookup
Usage: "OIDC id claim",
EnvVar: "REVA_OIDC_ID_CLAIM",
EnvVars: []string{"REVA_OIDC_ID_CLAIM"},
Destination: &cfg.Reva.OIDC.IDClaim,
},
@@ -122,36 +122,35 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVar: "REVA_FRONTEND_NETWORK",
EnvVars: []string{"REVA_FRONTEND_NETWORK"},
Destination: &cfg.Reva.Frontend.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "http",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVar: "REVA_FRONTEND_PROTOCOL",
EnvVars: []string{"REVA_FRONTEND_PROTOCOL"},
Destination: &cfg.Reva.Frontend.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9140",
Usage: "Address to bind reva service",
EnvVar: "REVA_FRONTEND_ADDR",
EnvVars: []string{"REVA_FRONTEND_ADDR"},
Destination: &cfg.Reva.Frontend.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9140",
Usage: "URL to use for the reva service",
EnvVar: "REVA_FRONTEND_URL",
EnvVars: []string{"REVA_FRONTEND_URL"},
Destination: &cfg.Reva.Frontend.URL,
},
&cli.StringFlag{
Name: "services",
Value: "datagateway,wellknown,oidcprovider,ocdav,ocs",
Usage: "comma separated list of services to include",
EnvVar: "REVA_FRONTEND_SERVICES",
Destination: &cfg.Reva.Frontend.Services,
&cli.StringSliceFlag{
Name: "service",
Value: cli.NewStringSlice("datagateway", "wellknown", "oidcprovider", "ocdav", "ocs"),
Usage: "--service datagateway [--service wellknown]",
EnvVars: []string{"REVA_FRONTEND_SERVICES"},
},
// Gateway
@@ -160,7 +159,7 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
Name: "gateway-url",
Value: "localhost:9142",
Usage: "URL to use for the reva gateway service",
EnvVar: "REVA_GATEWAY_URL",
EnvVars: []string{"REVA_GATEWAY_URL"},
Destination: &cfg.Reva.Gateway.URL,
},
}
+39 -40
View File
@@ -1,7 +1,7 @@
package flagset
import (
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis-reva/pkg/config"
)
@@ -12,35 +12,35 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
&cli.BoolFlag{
Name: "tracing-enabled",
Usage: "Enable sending traces",
EnvVar: "REVA_TRACING_ENABLED",
EnvVars: []string{"REVA_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled,
},
&cli.StringFlag{
Name: "tracing-type",
Value: "jaeger",
Usage: "Tracing backend type",
EnvVar: "REVA_TRACING_TYPE",
EnvVars: []string{"REVA_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
&cli.StringFlag{
Name: "tracing-endpoint",
Value: "",
Usage: "Endpoint for the agent",
EnvVar: "REVA_TRACING_ENDPOINT",
EnvVars: []string{"REVA_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
&cli.StringFlag{
Name: "tracing-collector",
Value: "",
Usage: "Endpoint for the collector",
EnvVar: "REVA_TRACING_COLLECTOR",
EnvVars: []string{"REVA_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
&cli.StringFlag{
Name: "tracing-service",
Value: "reva",
Usage: "Service name for tracing",
EnvVar: "REVA_TRACING_SERVICE",
EnvVars: []string{"REVA_TRACING_SERVICE"},
Destination: &cfg.Tracing.Service,
},
@@ -49,26 +49,26 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9143",
Usage: "Address to bind debug server",
EnvVar: "REVA_GATEWAY_DEBUG_ADDR",
EnvVars: []string{"REVA_GATEWAY_DEBUG_ADDR"},
Destination: &cfg.Reva.Gateway.DebugAddr,
},
&cli.StringFlag{
Name: "debug-token",
Value: "",
Usage: "Token to grant metrics access",
EnvVar: "REVA_DEBUG_TOKEN",
EnvVars: []string{"REVA_DEBUG_TOKEN"},
Destination: &cfg.Debug.Token,
},
&cli.BoolFlag{
Name: "debug-pprof",
Usage: "Enable pprof debugging",
EnvVar: "REVA_DEBUG_PPROF",
EnvVars: []string{"REVA_DEBUG_PPROF"},
Destination: &cfg.Debug.Pprof,
},
&cli.BoolFlag{
Name: "debug-zpages",
Usage: "Enable zpages debugging",
EnvVar: "REVA_DEBUG_ZPAGES",
EnvVars: []string{"REVA_DEBUG_ZPAGES"},
Destination: &cfg.Debug.Zpages,
},
@@ -78,21 +78,21 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
Name: "jwt-secret",
Value: "Pive-Fumkiu4",
Usage: "Shared jwt secret for reva service communication",
EnvVar: "REVA_JWT_SECRET",
EnvVars: []string{"REVA_JWT_SECRET"},
Destination: &cfg.Reva.JWTSecret,
},
&cli.StringFlag{
Name: "transfer-secret",
Value: "replace-me-with-a-transfer-secret",
Usage: "Transfer secret for datagateway",
EnvVar: "REVA_TRANSFER_SECRET",
EnvVars: []string{"REVA_TRANSFER_SECRET"},
Destination: &cfg.Reva.TransferSecret,
},
&cli.IntFlag{
Name: "transfer-expires",
Value: 10,
Usage: "Transfer secret for datagateway",
EnvVar: "REVA_TRANSFER_EXPIRES",
EnvVars: []string{"REVA_TRANSFER_EXPIRES"},
Destination: &cfg.Reva.TransferExpires,
},
@@ -106,42 +106,41 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVar: "REVA_GATEWAY_NETWORK",
EnvVars: []string{"REVA_GATEWAY_NETWORK"},
Destination: &cfg.Reva.Gateway.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "grpc",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVar: "REVA_GATEWAY_PROTOCOL",
EnvVars: []string{"REVA_GATEWAY_PROTOCOL"},
Destination: &cfg.Reva.Gateway.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9142",
Usage: "Address to bind reva service",
EnvVar: "REVA_GATEWAY_ADDR",
EnvVars: []string{"REVA_GATEWAY_ADDR"},
Destination: &cfg.Reva.Gateway.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9142",
Usage: "URL to use for the reva service",
EnvVar: "REVA_GATEWAY_URL",
EnvVars: []string{"REVA_GATEWAY_URL"},
Destination: &cfg.Reva.Gateway.URL,
},
&cli.StringFlag{
Name: "services",
Value: "gateway,authregistry,storageregistry", // TODO appregistry
Usage: "comma separated list of services to include",
EnvVar: "REVA_GATEWAY_SERVICES",
Destination: &cfg.Reva.Gateway.Services,
&cli.StringSliceFlag{
Name: "service",
Value: cli.NewStringSlice("gateway", "authregistry", "storageregistry"), // TODO appregistry
Usage: "--service gateway [--service authregistry]",
EnvVars: []string{"REVA_GATEWAY_SERVICES"},
},
// TODO should defaults to true. reverse logic to 'disable-share-commit'?
&cli.BoolFlag{
Name: "commit-share-to-storage-grant",
Usage: "Commit shares to the share manager as well as as a grant to the storage",
EnvVar: "REVA_GATEWAY_COMMIT_SHARE_TO_STRORAGE_GRANT",
EnvVars: []string{"REVA_GATEWAY_COMMIT_SHARE_TO_STRORAGE_GRANT"},
Destination: &cfg.Reva.Gateway.CommitShareToStorageGrant,
},
@@ -153,35 +152,35 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
Name: "frontend-url",
Value: "localhost:9140",
Usage: "URL to use for the reva service",
EnvVar: "REVA_FRONTEND_URL",
EnvVars: []string{"REVA_FRONTEND_URL"},
Destination: &cfg.Reva.Frontend.URL,
},
&cli.StringFlag{
Name: "users-url",
Value: "localhost:9144",
Usage: "URL to use for the reva service",
EnvVar: "REVA_USERS_URL",
EnvVars: []string{"REVA_USERS_URL"},
Destination: &cfg.Reva.Users.URL,
},
&cli.StringFlag{
Name: "auth-basic-url",
Value: "localhost:9146",
Usage: "URL to use for the reva service",
EnvVar: "REVA_AUTH_BASIC_URL",
EnvVars: []string{"REVA_AUTH_BASIC_URL"},
Destination: &cfg.Reva.AuthBasic.URL,
},
&cli.StringFlag{
Name: "auth-bearer-url",
Value: "localhost:9148",
Usage: "URL to use for the reva service",
EnvVar: "REVA_AUTH_BEARER_URL",
EnvVars: []string{"REVA_AUTH_BEARER_URL"},
Destination: &cfg.Reva.AuthBearer.URL,
},
&cli.StringFlag{
Name: "sharing-url",
Value: "localhost:9150",
Usage: "URL to use for the reva service",
EnvVar: "REVA_SHARING_URL",
EnvVars: []string{"REVA_SHARING_URL"},
Destination: &cfg.Reva.Sharing.URL,
},
@@ -189,21 +188,21 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-root-url",
Value: "localhost:9152",
Usage: "URL to use for the reva service",
EnvVar: "REVA_STORAGE_ROOT_URL",
EnvVars: []string{"REVA_STORAGE_ROOT_URL"},
Destination: &cfg.Reva.StorageRoot.URL,
},
&cli.StringFlag{
Name: "storage-root-mount-path",
Value: "/",
Usage: "mount path",
EnvVar: "REVA_STORAGE_ROOT_MOUNT_PATH",
EnvVars: []string{"REVA_STORAGE_ROOT_MOUNT_PATH"},
Destination: &cfg.Reva.StorageRoot.MountPath,
},
&cli.StringFlag{
Name: "storage-root-mount-id",
Value: "123e4567-e89b-12d3-a456-426655440001",
Usage: "mount id",
EnvVar: "REVA_STORAGE_ROOT_MOUNT_ID",
EnvVars: []string{"REVA_STORAGE_ROOT_MOUNT_ID"},
Destination: &cfg.Reva.StorageRoot.MountID,
},
@@ -211,21 +210,21 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-home-url",
Value: "localhost:9154",
Usage: "URL to use for the reva service",
EnvVar: "REVA_STORAGE_HOME_URL",
EnvVars: []string{"REVA_STORAGE_HOME_URL"},
Destination: &cfg.Reva.StorageHome.URL,
},
&cli.StringFlag{
Name: "storage-home-mount-path",
Value: "/home",
Usage: "mount path",
EnvVar: "REVA_STORAGE_HOME_MOUNT_PATH",
EnvVars: []string{"REVA_STORAGE_HOME_MOUNT_PATH"},
Destination: &cfg.Reva.StorageHome.MountPath,
},
&cli.StringFlag{
Name: "storage-home-mount-id",
Value: "123e4567-e89b-12d3-a456-426655440000",
Usage: "mount id",
EnvVar: "REVA_STORAGE_HOME_MOUNT_ID",
EnvVars: []string{"REVA_STORAGE_HOME_MOUNT_ID"},
Destination: &cfg.Reva.StorageHome.MountID,
},
@@ -233,7 +232,7 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-home-data-url",
Value: "localhost:9156",
Usage: "URL to use for the reva service",
EnvVar: "REVA_STORAGE_HOME_DATA_URL",
EnvVars: []string{"REVA_STORAGE_HOME_DATA_URL"},
Destination: &cfg.Reva.StorageHomeData.URL,
},
@@ -241,21 +240,21 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-oc-url",
Value: "localhost:9162",
Usage: "URL to use for the reva service",
EnvVar: "REVA_STORAGE_OC_URL",
EnvVars: []string{"REVA_STORAGE_OC_URL"},
Destination: &cfg.Reva.StorageOC.URL,
},
&cli.StringFlag{
Name: "storage-oc-mount-path",
Value: "/oc",
Usage: "mount path",
EnvVar: "REVA_STORAGE_OC_MOUNT_PATH",
EnvVars: []string{"REVA_STORAGE_OC_MOUNT_PATH"},
Destination: &cfg.Reva.StorageOC.MountPath,
},
&cli.StringFlag{
Name: "storage-oc-mount-id",
Value: "123e4567-e89b-12d3-a456-426655440000",
Usage: "mount id",
EnvVar: "REVA_STORAGE_OC_MOUNT_ID",
EnvVars: []string{"REVA_STORAGE_OC_MOUNT_ID"},
Destination: &cfg.Reva.StorageOC.MountID,
},
@@ -263,7 +262,7 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-oc-data-url",
Value: "localhost:9164",
Usage: "URL to use for the reva service",
EnvVar: "REVA_STORAGE_OC_DATA_URL",
EnvVars: []string{"REVA_STORAGE_OC_DATA_URL"},
Destination: &cfg.Reva.StorageOCData.URL,
},
}
+2 -2
View File
@@ -1,7 +1,7 @@
package flagset
import (
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis-reva/pkg/config"
)
@@ -12,7 +12,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9109",
Usage: "Address to debug endpoint",
EnvVar: "REVA_DEBUG_ADDR",
EnvVars: []string{"REVA_DEBUG_ADDR"},
Destination: &cfg.Debug.Addr,
},
}
+7 -7
View File
@@ -1,7 +1,7 @@
package flagset
import (
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis-reva/pkg/config"
)
@@ -12,26 +12,26 @@ func RootWithConfig(cfg *config.Config) []cli.Flag {
Name: "config-file",
Value: "",
Usage: "Path to config file",
EnvVar: "REVA_CONFIG_FILE",
EnvVars: []string{"REVA_CONFIG_FILE"},
Destination: &cfg.File,
},
&cli.StringFlag{
Name: "log-level",
Value: "info",
Usage: "Set logging level",
EnvVar: "REVA_LOG_LEVEL",
EnvVars: []string{"REVA_LOG_LEVEL"},
Destination: &cfg.Log.Level,
},
&cli.BoolTFlag{
&cli.BoolFlag{
Name: "log-pretty",
Usage: "Enable pretty logging",
EnvVar: "REVA_LOG_PRETTY",
EnvVars: []string{"REVA_LOG_PRETTY"},
Destination: &cfg.Log.Pretty,
},
&cli.BoolTFlag{
&cli.BoolFlag{
Name: "log-color",
Usage: "Enable colored logging",
EnvVar: "REVA_LOG_COLOR",
EnvVars: []string{"REVA_LOG_COLOR"},
Destination: &cfg.Log.Color,
},
}
+20 -21
View File
@@ -1,7 +1,7 @@
package flagset
import (
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis-reva/pkg/config"
)
@@ -12,35 +12,35 @@ func SharingWithConfig(cfg *config.Config) []cli.Flag {
&cli.BoolFlag{
Name: "tracing-enabled",
Usage: "Enable sending traces",
EnvVar: "REVA_TRACING_ENABLED",
EnvVars: []string{"REVA_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled,
},
&cli.StringFlag{
Name: "tracing-type",
Value: "jaeger",
Usage: "Tracing backend type",
EnvVar: "REVA_TRACING_TYPE",
EnvVars: []string{"REVA_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
&cli.StringFlag{
Name: "tracing-endpoint",
Value: "",
Usage: "Endpoint for the agent",
EnvVar: "REVA_TRACING_ENDPOINT",
EnvVars: []string{"REVA_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
&cli.StringFlag{
Name: "tracing-collector",
Value: "",
Usage: "Endpoint for the collector",
EnvVar: "REVA_TRACING_COLLECTOR",
EnvVars: []string{"REVA_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
&cli.StringFlag{
Name: "tracing-service",
Value: "reva",
Usage: "Service name for tracing",
EnvVar: "REVA_TRACING_SERVICE",
EnvVars: []string{"REVA_TRACING_SERVICE"},
Destination: &cfg.Tracing.Service,
},
@@ -49,26 +49,26 @@ func SharingWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9151",
Usage: "Address to bind debug server",
EnvVar: "REVA_SHARING_DEBUG_ADDR",
EnvVars: []string{"REVA_SHARING_DEBUG_ADDR"},
Destination: &cfg.Reva.Sharing.DebugAddr,
},
&cli.StringFlag{
Name: "debug-token",
Value: "",
Usage: "Token to grant metrics access",
EnvVar: "REVA_DEBUG_TOKEN",
EnvVars: []string{"REVA_DEBUG_TOKEN"},
Destination: &cfg.Debug.Token,
},
&cli.BoolFlag{
Name: "debug-pprof",
Usage: "Enable pprof debugging",
EnvVar: "REVA_DEBUG_PPROF",
EnvVars: []string{"REVA_DEBUG_PPROF"},
Destination: &cfg.Debug.Pprof,
},
&cli.BoolFlag{
Name: "debug-zpages",
Usage: "Enable zpages debugging",
EnvVar: "REVA_DEBUG_ZPAGES",
EnvVars: []string{"REVA_DEBUG_ZPAGES"},
Destination: &cfg.Debug.Zpages,
},
@@ -78,7 +78,7 @@ func SharingWithConfig(cfg *config.Config) []cli.Flag {
Name: "jwt-secret",
Value: "Pive-Fumkiu4",
Usage: "Shared jwt secret for reva service communication",
EnvVar: "REVA_JWT_SECRET",
EnvVars: []string{"REVA_JWT_SECRET"},
Destination: &cfg.Reva.JWTSecret,
},
@@ -90,36 +90,35 @@ func SharingWithConfig(cfg *config.Config) []cli.Flag {
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVar: "REVA_SHARING_NETWORK",
EnvVars: []string{"REVA_SHARING_NETWORK"},
Destination: &cfg.Reva.Sharing.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "grpc",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVar: "REVA_SHARING_PROTOCOL",
EnvVars: []string{"REVA_SHARING_PROTOCOL"},
Destination: &cfg.Reva.Sharing.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9150",
Usage: "Address to bind reva service",
EnvVar: "REVA_SHARING_ADDR",
EnvVars: []string{"REVA_SHARING_ADDR"},
Destination: &cfg.Reva.Sharing.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9150",
Usage: "URL to use for the reva service",
EnvVar: "REVA_SHARING_URL",
EnvVars: []string{"REVA_SHARING_URL"},
Destination: &cfg.Reva.Sharing.URL,
},
&cli.StringFlag{
Name: "services",
Value: "usershareprovider,publicshareprovider", // TODO osmshareprovider
Usage: "comma separated list of services to include",
EnvVar: "REVA_SHARING_SERVICES",
Destination: &cfg.Reva.Sharing.Services,
&cli.StringSliceFlag{
Name: "service",
Value: cli.NewStringSlice("usershareprovider", "publicshareprovider"), // TODO osmshareprovider
Usage: "--service usershareprovider [--service publicshareprovider]",
EnvVars: []string{"REVA_SHARING_SERVICES"},
},
}
}
+42 -43
View File
@@ -3,7 +3,7 @@ package flagset
import (
"os"
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis-reva/pkg/config"
)
@@ -14,35 +14,35 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
&cli.BoolFlag{
Name: "tracing-enabled",
Usage: "Enable sending traces",
EnvVar: "REVA_TRACING_ENABLED",
EnvVars: []string{"REVA_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled,
},
&cli.StringFlag{
Name: "tracing-type",
Value: "jaeger",
Usage: "Tracing backend type",
EnvVar: "REVA_TRACING_TYPE",
EnvVars: []string{"REVA_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
&cli.StringFlag{
Name: "tracing-endpoint",
Value: "",
Usage: "Endpoint for the agent",
EnvVar: "REVA_TRACING_ENDPOINT",
EnvVars: []string{"REVA_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
&cli.StringFlag{
Name: "tracing-collector",
Value: "",
Usage: "Endpoint for the collector",
EnvVar: "REVA_TRACING_COLLECTOR",
EnvVars: []string{"REVA_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
&cli.StringFlag{
Name: "tracing-service",
Value: "reva",
Usage: "Service name for tracing",
EnvVar: "REVA_TRACING_SERVICE",
EnvVars: []string{"REVA_TRACING_SERVICE"},
Destination: &cfg.Tracing.Service,
},
@@ -51,26 +51,26 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9155",
Usage: "Address to bind debug server",
EnvVar: "REVA_STORAGE_HOME_DEBUG_ADDR",
EnvVars: []string{"REVA_STORAGE_HOME_DEBUG_ADDR"},
Destination: &cfg.Reva.StorageHome.DebugAddr,
},
&cli.StringFlag{
Name: "debug-token",
Value: "",
Usage: "Token to grant metrics access",
EnvVar: "REVA_DEBUG_TOKEN",
EnvVars: []string{"REVA_DEBUG_TOKEN"},
Destination: &cfg.Debug.Token,
},
&cli.BoolFlag{
Name: "debug-pprof",
Usage: "Enable pprof debugging",
EnvVar: "REVA_DEBUG_PPROF",
EnvVars: []string{"REVA_DEBUG_PPROF"},
Destination: &cfg.Debug.Pprof,
},
&cli.BoolFlag{
Name: "debug-zpages",
Usage: "Enable zpages debugging",
EnvVar: "REVA_DEBUG_ZPAGES",
EnvVars: []string{"REVA_DEBUG_ZPAGES"},
Destination: &cfg.Debug.Zpages,
},
@@ -80,7 +80,7 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
Name: "jwt-secret",
Value: "Pive-Fumkiu4",
Usage: "Shared jwt secret for reva service communication",
EnvVar: "REVA_JWT_SECRET",
EnvVars: []string{"REVA_JWT_SECRET"},
Destination: &cfg.Reva.JWTSecret,
},
@@ -92,84 +92,83 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVar: "REVA_STORAGE_HOME_NETWORK",
EnvVars: []string{"REVA_STORAGE_HOME_NETWORK"},
Destination: &cfg.Reva.StorageHome.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "grpc",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVar: "REVA_STORAGE_HOME_PROTOCOL",
EnvVars: []string{"REVA_STORAGE_HOME_PROTOCOL"},
Destination: &cfg.Reva.StorageHome.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9154",
Usage: "Address to bind reva service",
EnvVar: "REVA_STORAGE_HOME_ADDR",
EnvVars: []string{"REVA_STORAGE_HOME_ADDR"},
Destination: &cfg.Reva.StorageHome.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9154",
Usage: "URL to use for the reva service",
EnvVar: "REVA_STORAGE_HOME_URL",
EnvVars: []string{"REVA_STORAGE_HOME_URL"},
Destination: &cfg.Reva.StorageHome.URL,
},
&cli.StringFlag{
Name: "services",
Value: "storageprovider",
Usage: "comma separated list of services to include",
EnvVar: "REVA_STORAGE_HOME_SERVICES",
Destination: &cfg.Reva.StorageHome.Services,
&cli.StringSliceFlag{
Name: "service",
Value: cli.NewStringSlice("storageprovider"),
Usage: "--service storageprovider [--service otherservice]",
EnvVars: []string{"REVA_STORAGE_HOME_SERVICES"},
},
&cli.StringFlag{
Name: "driver",
Value: "owncloud",
Usage: "storage driver, eg. local, eos, owncloud or s3",
EnvVar: "REVA_STORAGE_HOME_DRIVER",
EnvVars: []string{"REVA_STORAGE_HOME_DRIVER"},
Destination: &cfg.Reva.StorageHome.Driver,
},
&cli.StringFlag{
Name: "path-wrapper",
Value: "context",
Usage: "path wrapper",
EnvVar: "REVA_STORAGE_HOME_PATH_WRAPPER",
EnvVars: []string{"REVA_STORAGE_HOME_PATH_WRAPPER"},
Destination: &cfg.Reva.StorageHome.PathWrapper,
},
&cli.StringFlag{
Name: "path-wrapper-context-prefix",
Value: "",
Usage: "path wrapper context prefix",
EnvVar: "REVA_STORAGE_HOME_PATH_WRAPPER_CONTEXT_PREFIX",
EnvVars: []string{"REVA_STORAGE_HOME_PATH_WRAPPER_CONTEXT_PREFIX"},
Destination: &cfg.Reva.StorageHome.PathWrapperContext.Prefix,
},
&cli.StringFlag{
Name: "mount-path",
Value: "/home",
Usage: "mount path",
EnvVar: "REVA_STORAGE_HOME_MOUNT_PATH",
EnvVars: []string{"REVA_STORAGE_HOME_MOUNT_PATH"},
Destination: &cfg.Reva.StorageHome.MountPath,
},
&cli.StringFlag{
Name: "mount-id",
Value: "123e4567-e89b-12d3-a456-426655440000",
Usage: "mount id",
EnvVar: "REVA_STORAGE_HOME_MOUNT_ID",
EnvVars: []string{"REVA_STORAGE_HOME_MOUNT_ID"},
Destination: &cfg.Reva.StorageHome.MountID,
},
&cli.BoolFlag{
Name: "expose-data-server",
Usage: "exposes a dedicated data server",
EnvVar: "REVA_STORAGE_HOME_EXPOSE_DATA_SERVER",
EnvVars: []string{"REVA_STORAGE_HOME_EXPOSE_DATA_SERVER"},
Destination: &cfg.Reva.StorageHome.ExposeDataServer,
},
&cli.StringFlag{
Name: "data-server-url",
Value: "http://localhost:9156/data",
Usage: "data server url",
EnvVar: "REVA_STORAGE_HOME_DATA_SERVER_URL",
EnvVars: []string{"REVA_STORAGE_HOME_DATA_SERVER_URL"},
Destination: &cfg.Reva.StorageHome.DataServerURL,
},
@@ -181,87 +180,87 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-eos-namespace",
Value: "",
Usage: "Namespace for metadata operations",
EnvVar: "REVA_STORAGE_EOS_NAMESPACE",
EnvVars: []string{"REVA_STORAGE_EOS_NAMESPACE"},
Destination: &cfg.Reva.Storages.EOS.Namespace,
},
&cli.StringFlag{
Name: "storage-eos-binary",
Value: "/usr/bin/eos",
Usage: "Location of the eos binary",
EnvVar: "REVA_STORAGE_EOS_BINARY",
EnvVars: []string{"REVA_STORAGE_EOS_BINARY"},
Destination: &cfg.Reva.Storages.EOS.EosBinary,
},
&cli.StringFlag{
Name: "storage-eos-xrdcopy-binary",
Value: "/usr/bin/xrdcopy",
Usage: "Location of the xrdcopy binary",
EnvVar: "REVA_STORAGE_EOS_XRDCOPY_BINARY",
EnvVars: []string{"REVA_STORAGE_EOS_XRDCOPY_BINARY"},
Destination: &cfg.Reva.Storages.EOS.XrdcopyBinary,
},
&cli.StringFlag{
Name: "storage-eos-master-url",
Value: "root://eos-example.org",
Usage: "URL of the Master EOS MGM",
EnvVar: "REVA_STORAGE_EOS_MASTER_URL",
EnvVars: []string{"REVA_STORAGE_EOS_MASTER_URL"},
Destination: &cfg.Reva.Storages.EOS.MasterURL,
},
&cli.StringFlag{
Name: "storage-eos-slave-url",
Value: "root://eos-example.org",
Usage: "URL of the Slave EOS MGM",
EnvVar: "REVA_STORAGE_EOS_SLAVE_URL",
EnvVars: []string{"REVA_STORAGE_EOS_SLAVE_URL"},
Destination: &cfg.Reva.Storages.EOS.SlaveURL,
},
&cli.StringFlag{
Name: "storage-eos-cache-directory",
Value: os.TempDir(),
Usage: "Location on the local fs where to store reads",
EnvVar: "REVA_STORAGE_EOS_CACHE_DIRECTORY",
EnvVars: []string{"REVA_STORAGE_EOS_CACHE_DIRECTORY"},
Destination: &cfg.Reva.Storages.EOS.CacheDirectory,
},
&cli.BoolFlag{
Name: "storage-eos-enable-logging",
Usage: "Enables logging of the commands executed",
EnvVar: "REVA_STORAGE_EOS_ENABLE_LOGGING",
EnvVars: []string{"REVA_STORAGE_EOS_ENABLE_LOGGING"},
Destination: &cfg.Reva.Storages.EOS.EnableLogging,
},
&cli.BoolFlag{
Name: "storage-eos-show-hidden-sysfiles",
Usage: "show internal EOS files like .sys.v# and .sys.a# files.",
EnvVar: "REVA_STORAGE_EOS_SHOW_HIDDEN_SYSFILES",
EnvVars: []string{"REVA_STORAGE_EOS_SHOW_HIDDEN_SYSFILES"},
Destination: &cfg.Reva.Storages.EOS.ShowHiddenSysFiles,
},
&cli.BoolFlag{
Name: "storage-eos-force-singleuser-mode",
Usage: "force connections to EOS to use SingleUsername",
EnvVar: "REVA_STORAGE_EOS_FORCE_SINGLEUSER_MODE",
EnvVars: []string{"REVA_STORAGE_EOS_FORCE_SINGLEUSER_MODE"},
Destination: &cfg.Reva.Storages.EOS.ForceSingleUserMode,
},
&cli.BoolFlag{
Name: "storage-eos-use-keytab",
Usage: "authenticate requests by using an EOS keytab",
EnvVar: "REVA_STORAGE_EOS_USE_KEYTAB",
EnvVars: []string{"REVA_STORAGE_EOS_USE_KEYTAB"},
Destination: &cfg.Reva.Storages.EOS.UseKeytab,
},
&cli.StringFlag{
Name: "storage-eos-sec-protocol",
Value: "",
Usage: "the xrootd security protocol to use between the server and EOS",
EnvVar: "REVA_STORAGE_EOS_SEC_PROTOCOL",
EnvVars: []string{"REVA_STORAGE_EOS_SEC_PROTOCOL"},
Destination: &cfg.Reva.Storages.EOS.SecProtocol,
},
&cli.StringFlag{
Name: "storage-eos-keytab",
Value: "",
Usage: "the location of the keytab to use to authenticate to EOS",
EnvVar: "REVA_STORAGE_EOS_KEYTAB",
EnvVars: []string{"REVA_STORAGE_EOS_KEYTAB"},
Destination: &cfg.Reva.Storages.EOS.Keytab,
},
&cli.StringFlag{
Name: "storage-eos-single-username",
Value: "",
Usage: "the username to use when SingleUserMode is enabled",
EnvVar: "REVA_STORAGE_EOS_SINGLE_USERNAME",
EnvVars: []string{"REVA_STORAGE_EOS_SINGLE_USERNAME"},
Destination: &cfg.Reva.Storages.EOS.SingleUsername,
},
@@ -271,7 +270,7 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-local-root",
Value: "/var/tmp/reva/root",
Usage: "the path to the local storage root",
EnvVar: "REVA_STORAGE_LOCAL_ROOT",
EnvVars: []string{"REVA_STORAGE_LOCAL_ROOT"},
Destination: &cfg.Reva.Storages.Local.Root,
},
@@ -281,7 +280,7 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-owncloud-datadir",
Value: "/var/tmp/reva/data",
Usage: "the path to the owncloud data directory",
EnvVar: "REVA_STORAGE_OWNCLOUD_DATADIR",
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_DATADIR"},
Destination: &cfg.Reva.Storages.OwnCloud.Datadirectory,
},
}
+39 -40
View File
@@ -3,7 +3,7 @@ package flagset
import (
"os"
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis-reva/pkg/config"
)
@@ -14,35 +14,35 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag {
&cli.BoolFlag{
Name: "tracing-enabled",
Usage: "Enable sending traces",
EnvVar: "REVA_TRACING_ENABLED",
EnvVars: []string{"REVA_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled,
},
&cli.StringFlag{
Name: "tracing-type",
Value: "jaeger",
Usage: "Tracing backend type",
EnvVar: "REVA_TRACING_TYPE",
EnvVars: []string{"REVA_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
&cli.StringFlag{
Name: "tracing-endpoint",
Value: "",
Usage: "Endpoint for the agent",
EnvVar: "REVA_TRACING_ENDPOINT",
EnvVars: []string{"REVA_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
&cli.StringFlag{
Name: "tracing-collector",
Value: "",
Usage: "Endpoint for the collector",
EnvVar: "REVA_TRACING_COLLECTOR",
EnvVars: []string{"REVA_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
&cli.StringFlag{
Name: "tracing-service",
Value: "reva",
Usage: "Service name for tracing",
EnvVar: "REVA_TRACING_SERVICE",
EnvVars: []string{"REVA_TRACING_SERVICE"},
Destination: &cfg.Tracing.Service,
},
@@ -51,26 +51,26 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9157",
Usage: "Address to bind debug server",
EnvVar: "REVA_STORAGE_HOME_DATA_DEBUG_ADDR",
EnvVars: []string{"REVA_STORAGE_HOME_DATA_DEBUG_ADDR"},
Destination: &cfg.Reva.StorageHomeData.DebugAddr,
},
&cli.StringFlag{
Name: "debug-token",
Value: "",
Usage: "Token to grant metrics access",
EnvVar: "REVA_DEBUG_TOKEN",
EnvVars: []string{"REVA_DEBUG_TOKEN"},
Destination: &cfg.Debug.Token,
},
&cli.BoolFlag{
Name: "debug-pprof",
Usage: "Enable pprof debugging",
EnvVar: "REVA_DEBUG_PPROF",
EnvVars: []string{"REVA_DEBUG_PPROF"},
Destination: &cfg.Debug.Pprof,
},
&cli.BoolFlag{
Name: "debug-zpages",
Usage: "Enable zpages debugging",
EnvVar: "REVA_DEBUG_ZPAGES",
EnvVars: []string{"REVA_DEBUG_ZPAGES"},
Destination: &cfg.Debug.Zpages,
},
@@ -80,7 +80,7 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag {
Name: "jwt-secret",
Value: "Pive-Fumkiu4",
Usage: "Shared jwt secret for reva service communication",
EnvVar: "REVA_JWT_SECRET",
EnvVars: []string{"REVA_JWT_SECRET"},
Destination: &cfg.Reva.JWTSecret,
},
@@ -92,56 +92,55 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag {
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVar: "REVA_STORAGE_HOME_DATA_NETWORK",
EnvVars: []string{"REVA_STORAGE_HOME_DATA_NETWORK"},
Destination: &cfg.Reva.StorageHomeData.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "http",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVar: "REVA_STORAGE_HOME_DATA_PROTOCOL",
EnvVars: []string{"REVA_STORAGE_HOME_DATA_PROTOCOL"},
Destination: &cfg.Reva.StorageHomeData.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9156",
Usage: "Address to bind reva service",
EnvVar: "REVA_STORAGE_HOME_DATA_ADDR",
EnvVars: []string{"REVA_STORAGE_HOME_DATA_ADDR"},
Destination: &cfg.Reva.StorageHomeData.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9156",
Usage: "URL to use for the reva service",
EnvVar: "REVA_STORAGE_HOME_DATA_URL",
EnvVars: []string{"REVA_STORAGE_HOME_DATA_URL"},
Destination: &cfg.Reva.StorageHomeData.URL,
},
&cli.StringFlag{
Name: "services",
Value: "dataprovider",
Usage: "comma separated list of services to include",
EnvVar: "REVA_STORAGE_HOME_DATA_SERVICES",
Destination: &cfg.Reva.StorageHomeData.Services,
&cli.StringSliceFlag{
Name: "service",
Value: cli.NewStringSlice("dataprovider"),
Usage: "--service dataprovider [--service otherservice]",
EnvVars: []string{"REVA_STORAGE_HOME_DATA_SERVICES"},
},
&cli.StringFlag{
Name: "driver",
Value: "owncloud",
Usage: "storage driver, eg. local, eos, owncloud or s3",
EnvVar: "REVA_STORAGE_HOME_DATA_DRIVER",
EnvVars: []string{"REVA_STORAGE_HOME_DATA_DRIVER"},
Destination: &cfg.Reva.StorageHomeData.Driver,
},
&cli.StringFlag{
Name: "prefix",
Value: "data",
Usage: "prefix for the http endpoint, without leading slash",
EnvVar: "REVA_STORAGE_HOME_DATA_PREFIX",
EnvVars: []string{"REVA_STORAGE_HOME_DATA_PREFIX"},
Destination: &cfg.Reva.StorageHomeData.Prefix,
},
&cli.StringFlag{
Name: "temp-folder",
Value: "/var/tmp/",
Usage: "temp folder",
EnvVar: "REVA_STORAGE_HOME_DATA_TEMP_FOLDER",
EnvVars: []string{"REVA_STORAGE_HOME_DATA_TEMP_FOLDER"},
Destination: &cfg.Reva.StorageHomeData.TempFolder,
},
@@ -153,87 +152,87 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-eos-namespace",
Value: "",
Usage: "Namespace for metadata operations",
EnvVar: "REVA_STORAGE_EOS_NAMESPACE",
EnvVars: []string{"REVA_STORAGE_EOS_NAMESPACE"},
Destination: &cfg.Reva.Storages.EOS.Namespace,
},
&cli.StringFlag{
Name: "storage-eos-binary",
Value: "/usr/bin/eos",
Usage: "Location of the eos binary",
EnvVar: "REVA_STORAGE_EOS_BINARY",
EnvVars: []string{"REVA_STORAGE_EOS_BINARY"},
Destination: &cfg.Reva.Storages.EOS.EosBinary,
},
&cli.StringFlag{
Name: "storage-eos-xrdcopy-binary",
Value: "/usr/bin/xrdcopy",
Usage: "Location of the xrdcopy binary",
EnvVar: "REVA_STORAGE_EOS_XRDCOPY_BINARY",
EnvVars: []string{"REVA_STORAGE_EOS_XRDCOPY_BINARY"},
Destination: &cfg.Reva.Storages.EOS.XrdcopyBinary,
},
&cli.StringFlag{
Name: "storage-eos-master-url",
Value: "root://eos-example.org",
Usage: "URL of the Master EOS MGM",
EnvVar: "REVA_STORAGE_EOS_MASTER_URL",
EnvVars: []string{"REVA_STORAGE_EOS_MASTER_URL"},
Destination: &cfg.Reva.Storages.EOS.MasterURL,
},
&cli.StringFlag{
Name: "storage-eos-slave-url",
Value: "root://eos-example.org",
Usage: "URL of the Slave EOS MGM",
EnvVar: "REVA_STORAGE_EOS_SLAVE_URL",
EnvVars: []string{"REVA_STORAGE_EOS_SLAVE_URL"},
Destination: &cfg.Reva.Storages.EOS.SlaveURL,
},
&cli.StringFlag{
Name: "storage-eos-cache-directory",
Value: os.TempDir(),
Usage: "Location on the local fs where to store reads",
EnvVar: "REVA_STORAGE_EOS_CACHE_DIRECTORY",
EnvVars: []string{"REVA_STORAGE_EOS_CACHE_DIRECTORY"},
Destination: &cfg.Reva.Storages.EOS.CacheDirectory,
},
&cli.BoolFlag{
Name: "storage-eos-enable-logging",
Usage: "Enables logging of the commands executed",
EnvVar: "REVA_STORAGE_EOS_ENABLE_LOGGING",
EnvVars: []string{"REVA_STORAGE_EOS_ENABLE_LOGGING"},
Destination: &cfg.Reva.Storages.EOS.EnableLogging,
},
&cli.BoolFlag{
Name: "storage-eos-show-hidden-sysfiles",
Usage: "show internal EOS files like .sys.v# and .sys.a# files.",
EnvVar: "REVA_STORAGE_EOS_SHOW_HIDDEN_SYSFILES",
EnvVars: []string{"REVA_STORAGE_EOS_SHOW_HIDDEN_SYSFILES"},
Destination: &cfg.Reva.Storages.EOS.ShowHiddenSysFiles,
},
&cli.BoolFlag{
Name: "storage-eos-force-singleuser-mode",
Usage: "force connections to EOS to use SingleUsername",
EnvVar: "REVA_STORAGE_EOS_FORCE_SINGLEUSER_MODE",
EnvVars: []string{"REVA_STORAGE_EOS_FORCE_SINGLEUSER_MODE"},
Destination: &cfg.Reva.Storages.EOS.ForceSingleUserMode,
},
&cli.BoolFlag{
Name: "storage-eos-use-keytab",
Usage: "authenticate requests by using an EOS keytab",
EnvVar: "REVA_STORAGE_EOS_USE_KEYTAB",
EnvVars: []string{"REVA_STORAGE_EOS_USE_KEYTAB"},
Destination: &cfg.Reva.Storages.EOS.UseKeytab,
},
&cli.StringFlag{
Name: "storage-eos-sec-protocol",
Value: "",
Usage: "the xrootd security protocol to use between the server and EOS",
EnvVar: "REVA_STORAGE_EOS_SEC_PROTOCOL",
EnvVars: []string{"REVA_STORAGE_EOS_SEC_PROTOCOL"},
Destination: &cfg.Reva.Storages.EOS.SecProtocol,
},
&cli.StringFlag{
Name: "storage-eos-keytab",
Value: "",
Usage: "the location of the keytab to use to authenticate to EOS",
EnvVar: "REVA_STORAGE_EOS_KEYTAB",
EnvVars: []string{"REVA_STORAGE_EOS_KEYTAB"},
Destination: &cfg.Reva.Storages.EOS.Keytab,
},
&cli.StringFlag{
Name: "storage-eos-single-username",
Value: "",
Usage: "the username to use when SingleUserMode is enabled",
EnvVar: "REVA_STORAGE_EOS_SINGLE_USERNAME",
EnvVars: []string{"REVA_STORAGE_EOS_SINGLE_USERNAME"},
Destination: &cfg.Reva.Storages.EOS.SingleUsername,
},
@@ -243,7 +242,7 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-local-root",
Value: "/var/tmp/reva/root",
Usage: "the path to the local storage root",
EnvVar: "REVA_STORAGE_LOCAL_ROOT",
EnvVars: []string{"REVA_STORAGE_LOCAL_ROOT"},
Destination: &cfg.Reva.Storages.Local.Root,
},
@@ -253,7 +252,7 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-owncloud-datadir",
Value: "/var/tmp/reva/data",
Usage: "the path to the owncloud data directory",
EnvVar: "REVA_STORAGE_OWNCLOUD_DATADIR",
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_DATADIR"},
Destination: &cfg.Reva.Storages.OwnCloud.Datadirectory,
},
@@ -263,7 +262,7 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag {
Name: "gateway-url",
Value: "localhost:9142",
Usage: "URL to use for the reva gateway service",
EnvVar: "REVA_GATEWAY_URL",
EnvVars: []string{"REVA_GATEWAY_URL"},
Destination: &cfg.Reva.Gateway.URL,
},
}
+42 -43
View File
@@ -3,7 +3,7 @@ package flagset
import (
"os"
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis-reva/pkg/config"
)
@@ -14,35 +14,35 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag {
&cli.BoolFlag{
Name: "tracing-enabled",
Usage: "Enable sending traces",
EnvVar: "REVA_TRACING_ENABLED",
EnvVars: []string{"REVA_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled,
},
&cli.StringFlag{
Name: "tracing-type",
Value: "jaeger",
Usage: "Tracing backend type",
EnvVar: "REVA_TRACING_TYPE",
EnvVars: []string{"REVA_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
&cli.StringFlag{
Name: "tracing-endpoint",
Value: "",
Usage: "Endpoint for the agent",
EnvVar: "REVA_TRACING_ENDPOINT",
EnvVars: []string{"REVA_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
&cli.StringFlag{
Name: "tracing-collector",
Value: "",
Usage: "Endpoint for the collector",
EnvVar: "REVA_TRACING_COLLECTOR",
EnvVars: []string{"REVA_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
&cli.StringFlag{
Name: "tracing-service",
Value: "reva",
Usage: "Service name for tracing",
EnvVar: "REVA_TRACING_SERVICE",
EnvVars: []string{"REVA_TRACING_SERVICE"},
Destination: &cfg.Tracing.Service,
},
@@ -51,26 +51,26 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9163",
Usage: "Address to bind debug server",
EnvVar: "REVA_STORAGE_OC_DEBUG_ADDR",
EnvVars: []string{"REVA_STORAGE_OC_DEBUG_ADDR"},
Destination: &cfg.Reva.StorageOC.DebugAddr,
},
&cli.StringFlag{
Name: "debug-token",
Value: "",
Usage: "Token to grant metrics access",
EnvVar: "REVA_DEBUG_TOKEN",
EnvVars: []string{"REVA_DEBUG_TOKEN"},
Destination: &cfg.Debug.Token,
},
&cli.BoolFlag{
Name: "debug-pprof",
Usage: "Enable pprof debugging",
EnvVar: "REVA_DEBUG_PPROF",
EnvVars: []string{"REVA_DEBUG_PPROF"},
Destination: &cfg.Debug.Pprof,
},
&cli.BoolFlag{
Name: "debug-zpages",
Usage: "Enable zpages debugging",
EnvVar: "REVA_DEBUG_ZPAGES",
EnvVars: []string{"REVA_DEBUG_ZPAGES"},
Destination: &cfg.Debug.Zpages,
},
@@ -80,7 +80,7 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag {
Name: "jwt-secret",
Value: "Pive-Fumkiu4",
Usage: "Shared jwt secret for reva service communication",
EnvVar: "REVA_JWT_SECRET",
EnvVars: []string{"REVA_JWT_SECRET"},
Destination: &cfg.Reva.JWTSecret,
},
@@ -92,84 +92,83 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag {
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVar: "REVA_STORAGE_OC_NETWORK",
EnvVars: []string{"REVA_STORAGE_OC_NETWORK"},
Destination: &cfg.Reva.StorageOC.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "grpc",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVar: "REVA_STORAGE_OC_PROTOCOL",
EnvVars: []string{"REVA_STORAGE_OC_PROTOCOL"},
Destination: &cfg.Reva.StorageOC.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9162",
Usage: "Address to bind reva service",
EnvVar: "REVA_STORAGE_OC_ADDR",
EnvVars: []string{"REVA_STORAGE_OC_ADDR"},
Destination: &cfg.Reva.StorageOC.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9162",
Usage: "URL to use for the reva service",
EnvVar: "REVA_STORAGE_OC_URL",
EnvVars: []string{"REVA_STORAGE_OC_URL"},
Destination: &cfg.Reva.StorageOC.URL,
},
&cli.StringFlag{
Name: "services",
Value: "storageprovider",
Usage: "comma separated list of services to include",
EnvVar: "REVA_STORAGE_OC_SERVICES",
Destination: &cfg.Reva.StorageOC.Services,
&cli.StringSliceFlag{
Name: "service",
Value: cli.NewStringSlice("storageprovider"),
Usage: "--service storageprovider [--service otherservice]",
EnvVars: []string{"REVA_STORAGE_OC_SERVICES"},
},
&cli.StringFlag{
Name: "driver",
Value: "owncloud",
Usage: "storage driver, eg. local, eos, owncloud or s3",
EnvVar: "REVA_STORAGE_OC_DRIVER",
EnvVars: []string{"REVA_STORAGE_OC_DRIVER"},
Destination: &cfg.Reva.StorageOC.Driver,
},
&cli.StringFlag{
Name: "path-wrapper",
Value: "",
Usage: "path wrapper",
EnvVar: "REVA_STORAGE_OC_PATH_WRAPPER",
EnvVars: []string{"REVA_STORAGE_OC_PATH_WRAPPER"},
Destination: &cfg.Reva.StorageOC.PathWrapper,
},
&cli.StringFlag{
Name: "path-wrapper-context-prefix",
Value: "",
Usage: "path wrapper context prefix",
EnvVar: "REVA_STORAGE_OC_PATH_WRAPPER_CONTEXT_PREFIX",
EnvVars: []string{"REVA_STORAGE_OC_PATH_WRAPPER_CONTEXT_PREFIX"},
Destination: &cfg.Reva.StorageOC.PathWrapperContext.Prefix,
},
&cli.StringFlag{
Name: "mount-path",
Value: "/oc",
Usage: "mount path",
EnvVar: "REVA_STORAGE_OC_MOUNT_PATH",
EnvVars: []string{"REVA_STORAGE_OC_MOUNT_PATH"},
Destination: &cfg.Reva.StorageOC.MountPath,
},
&cli.StringFlag{
Name: "mount-id",
Value: "123e4567-e89b-12d3-a456-426655440000",
Usage: "mount id",
EnvVar: "REVA_STORAGE_OC_MOUNT_ID",
EnvVars: []string{"REVA_STORAGE_OC_MOUNT_ID"},
Destination: &cfg.Reva.StorageOC.MountID,
},
&cli.BoolFlag{
Name: "expose-data-server",
Usage: "exposes a dedicated data server",
EnvVar: "REVA_STORAGE_OC_EXPOSE_DATA_SERVER",
EnvVars: []string{"REVA_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",
EnvVar: "REVA_STORAGE_OC_DATA_SERVER_URL",
EnvVars: []string{"REVA_STORAGE_OC_DATA_SERVER_URL"},
Destination: &cfg.Reva.StorageOC.DataServerURL,
},
@@ -181,87 +180,87 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-eos-namespace",
Value: "",
Usage: "Namespace for metadata operations",
EnvVar: "REVA_STORAGE_EOS_NAMESPACE",
EnvVars: []string{"REVA_STORAGE_EOS_NAMESPACE"},
Destination: &cfg.Reva.Storages.EOS.Namespace,
},
&cli.StringFlag{
Name: "storage-eos-binary",
Value: "/usr/bin/eos",
Usage: "Location of the eos binary",
EnvVar: "REVA_STORAGE_EOS_BINARY",
EnvVars: []string{"REVA_STORAGE_EOS_BINARY"},
Destination: &cfg.Reva.Storages.EOS.EosBinary,
},
&cli.StringFlag{
Name: "storage-eos-xrdcopy-binary",
Value: "/usr/bin/xrdcopy",
Usage: "Location of the xrdcopy binary",
EnvVar: "REVA_STORAGE_EOS_XRDCOPY_BINARY",
EnvVars: []string{"REVA_STORAGE_EOS_XRDCOPY_BINARY"},
Destination: &cfg.Reva.Storages.EOS.XrdcopyBinary,
},
&cli.StringFlag{
Name: "storage-eos-master-url",
Value: "root://eos-example.org",
Usage: "URL of the Master EOS MGM",
EnvVar: "REVA_STORAGE_EOS_MASTER_URL",
EnvVars: []string{"REVA_STORAGE_EOS_MASTER_URL"},
Destination: &cfg.Reva.Storages.EOS.MasterURL,
},
&cli.StringFlag{
Name: "storage-eos-slave-url",
Value: "root://eos-example.org",
Usage: "URL of the Slave EOS MGM",
EnvVar: "REVA_STORAGE_EOS_SLAVE_URL",
EnvVars: []string{"REVA_STORAGE_EOS_SLAVE_URL"},
Destination: &cfg.Reva.Storages.EOS.SlaveURL,
},
&cli.StringFlag{
Name: "storage-eos-cache-directory",
Value: os.TempDir(),
Usage: "Location on the local fs where to store reads",
EnvVar: "REVA_STORAGE_EOS_CACHE_DIRECTORY",
EnvVars: []string{"REVA_STORAGE_EOS_CACHE_DIRECTORY"},
Destination: &cfg.Reva.Storages.EOS.CacheDirectory,
},
&cli.BoolFlag{
Name: "storage-eos-enable-logging",
Usage: "Enables logging of the commands executed",
EnvVar: "REVA_STORAGE_EOS_ENABLE_LOGGING",
EnvVars: []string{"REVA_STORAGE_EOS_ENABLE_LOGGING"},
Destination: &cfg.Reva.Storages.EOS.EnableLogging,
},
&cli.BoolFlag{
Name: "storage-eos-show-hidden-sysfiles",
Usage: "show internal EOS files like .sys.v# and .sys.a# files.",
EnvVar: "REVA_STORAGE_EOS_SHOW_HIDDEN_SYSFILES",
EnvVars: []string{"REVA_STORAGE_EOS_SHOW_HIDDEN_SYSFILES"},
Destination: &cfg.Reva.Storages.EOS.ShowHiddenSysFiles,
},
&cli.BoolFlag{
Name: "storage-eos-force-singleuser-mode",
Usage: "force connections to EOS to use SingleUsername",
EnvVar: "REVA_STORAGE_EOS_FORCE_SINGLEUSER_MODE",
EnvVars: []string{"REVA_STORAGE_EOS_FORCE_SINGLEUSER_MODE"},
Destination: &cfg.Reva.Storages.EOS.ForceSingleUserMode,
},
&cli.BoolFlag{
Name: "storage-eos-use-keytab",
Usage: "authenticate requests by using an EOS keytab",
EnvVar: "REVA_STORAGE_EOS_USE_KEYTAB",
EnvVars: []string{"REVA_STORAGE_EOS_USE_KEYTAB"},
Destination: &cfg.Reva.Storages.EOS.UseKeytab,
},
&cli.StringFlag{
Name: "storage-eos-sec-protocol",
Value: "",
Usage: "the xrootd security protocol to use between the server and EOS",
EnvVar: "REVA_STORAGE_EOS_SEC_PROTOCOL",
EnvVars: []string{"REVA_STORAGE_EOS_SEC_PROTOCOL"},
Destination: &cfg.Reva.Storages.EOS.SecProtocol,
},
&cli.StringFlag{
Name: "storage-eos-keytab",
Value: "",
Usage: "the location of the keytab to use to authenticate to EOS",
EnvVar: "REVA_STORAGE_EOS_KEYTAB",
EnvVars: []string{"REVA_STORAGE_EOS_KEYTAB"},
Destination: &cfg.Reva.Storages.EOS.Keytab,
},
&cli.StringFlag{
Name: "storage-eos-single-username",
Value: "",
Usage: "the username to use when SingleUserMode is enabled",
EnvVar: "REVA_STORAGE_EOS_SINGLE_USERNAME",
EnvVars: []string{"REVA_STORAGE_EOS_SINGLE_USERNAME"},
Destination: &cfg.Reva.Storages.EOS.SingleUsername,
},
@@ -271,7 +270,7 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-local-root",
Value: "/var/tmp/reva/root",
Usage: "the path to the local storage root",
EnvVar: "REVA_STORAGE_LOCAL_ROOT",
EnvVars: []string{"REVA_STORAGE_LOCAL_ROOT"},
Destination: &cfg.Reva.Storages.Local.Root,
},
@@ -281,7 +280,7 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-owncloud-datadir",
Value: "/var/tmp/reva/data",
Usage: "the path to the owncloud data directory",
EnvVar: "REVA_STORAGE_OWNCLOUD_DATADIR",
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_DATADIR"},
Destination: &cfg.Reva.Storages.OwnCloud.Datadirectory,
},
}
+39 -40
View File
@@ -3,7 +3,7 @@ package flagset
import (
"os"
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis-reva/pkg/config"
)
@@ -14,35 +14,35 @@ func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag {
&cli.BoolFlag{
Name: "tracing-enabled",
Usage: "Enable sending traces",
EnvVar: "REVA_TRACING_ENABLED",
EnvVars: []string{"REVA_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled,
},
&cli.StringFlag{
Name: "tracing-type",
Value: "jaeger",
Usage: "Tracing backend type",
EnvVar: "REVA_TRACING_TYPE",
EnvVars: []string{"REVA_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
&cli.StringFlag{
Name: "tracing-endpoint",
Value: "",
Usage: "Endpoint for the agent",
EnvVar: "REVA_TRACING_ENDPOINT",
EnvVars: []string{"REVA_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
&cli.StringFlag{
Name: "tracing-collector",
Value: "",
Usage: "Endpoint for the collector",
EnvVar: "REVA_TRACING_COLLECTOR",
EnvVars: []string{"REVA_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
&cli.StringFlag{
Name: "tracing-service",
Value: "reva",
Usage: "Service name for tracing",
EnvVar: "REVA_TRACING_SERVICE",
EnvVars: []string{"REVA_TRACING_SERVICE"},
Destination: &cfg.Tracing.Service,
},
@@ -51,26 +51,26 @@ func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9165",
Usage: "Address to bind debug server",
EnvVar: "REVA_STORAGE_OC_DATA_DEBUG_ADDR",
EnvVars: []string{"REVA_STORAGE_OC_DATA_DEBUG_ADDR"},
Destination: &cfg.Reva.StorageOCData.DebugAddr,
},
&cli.StringFlag{
Name: "debug-token",
Value: "",
Usage: "Token to grant metrics access",
EnvVar: "REVA_DEBUG_TOKEN",
EnvVars: []string{"REVA_DEBUG_TOKEN"},
Destination: &cfg.Debug.Token,
},
&cli.BoolFlag{
Name: "debug-pprof",
Usage: "Enable pprof debugging",
EnvVar: "REVA_DEBUG_PPROF",
EnvVars: []string{"REVA_DEBUG_PPROF"},
Destination: &cfg.Debug.Pprof,
},
&cli.BoolFlag{
Name: "debug-zpages",
Usage: "Enable zpages debugging",
EnvVar: "REVA_DEBUG_ZPAGES",
EnvVars: []string{"REVA_DEBUG_ZPAGES"},
Destination: &cfg.Debug.Zpages,
},
@@ -80,7 +80,7 @@ func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag {
Name: "jwt-secret",
Value: "Pive-Fumkiu4",
Usage: "Shared jwt secret for reva service communication",
EnvVar: "REVA_JWT_SECRET",
EnvVars: []string{"REVA_JWT_SECRET"},
Destination: &cfg.Reva.JWTSecret,
},
@@ -92,56 +92,55 @@ func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag {
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVar: "REVA_STORAGE_OC_DATA_NETWORK",
EnvVars: []string{"REVA_STORAGE_OC_DATA_NETWORK"},
Destination: &cfg.Reva.StorageOCData.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "http",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVar: "REVA_STORAGE_OC_DATA_PROTOCOL",
EnvVars: []string{"REVA_STORAGE_OC_DATA_PROTOCOL"},
Destination: &cfg.Reva.StorageOCData.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9164",
Usage: "Address to bind reva service",
EnvVar: "REVA_STORAGE_OC_DATA_ADDR",
EnvVars: []string{"REVA_STORAGE_OC_DATA_ADDR"},
Destination: &cfg.Reva.StorageOCData.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9164",
Usage: "URL to use for the reva service",
EnvVar: "REVA_STORAGE_OC_DATA_URL",
EnvVars: []string{"REVA_STORAGE_OC_DATA_URL"},
Destination: &cfg.Reva.StorageOCData.URL,
},
&cli.StringFlag{
Name: "services",
Value: "dataprovider",
Usage: "comma separated list of services to include in the storage-oc data service",
EnvVar: "REVA_STORAGE_OC_DATA_SERVICES",
Destination: &cfg.Reva.StorageOCData.Services,
&cli.StringSliceFlag{
Name: "service",
Value: cli.NewStringSlice("dataprovider"),
Usage: "--service dataprovider [--service otherservice]",
EnvVars: []string{"REVA_STORAGE_OC_DATA_SERVICES"},
},
&cli.StringFlag{
Name: "driver",
Value: "owncloud",
Usage: "storage driver, eg. local, eos, owncloud or s3",
EnvVar: "REVA_STORAGE_OC_DATA_DRIVER",
EnvVars: []string{"REVA_STORAGE_OC_DATA_DRIVER"},
Destination: &cfg.Reva.StorageOCData.Driver,
},
&cli.StringFlag{
Name: "prefix",
Value: "data",
Usage: "prefix for the http endpoint, without leading slash",
EnvVar: "REVA_STORAGE_OC_DATA_PREFIX",
EnvVars: []string{"REVA_STORAGE_OC_DATA_PREFIX"},
Destination: &cfg.Reva.StorageOCData.Prefix,
},
&cli.StringFlag{
Name: "temp-folder",
Value: "/var/tmp/",
Usage: "temp folder",
EnvVar: "REVA_STORAGE_OC_DATA_TEMP_FOLDER",
EnvVars: []string{"REVA_STORAGE_OC_DATA_TEMP_FOLDER"},
Destination: &cfg.Reva.StorageOCData.TempFolder,
},
@@ -153,87 +152,87 @@ func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-eos-namespace",
Value: "",
Usage: "Namespace for metadata operations",
EnvVar: "REVA_STORAGE_EOS_NAMESPACE",
EnvVars: []string{"REVA_STORAGE_EOS_NAMESPACE"},
Destination: &cfg.Reva.Storages.EOS.Namespace,
},
&cli.StringFlag{
Name: "storage-eos-binary",
Value: "/usr/bin/eos",
Usage: "Location of the eos binary",
EnvVar: "REVA_STORAGE_EOS_BINARY",
EnvVars: []string{"REVA_STORAGE_EOS_BINARY"},
Destination: &cfg.Reva.Storages.EOS.EosBinary,
},
&cli.StringFlag{
Name: "storage-eos-xrdcopy-binary",
Value: "/usr/bin/xrdcopy",
Usage: "Location of the xrdcopy binary",
EnvVar: "REVA_STORAGE_EOS_XRDCOPY_BINARY",
EnvVars: []string{"REVA_STORAGE_EOS_XRDCOPY_BINARY"},
Destination: &cfg.Reva.Storages.EOS.XrdcopyBinary,
},
&cli.StringFlag{
Name: "storage-eos-master-url",
Value: "root://eos-example.org",
Usage: "URL of the Master EOS MGM",
EnvVar: "REVA_STORAGE_EOS_MASTER_URL",
EnvVars: []string{"REVA_STORAGE_EOS_MASTER_URL"},
Destination: &cfg.Reva.Storages.EOS.MasterURL,
},
&cli.StringFlag{
Name: "storage-eos-slave-url",
Value: "root://eos-example.org",
Usage: "URL of the Slave EOS MGM",
EnvVar: "REVA_STORAGE_EOS_SLAVE_URL",
EnvVars: []string{"REVA_STORAGE_EOS_SLAVE_URL"},
Destination: &cfg.Reva.Storages.EOS.SlaveURL,
},
&cli.StringFlag{
Name: "storage-eos-cache-directory",
Value: os.TempDir(),
Usage: "Location on the local fs where to store reads",
EnvVar: "REVA_STORAGE_EOS_CACHE_DIRECTORY",
EnvVars: []string{"REVA_STORAGE_EOS_CACHE_DIRECTORY"},
Destination: &cfg.Reva.Storages.EOS.CacheDirectory,
},
&cli.BoolFlag{
Name: "storage-eos-enable-logging",
Usage: "Enables logging of the commands executed",
EnvVar: "REVA_STORAGE_EOS_ENABLE_LOGGING",
EnvVars: []string{"REVA_STORAGE_EOS_ENABLE_LOGGING"},
Destination: &cfg.Reva.Storages.EOS.EnableLogging,
},
&cli.BoolFlag{
Name: "storage-eos-show-hidden-sysfiles",
Usage: "show internal EOS files like .sys.v# and .sys.a# files.",
EnvVar: "REVA_STORAGE_EOS_SHOW_HIDDEN_SYSFILES",
EnvVars: []string{"REVA_STORAGE_EOS_SHOW_HIDDEN_SYSFILES"},
Destination: &cfg.Reva.Storages.EOS.ShowHiddenSysFiles,
},
&cli.BoolFlag{
Name: "storage-eos-force-singleuser-mode",
Usage: "force connections to EOS to use SingleUsername",
EnvVar: "REVA_STORAGE_EOS_FORCE_SINGLEUSER_MODE",
EnvVars: []string{"REVA_STORAGE_EOS_FORCE_SINGLEUSER_MODE"},
Destination: &cfg.Reva.Storages.EOS.ForceSingleUserMode,
},
&cli.BoolFlag{
Name: "storage-eos-use-keytab",
Usage: "authenticate requests by using an EOS keytab",
EnvVar: "REVA_STORAGE_EOS_USE_KEYTAB",
EnvVars: []string{"REVA_STORAGE_EOS_USE_KEYTAB"},
Destination: &cfg.Reva.Storages.EOS.UseKeytab,
},
&cli.StringFlag{
Name: "storage-eos-sec-protocol",
Value: "",
Usage: "the xrootd security protocol to use between the server and EOS",
EnvVar: "REVA_STORAGE_EOS_SEC_PROTOCOL",
EnvVars: []string{"REVA_STORAGE_EOS_SEC_PROTOCOL"},
Destination: &cfg.Reva.Storages.EOS.SecProtocol,
},
&cli.StringFlag{
Name: "storage-eos-keytab",
Value: "",
Usage: "the location of the keytab to use to authenticate to EOS",
EnvVar: "REVA_STORAGE_EOS_KEYTAB",
EnvVars: []string{"REVA_STORAGE_EOS_KEYTAB"},
Destination: &cfg.Reva.Storages.EOS.Keytab,
},
&cli.StringFlag{
Name: "storage-eos-single-username",
Value: "",
Usage: "the username to use when SingleUserMode is enabled",
EnvVar: "REVA_STORAGE_EOS_SINGLE_USERNAME",
EnvVars: []string{"REVA_STORAGE_EOS_SINGLE_USERNAME"},
Destination: &cfg.Reva.Storages.EOS.SingleUsername,
},
@@ -243,7 +242,7 @@ func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-local-root",
Value: "/var/tmp/reva/root",
Usage: "the path to the local storage root",
EnvVar: "REVA_STORAGE_LOCAL_ROOT",
EnvVars: []string{"REVA_STORAGE_LOCAL_ROOT"},
Destination: &cfg.Reva.Storages.Local.Root,
},
@@ -253,7 +252,7 @@ func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-owncloud-datadir",
Value: "/var/tmp/reva/data",
Usage: "the path to the owncloud data directory",
EnvVar: "REVA_STORAGE_OWNCLOUD_DATADIR",
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_DATADIR"},
Destination: &cfg.Reva.Storages.OwnCloud.Datadirectory,
},
@@ -263,7 +262,7 @@ func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag {
Name: "gateway-url",
Value: "localhost:9142",
Usage: "URL to use for the reva gateway service",
EnvVar: "REVA_GATEWAY_URL",
EnvVars: []string{"REVA_GATEWAY_URL"},
Destination: &cfg.Reva.Gateway.URL,
},
}
+41 -42
View File
@@ -3,7 +3,7 @@ package flagset
import (
"os"
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis-reva/pkg/config"
)
@@ -14,35 +14,35 @@ func StorageRootWithConfig(cfg *config.Config) []cli.Flag {
&cli.BoolFlag{
Name: "tracing-enabled",
Usage: "Enable sending traces",
EnvVar: "REVA_TRACING_ENABLED",
EnvVars: []string{"REVA_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled,
},
&cli.StringFlag{
Name: "tracing-type",
Value: "jaeger",
Usage: "Tracing backend type",
EnvVar: "REVA_TRACING_TYPE",
EnvVars: []string{"REVA_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
&cli.StringFlag{
Name: "tracing-endpoint",
Value: "",
Usage: "Endpoint for the agent",
EnvVar: "REVA_TRACING_ENDPOINT",
EnvVars: []string{"REVA_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
&cli.StringFlag{
Name: "tracing-collector",
Value: "",
Usage: "Endpoint for the collector",
EnvVar: "REVA_TRACING_COLLECTOR",
EnvVars: []string{"REVA_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
&cli.StringFlag{
Name: "tracing-service",
Value: "reva",
Usage: "Service name for tracing",
EnvVar: "REVA_TRACING_SERVICE",
EnvVars: []string{"REVA_TRACING_SERVICE"},
Destination: &cfg.Tracing.Service,
},
@@ -51,26 +51,26 @@ func StorageRootWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9153",
Usage: "Address to bind debug server",
EnvVar: "REVA_STORAGE_ROOT_DEBUG_ADDR",
EnvVars: []string{"REVA_STORAGE_ROOT_DEBUG_ADDR"},
Destination: &cfg.Reva.StorageRoot.DebugAddr,
},
&cli.StringFlag{
Name: "debug-token",
Value: "",
Usage: "Token to grant metrics access",
EnvVar: "REVA_DEBUG_TOKEN",
EnvVars: []string{"REVA_DEBUG_TOKEN"},
Destination: &cfg.Debug.Token,
},
&cli.BoolFlag{
Name: "debug-pprof",
Usage: "Enable pprof debugging",
EnvVar: "REVA_DEBUG_PPROF",
EnvVars: []string{"REVA_DEBUG_PPROF"},
Destination: &cfg.Debug.Pprof,
},
&cli.BoolFlag{
Name: "debug-zpages",
Usage: "Enable zpages debugging",
EnvVar: "REVA_DEBUG_ZPAGES",
EnvVars: []string{"REVA_DEBUG_ZPAGES"},
Destination: &cfg.Debug.Zpages,
},
@@ -80,7 +80,7 @@ func StorageRootWithConfig(cfg *config.Config) []cli.Flag {
Name: "jwt-secret",
Value: "Pive-Fumkiu4",
Usage: "Shared jwt secret for reva service communication",
EnvVar: "REVA_JWT_SECRET",
EnvVars: []string{"REVA_JWT_SECRET"},
Destination: &cfg.Reva.JWTSecret,
},
@@ -92,84 +92,83 @@ func StorageRootWithConfig(cfg *config.Config) []cli.Flag {
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVar: "REVA_STORAGE_ROOT_NETWORK",
EnvVars: []string{"REVA_STORAGE_ROOT_NETWORK"},
Destination: &cfg.Reva.StorageRoot.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "grpc",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVar: "REVA_STORAGE_ROOT_PROTOCOL",
EnvVars: []string{"REVA_STORAGE_ROOT_PROTOCOL"},
Destination: &cfg.Reva.StorageRoot.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9152",
Usage: "Address to bind reva service",
EnvVar: "REVA_STORAGE_ROOT_ADDR",
EnvVars: []string{"REVA_STORAGE_ROOT_ADDR"},
Destination: &cfg.Reva.StorageRoot.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9152",
Usage: "URL to use for the reva service",
EnvVar: "REVA_STORAGE_ROOT_URL",
EnvVars: []string{"REVA_STORAGE_ROOT_URL"},
Destination: &cfg.Reva.StorageRoot.URL,
},
&cli.StringFlag{
Name: "services",
Value: "storageprovider",
Usage: "comma separated list of services to include in the storage-root service",
EnvVar: "REVA_STORAGE_ROOT_SERVICES",
Destination: &cfg.Reva.StorageRoot.Services,
Name: "service",
Value: "storageprovider",
Usage: "--service storageprovider [--service otherservice]",
EnvVars: []string{"REVA_STORAGE_ROOT_SERVICES"},
},
&cli.StringFlag{
Name: "driver",
Value: "local",
Usage: "storage driver, eg. local, eos, owncloud or s3",
EnvVar: "REVA_STORAGE_ROOT_DRIVER",
EnvVars: []string{"REVA_STORAGE_ROOT_DRIVER"},
Destination: &cfg.Reva.StorageRoot.Driver,
},
&cli.StringFlag{
Name: "path-wrapper",
Value: "",
Usage: "path wrapper",
EnvVar: "REVA_STORAGE_ROOT_PATH_WRAPPER",
EnvVars: []string{"REVA_STORAGE_ROOT_PATH_WRAPPER"},
Destination: &cfg.Reva.StorageRoot.PathWrapper,
},
&cli.StringFlag{
Name: "path-wrapper-context-prefix",
Value: "",
Usage: "path wrapper context prefix",
EnvVar: "REVA_STORAGE_ROOT_PATH_WRAPPER_CONTEXT_PREFIX",
EnvVars: []string{"REVA_STORAGE_ROOT_PATH_WRAPPER_CONTEXT_PREFIX"},
Destination: &cfg.Reva.StorageRoot.PathWrapperContext.Prefix,
},
&cli.StringFlag{
Name: "mount-path",
Value: "/",
Usage: "mount path",
EnvVar: "REVA_STORAGE_ROOT_MOUNT_PATH",
EnvVars: []string{"REVA_STORAGE_ROOT_MOUNT_PATH"},
Destination: &cfg.Reva.StorageRoot.MountPath,
},
&cli.StringFlag{
Name: "mount-id",
Value: "123e4567-e89b-12d3-a456-426655440001",
Usage: "mount id",
EnvVar: "REVA_STORAGE_ROOT_MOUNT_ID",
EnvVars: []string{"REVA_STORAGE_ROOT_MOUNT_ID"},
Destination: &cfg.Reva.StorageRoot.MountID,
},
&cli.BoolFlag{
Name: "expose-data-server",
Usage: "exposes a dedicated data server",
EnvVar: "REVA_STORAGE_ROOT_EXPOSE_DATA_SERVER",
EnvVars: []string{"REVA_STORAGE_ROOT_EXPOSE_DATA_SERVER"},
Destination: &cfg.Reva.StorageRoot.ExposeDataServer,
},
&cli.StringFlag{
Name: "data-server-url",
Value: "",
Usage: "data server url",
EnvVar: "REVA_STORAGE_ROOT_DATA_SERVER_URL",
EnvVars: []string{"REVA_STORAGE_ROOT_DATA_SERVER_URL"},
Destination: &cfg.Reva.StorageRoot.DataServerURL,
},
@@ -181,87 +180,87 @@ func StorageRootWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-eos-namespace",
Value: "",
Usage: "Namespace for metadata operations",
EnvVar: "REVA_STORAGE_EOS_NAMESPACE",
EnvVars: []string{"REVA_STORAGE_EOS_NAMESPACE"},
Destination: &cfg.Reva.Storages.EOS.Namespace,
},
&cli.StringFlag{
Name: "storage-eos-binary",
Value: "/usr/bin/eos",
Usage: "Location of the eos binary",
EnvVar: "REVA_STORAGE_EOS_BINARY",
EnvVars: []string{"REVA_STORAGE_EOS_BINARY"},
Destination: &cfg.Reva.Storages.EOS.EosBinary,
},
&cli.StringFlag{
Name: "storage-eos-xrdcopy-binary",
Value: "/usr/bin/xrdcopy",
Usage: "Location of the xrdcopy binary",
EnvVar: "REVA_STORAGE_EOS_XRDCOPY_BINARY",
EnvVars: []string{"REVA_STORAGE_EOS_XRDCOPY_BINARY"},
Destination: &cfg.Reva.Storages.EOS.XrdcopyBinary,
},
&cli.StringFlag{
Name: "storage-eos-master-url",
Value: "root://eos-example.org",
Usage: "URL of the Master EOS MGM",
EnvVar: "REVA_STORAGE_EOS_MASTER_URL",
EnvVars: []string{"REVA_STORAGE_EOS_MASTER_URL"},
Destination: &cfg.Reva.Storages.EOS.MasterURL,
},
&cli.StringFlag{
Name: "storage-eos-slave-url",
Value: "root://eos-example.org",
Usage: "URL of the Slave EOS MGM",
EnvVar: "REVA_STORAGE_EOS_SLAVE_URL",
EnvVars: []string{"REVA_STORAGE_EOS_SLAVE_URL"},
Destination: &cfg.Reva.Storages.EOS.SlaveURL,
},
&cli.StringFlag{
Name: "storage-eos-cache-directory",
Value: os.TempDir(),
Usage: "Location on the local fs where to store reads",
EnvVar: "REVA_STORAGE_EOS_CACHE_DIRECTORY",
EnvVars: []string{"REVA_STORAGE_EOS_CACHE_DIRECTORY"},
Destination: &cfg.Reva.Storages.EOS.CacheDirectory,
},
&cli.BoolFlag{
Name: "storage-eos-enable-logging",
Usage: "Enables logging of the commands executed",
EnvVar: "REVA_STORAGE_EOS_ENABLE_LOGGING",
EnvVars: []string{"REVA_STORAGE_EOS_ENABLE_LOGGING"},
Destination: &cfg.Reva.Storages.EOS.EnableLogging,
},
&cli.BoolFlag{
Name: "storage-eos-show-hidden-sysfiles",
Usage: "show internal EOS files like .sys.v# and .sys.a# files.",
EnvVar: "REVA_STORAGE_EOS_SHOW_HIDDEN_SYSFILES",
EnvVars: []string{"REVA_STORAGE_EOS_SHOW_HIDDEN_SYSFILES"},
Destination: &cfg.Reva.Storages.EOS.ShowHiddenSysFiles,
},
&cli.BoolFlag{
Name: "storage-eos-force-singleuser-mode",
Usage: "force connections to EOS to use SingleUsername",
EnvVar: "REVA_STORAGE_EOS_FORCE_SINGLEUSER_MODE",
EnvVars: []string{"REVA_STORAGE_EOS_FORCE_SINGLEUSER_MODE"},
Destination: &cfg.Reva.Storages.EOS.ForceSingleUserMode,
},
&cli.BoolFlag{
Name: "storage-eos-use-keytab",
Usage: "authenticate requests by using an EOS keytab",
EnvVar: "REVA_STORAGE_EOS_USE_KEYTAB",
EnvVars: []string{"REVA_STORAGE_EOS_USE_KEYTAB"},
Destination: &cfg.Reva.Storages.EOS.UseKeytab,
},
&cli.StringFlag{
Name: "storage-eos-sec-protocol",
Value: "",
Usage: "the xrootd security protocol to use between the server and EOS",
EnvVar: "REVA_STORAGE_EOS_SEC_PROTOCOL",
EnvVars: []string{"REVA_STORAGE_EOS_SEC_PROTOCOL"},
Destination: &cfg.Reva.Storages.EOS.SecProtocol,
},
&cli.StringFlag{
Name: "storage-eos-keytab",
Value: "",
Usage: "the location of the keytab to use to authenticate to EOS",
EnvVar: "REVA_STORAGE_EOS_KEYTAB",
EnvVars: []string{"REVA_STORAGE_EOS_KEYTAB"},
Destination: &cfg.Reva.Storages.EOS.Keytab,
},
&cli.StringFlag{
Name: "storage-eos-single-username",
Value: "",
Usage: "the username to use when SingleUserMode is enabled",
EnvVar: "REVA_STORAGE_EOS_SINGLE_USERNAME",
EnvVars: []string{"REVA_STORAGE_EOS_SINGLE_USERNAME"},
Destination: &cfg.Reva.Storages.EOS.SingleUsername,
},
@@ -271,7 +270,7 @@ func StorageRootWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-local-root",
Value: "/var/tmp/reva/root",
Usage: "the path to the local storage root",
EnvVar: "REVA_STORAGE_LOCAL_ROOT",
EnvVars: []string{"REVA_STORAGE_LOCAL_ROOT"},
Destination: &cfg.Reva.Storages.Local.Root,
},
@@ -281,7 +280,7 @@ func StorageRootWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-owncloud-datadir",
Value: "/var/tmp/reva/data",
Usage: "the path to the owncloud data directory",
EnvVar: "REVA_STORAGE_OWNCLOUD_DATADIR",
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_DATADIR"},
Destination: &cfg.Reva.Storages.OwnCloud.Datadirectory,
},
}
+32 -33
View File
@@ -1,7 +1,7 @@
package flagset
import (
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis-reva/pkg/config"
)
@@ -12,35 +12,35 @@ func UsersWithConfig(cfg *config.Config) []cli.Flag {
&cli.BoolFlag{
Name: "tracing-enabled",
Usage: "Enable sending traces",
EnvVar: "REVA_TRACING_ENABLED",
EnvVars: []string{"REVA_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled,
},
&cli.StringFlag{
Name: "tracing-type",
Value: "jaeger",
Usage: "Tracing backend type",
EnvVar: "REVA_TRACING_TYPE",
EnvVars: []string{"REVA_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
&cli.StringFlag{
Name: "tracing-endpoint",
Value: "",
Usage: "Endpoint for the agent",
EnvVar: "REVA_TRACING_ENDPOINT",
EnvVars: []string{"REVA_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
&cli.StringFlag{
Name: "tracing-collector",
Value: "",
Usage: "Endpoint for the collector",
EnvVar: "REVA_TRACING_COLLECTOR",
EnvVars: []string{"REVA_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
&cli.StringFlag{
Name: "tracing-service",
Value: "reva",
Usage: "Service name for tracing",
EnvVar: "REVA_TRACING_SERVICE",
EnvVars: []string{"REVA_TRACING_SERVICE"},
Destination: &cfg.Tracing.Service,
},
@@ -49,26 +49,26 @@ func UsersWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9145",
Usage: "Address to bind debug server",
EnvVar: "REVA_SHARING_DEBUG_ADDR",
EnvVars: []string{"REVA_SHARING_DEBUG_ADDR"},
Destination: &cfg.Reva.Users.DebugAddr,
},
&cli.StringFlag{
Name: "debug-token",
Value: "",
Usage: "Token to grant metrics access",
EnvVar: "REVA_DEBUG_TOKEN",
EnvVars: []string{"REVA_DEBUG_TOKEN"},
Destination: &cfg.Debug.Token,
},
&cli.BoolFlag{
Name: "debug-pprof",
Usage: "Enable pprof debugging",
EnvVar: "REVA_DEBUG_PPROF",
EnvVars: []string{"REVA_DEBUG_PPROF"},
Destination: &cfg.Debug.Pprof,
},
&cli.BoolFlag{
Name: "debug-zpages",
Usage: "Enable zpages debugging",
EnvVar: "REVA_DEBUG_ZPAGES",
EnvVars: []string{"REVA_DEBUG_ZPAGES"},
Destination: &cfg.Debug.Zpages,
},
@@ -78,7 +78,7 @@ func UsersWithConfig(cfg *config.Config) []cli.Flag {
Name: "jwt-secret",
Value: "Pive-Fumkiu4",
Usage: "Shared jwt secret for reva service communication",
EnvVar: "REVA_JWT_SECRET",
EnvVars: []string{"REVA_JWT_SECRET"},
Destination: &cfg.Reva.JWTSecret,
},
@@ -88,49 +88,49 @@ func UsersWithConfig(cfg *config.Config) []cli.Flag {
Name: "ldap-hostname",
Value: "localhost",
Usage: "LDAP hostname",
EnvVar: "REVA_LDAP_HOSTNAME",
EnvVars: []string{"REVA_LDAP_HOSTNAME"},
Destination: &cfg.Reva.LDAP.Hostname,
},
&cli.IntFlag{
Name: "ldap-port",
Value: 636,
Usage: "LDAP port",
EnvVar: "REVA_LDAP_PORT",
EnvVars: []string{"REVA_LDAP_PORT"},
Destination: &cfg.Reva.LDAP.Port,
},
&cli.StringFlag{
Name: "ldap-base-dn",
Value: "dc=owncloud,dc=com",
Usage: "LDAP basedn",
EnvVar: "REVA_LDAP_BASE_DN",
EnvVars: []string{"REVA_LDAP_BASE_DN"},
Destination: &cfg.Reva.LDAP.BaseDN,
},
&cli.StringFlag{
Name: "ldap-userfilter",
Value: "(&(objectclass=posixAccount)(cn=%s))",
Usage: "LDAP userfilter",
EnvVar: "REVA_LDAP_USERFILTER",
EnvVars: []string{"REVA_LDAP_USERFILTER"},
Destination: &cfg.Reva.LDAP.UserFilter,
},
&cli.StringFlag{
Name: "ldap-groupfilter",
Value: "(&(objectclass=posixGroup)(cn=%s))",
Usage: "LDAP groupfilter",
EnvVar: "REVA_LDAP_GROUPFILTER",
EnvVars: []string{"REVA_LDAP_GROUPFILTER"},
Destination: &cfg.Reva.LDAP.GroupFilter,
},
&cli.StringFlag{
Name: "ldap-bind-dn",
Value: "cn=admin,dc=owncloud,dc=com",
Usage: "LDAP bind dn",
EnvVar: "REVA_LDAP_BIND_DN",
EnvVars: []string{"REVA_LDAP_BIND_DN"},
Destination: &cfg.Reva.LDAP.BindDN,
},
&cli.StringFlag{
Name: "ldap-bind-password",
Value: "admin",
Usage: "LDAP bind password",
EnvVar: "REVA_LDAP_BIND_PASSWORD",
EnvVars: []string{"REVA_LDAP_BIND_PASSWORD"},
Destination: &cfg.Reva.LDAP.BindPassword,
},
// ldap dn is always the dn
@@ -138,28 +138,28 @@ func UsersWithConfig(cfg *config.Config) []cli.Flag {
Name: "ldap-schema-uid",
Value: "uid",
Usage: "LDAP schema uid",
EnvVar: "REVA_LDAP_SCHEMA_UID",
EnvVars: []string{"REVA_LDAP_SCHEMA_UID"},
Destination: &cfg.Reva.LDAP.Schema.UID,
},
&cli.StringFlag{
Name: "ldap-schema-mail",
Value: "mail",
Usage: "LDAP schema mail",
EnvVar: "REVA_LDAP_SCHEMA_MAIL",
EnvVars: []string{"REVA_LDAP_SCHEMA_MAIL"},
Destination: &cfg.Reva.LDAP.Schema.Mail,
},
&cli.StringFlag{
Name: "ldap-schema-displayName",
Value: "displayName",
Usage: "LDAP schema displayName",
EnvVar: "REVA_LDAP_SCHEMA_DISPLAYNAME",
EnvVars: []string{"REVA_LDAP_SCHEMA_DISPLAYNAME"},
Destination: &cfg.Reva.LDAP.Schema.DisplayName,
},
&cli.StringFlag{
Name: "ldap-schema-cn",
Value: "cn",
Usage: "LDAP schema cn",
EnvVar: "REVA_LDAP_SCHEMA_CN",
EnvVars: []string{"REVA_LDAP_SCHEMA_CN"},
Destination: &cfg.Reva.LDAP.Schema.CN,
},
@@ -171,50 +171,49 @@ func UsersWithConfig(cfg *config.Config) []cli.Flag {
Name: "network",
Value: "tcp",
Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'",
EnvVar: "REVA_USERS_NETWORK",
EnvVars: []string{"REVA_USERS_NETWORK"},
Destination: &cfg.Reva.Users.Network,
},
&cli.StringFlag{
Name: "protocol",
Value: "grpc",
Usage: "protocol for reva service, can be 'http' or 'grpc'",
EnvVar: "REVA_USERS_PROTOCOL",
EnvVars: []string{"REVA_USERS_PROTOCOL"},
Destination: &cfg.Reva.Users.Protocol,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9144",
Usage: "Address to bind reva service",
EnvVar: "REVA_USERS_ADDR",
EnvVars: []string{"REVA_USERS_ADDR"},
Destination: &cfg.Reva.Users.Addr,
},
&cli.StringFlag{
Name: "url",
Value: "localhost:9144",
Usage: "URL to use for the reva service",
EnvVar: "REVA_USERS_URL",
EnvVars: []string{"REVA_USERS_URL"},
Destination: &cfg.Reva.Users.URL,
},
&cli.StringFlag{
Name: "services",
Value: "userprovider", // TODO preferences
Usage: "comma separated list of services to include",
EnvVar: "REVA_USERS_SERVICES",
Destination: &cfg.Reva.Users.Services,
Name: "service",
Value: "userprovider", // TODO preferences
Usage: "--service userprovider [--service otherservice]",
EnvVars: []string{"REVA_USERS_SERVICES"},
},
&cli.StringFlag{
Name: "driver",
Value: "demo",
Usage: "user driver: 'demo', 'json' or 'ldap'",
EnvVar: "REVA_USERS_DRIVER",
EnvVars: []string{"REVA_USERS_DRIVER"},
Destination: &cfg.Reva.Users.Driver,
},
&cli.StringFlag{
Name: "json-config",
Value: "",
Usage: "Path to users.json file",
EnvVar: "REVA_USERS_JSON",
EnvVars: []string{"REVA_USERS_JSON"},
Destination: &cfg.Reva.Users.JSON,
},
}