Merge remote-tracking branch 'origin/main' into feature/guest-links
This commit is contained in:
@@ -83,12 +83,6 @@ $(PIGEON): $(BINGO_DIR)/pigeon.mod
|
||||
@echo "(re)installing $(GOBIN)/pigeon-v1.3.0"
|
||||
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=pigeon.mod -o=$(GOBIN)/pigeon-v1.3.0 "github.com/mna/pigeon"
|
||||
|
||||
PROTOC_GEN_DOC := $(GOBIN)/protoc-gen-doc-v1.5.1
|
||||
$(PROTOC_GEN_DOC): $(BINGO_DIR)/protoc-gen-doc.mod
|
||||
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
|
||||
@echo "(re)installing $(GOBIN)/protoc-gen-doc-v1.5.1"
|
||||
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=protoc-gen-doc.mod -o=$(GOBIN)/protoc-gen-doc-v1.5.1 "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc"
|
||||
|
||||
PROTOC_GEN_GO := $(GOBIN)/protoc-gen-go-v1.28.1
|
||||
$(PROTOC_GEN_GO): $(BINGO_DIR)/protoc-gen-go.mod
|
||||
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
|
||||
|
||||
go 1.17
|
||||
|
||||
require github.com/pseudomuto/protoc-gen-doc v1.5.1 // cmd/protoc-gen-doc
|
||||
@@ -1,169 +0,0 @@
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/Masterminds/semver v1.4.2 h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITgsTc=
|
||||
github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
|
||||
github.com/Masterminds/sprig v2.15.0+incompatible h1:0gSxPGWS9PAr7U2NsQ2YQg6juRDINkUyuvbb4b2Xm8w=
|
||||
github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o=
|
||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
|
||||
github.com/aokoli/goutils v1.0.1 h1:7fpzNGoJ3VA8qcrm++XEE1QUe0mIwNeLa02Nwq7RDkg=
|
||||
github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.3.0-java h1:bV5JGEB1ouEzZa0hgVDFFiClrUEuGWRaAc/3mxR2QK0=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.3.0-java/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
|
||||
github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c h1:jWtZjFEUE/Bz0IeIhqCnyZ3HG6KRXSntXe4SjtuTH7c=
|
||||
github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=
|
||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
|
||||
github.com/huandu/xstrings v1.0.0 h1:pO2K/gKgKaat5LdpAhxhluX2GPQMaI3W5FUz/I/UnWk=
|
||||
github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo=
|
||||
github.com/imdario/mergo v0.3.4 h1:mKkfHkZWD8dC7WxKx3N9WCF0Y+dLau45704YQmY6H94=
|
||||
github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
|
||||
github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007 h1:28i1IjGcx8AofiB4N3q5Yls55VEaitzuEPkFJEVgGkA=
|
||||
github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo=
|
||||
github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/pseudomuto/protoc-gen-doc v1.5.0 h1:pHZp0MEiT68jrZV8js8BS7E9ZEnlSLegoQbbtXj5lfo=
|
||||
github.com/pseudomuto/protoc-gen-doc v1.5.0/go.mod h1:exDTOVwqpp30eV/EDPFLZy3Pwr2sn6hBC1WIYH/UbIg=
|
||||
github.com/pseudomuto/protoc-gen-doc v1.5.1 h1:Ah259kcrio7Ix1Rhb6u8FCaOkzf9qRBqXnvAufg061w=
|
||||
github.com/pseudomuto/protoc-gen-doc v1.5.1/go.mod h1:XpMKYg6zkcpgfpCfQ8GcWBDRtRxOmMR5w7pz4Xo+dYM=
|
||||
github.com/pseudomuto/protokit v0.2.0 h1:hlnBDcy3YEDXH7kc9gV+NLaN0cDzhDvD1s7Y6FZ8RpM=
|
||||
github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q=
|
||||
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
|
||||
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
|
||||
golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307 h1:O5C+XK++apFo5B+Vq4ujc/LkLwHxg9fDdgjgoIikBdA=
|
||||
golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/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=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20181107211654-5fc9ac540362 h1:b69RmkJsx8NyRJsKF2mQ/AF8s4BNxwNsT4rQ3wON1U0=
|
||||
google.golang.org/genproto v0.0.0-20181107211654-5fc9ac540362/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||
google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4 h1:ysnBoUyeL/H6RCvNRhWHjKoDEmguI+mPU+qHgK8qv/w=
|
||||
google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
|
||||
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
|
||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
@@ -30,8 +30,6 @@ MUTAGEN="${GOBIN}/mutagen-v0.18.1"
|
||||
|
||||
PIGEON="${GOBIN}/pigeon-v1.3.0"
|
||||
|
||||
PROTOC_GEN_DOC="${GOBIN}/protoc-gen-doc-v1.5.1"
|
||||
|
||||
PROTOC_GEN_GO="${GOBIN}/protoc-gen-go-v1.28.1"
|
||||
|
||||
PROTOC_GEN_MICRO="${GOBIN}/protoc-gen-micro-v1.0.0"
|
||||
|
||||
@@ -10,7 +10,6 @@ protoc-deps: $(BINGO)
|
||||
@cd ../.. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/go-micro/generator/cmd/protoc-gen-micro
|
||||
@cd ../.. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/owncloud/protoc-gen-microweb
|
||||
@cd ../.. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2
|
||||
@cd ../.. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
|
||||
@cd ../.. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/favadi/protoc-go-inject-tag
|
||||
|
||||
.PHONY: buf-generate
|
||||
|
||||
@@ -14,7 +14,7 @@ require (
|
||||
github.com/blevesearch/bleve/v2 v2.5.7
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible
|
||||
github.com/coreos/go-oidc/v3 v3.18.0
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20260422093003-c97949ae7a1d
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20260424072047-8d9ef7076ae9
|
||||
github.com/davidbyttow/govips/v2 v2.18.0
|
||||
github.com/dhowden/tag v0.0.0-20240417053706-3d75831295e8
|
||||
github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e
|
||||
@@ -65,7 +65,7 @@ require (
|
||||
github.com/open-policy-agent/opa v1.15.2
|
||||
github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89
|
||||
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260310090739-853d972b282d
|
||||
github.com/opencloud-eu/reva/v2 v2.42.7-0.20260423074216-11463a55c9a4
|
||||
github.com/opencloud-eu/reva/v2 v2.43.1-0.20260424125411-c5db28365753
|
||||
github.com/opensearch-project/opensearch-go/v4 v4.6.0
|
||||
github.com/orcaman/concurrent-map v1.0.0
|
||||
github.com/pkg/errors v0.9.1
|
||||
@@ -97,10 +97,10 @@ require (
|
||||
go.etcd.io/bbolt v1.4.3
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0
|
||||
go.opentelemetry.io/contrib/zpages v0.67.0
|
||||
go.opentelemetry.io/contrib/zpages v0.68.0
|
||||
go.opentelemetry.io/otel v1.43.0
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.43.0
|
||||
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.42.0
|
||||
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.43.0
|
||||
go.opentelemetry.io/otel/sdk v1.43.0
|
||||
go.opentelemetry.io/otel/trace v1.43.0
|
||||
golang.org/x/crypto v0.49.0
|
||||
@@ -124,7 +124,7 @@ require (
|
||||
contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect
|
||||
filippo.io/edwards25519 v1.1.1 // indirect
|
||||
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect
|
||||
github.com/Azure/go-ntlmssp v0.1.0 // indirect
|
||||
github.com/Azure/go-ntlmssp v0.1.1 // indirect
|
||||
github.com/BurntSushi/toml v1.6.0 // indirect
|
||||
github.com/Masterminds/goutils v1.1.1 // indirect
|
||||
github.com/Masterminds/semver/v3 v3.4.0 // indirect
|
||||
@@ -163,7 +163,7 @@ require (
|
||||
github.com/bombsimon/logrusr/v3 v3.1.0 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
|
||||
github.com/ceph/go-ceph v0.38.0 // indirect
|
||||
github.com/ceph/go-ceph v0.39.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/cevaris/ordered_map v0.0.0-20190319150403-3adeae072e73 // indirect
|
||||
github.com/clipperhouse/displaywidth v0.10.0 // indirect
|
||||
@@ -241,7 +241,7 @@ require (
|
||||
github.com/google/go-tpm v0.9.8 // indirect
|
||||
github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 // indirect
|
||||
github.com/google/renameio/v2 v2.0.2 // indirect
|
||||
github.com/gookit/goutil v0.7.1 // indirect
|
||||
github.com/gookit/goutil v0.7.4 // indirect
|
||||
github.com/gorilla/handlers v1.5.1 // indirect
|
||||
github.com/gorilla/schema v1.4.1 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
|
||||
@@ -280,7 +280,7 @@ require (
|
||||
github.com/mattn/go-colorable v0.1.14 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.19 // indirect
|
||||
github.com/mattn/go-sqlite3 v1.14.37 // indirect
|
||||
github.com/mattn/go-sqlite3 v1.14.42 // indirect
|
||||
github.com/maxymania/go-system v0.0.0-20170110133659-647cc364bf0b // indirect
|
||||
github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103 // indirect
|
||||
github.com/miekg/dns v1.1.68 // indirect
|
||||
@@ -376,9 +376,9 @@ require (
|
||||
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
|
||||
github.com/yashtewari/glob-intersection v0.2.0 // indirect
|
||||
github.com/yusufpapurcu/wmi v1.2.4 // indirect
|
||||
go.etcd.io/etcd/api/v3 v3.6.8 // indirect
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.6.8 // indirect
|
||||
go.etcd.io/etcd/client/v3 v3.6.8 // indirect
|
||||
go.etcd.io/etcd/api/v3 v3.6.10 // indirect
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.6.10 // indirect
|
||||
go.etcd.io/etcd/client/v3 v3.6.10 // indirect
|
||||
go.opencensus.io v0.24.0 // indirect
|
||||
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0 // indirect
|
||||
@@ -389,7 +389,7 @@ require (
|
||||
go.yaml.in/yaml/v2 v2.4.3 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||
golang.org/x/mod v0.33.0 // indirect
|
||||
golang.org/x/sys v0.42.0 // indirect
|
||||
golang.org/x/sys v0.43.0 // indirect
|
||||
golang.org/x/time v0.15.0 // indirect
|
||||
golang.org/x/tools v0.42.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20260128011058-8636f8732409 // indirect
|
||||
|
||||
@@ -62,8 +62,8 @@ github.com/Azure/go-autorest/autorest/validation v0.1.0/go.mod h1:Ha3z/SqBeaalWQ
|
||||
github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
|
||||
github.com/Azure/go-autorest/tracing v0.1.0/go.mod h1:ROEEAFwXycQw7Sn3DXNtEedEvdeRAgDr0izn4z5Ij88=
|
||||
github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
|
||||
github.com/Azure/go-ntlmssp v0.1.0 h1:DjFo6YtWzNqNvQdrwEyr/e4nhU3vRiwenz5QX7sFz+A=
|
||||
github.com/Azure/go-ntlmssp v0.1.0/go.mod h1:NYqdhxd/8aAct/s4qSYZEerdPuH1liG2/X9DiVTbhpk=
|
||||
github.com/Azure/go-ntlmssp v0.1.1 h1:l+FM/EEMb0U9QZE7mKNEDw5Mu3mFiaa2GKOoTSsNDPw=
|
||||
github.com/Azure/go-ntlmssp v0.1.1/go.mod h1:NYqdhxd/8aAct/s4qSYZEerdPuH1liG2/X9DiVTbhpk=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk=
|
||||
github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
|
||||
@@ -208,8 +208,8 @@ github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1x
|
||||
github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/ceph/go-ceph v0.38.0 h1:Ux0sIpl6VJNgY21hxuBZI9Z2Z8tQsBMJhjLjYBoa7s0=
|
||||
github.com/ceph/go-ceph v0.38.0/go.mod h1:GQVPe5YWoCMOrGnpDDieQoQZRLkB0tJmIokbqxbwPBQ=
|
||||
github.com/ceph/go-ceph v0.39.0 h1:fzINuBItJqhmTtnC4/iiTY+ONtsOqV7W+B/3xTS/DsY=
|
||||
github.com/ceph/go-ceph v0.39.0/go.mod h1:UId58dqtDKTwnv3OY8rdpC+Ulz/AVpcvZqjXDICcd5c=
|
||||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
@@ -264,8 +264,8 @@ github.com/crewjam/httperr v0.2.0 h1:b2BfXR8U3AlIHwNeFFvZ+BV1LFvKLlzMjzaTnZMybNo
|
||||
github.com/crewjam/httperr v0.2.0/go.mod h1:Jlz+Sg/XqBQhyMjdDiC+GNNRzZTD7x39Gu3pglZ5oH4=
|
||||
github.com/crewjam/saml v0.4.14 h1:g9FBNx62osKusnFzs3QTN5L9CVA/Egfgm+stJShzw/c=
|
||||
github.com/crewjam/saml v0.4.14/go.mod h1:UVSZCf18jJkk6GpWNVqcyQJMD5HsRugBPf4I1nl2mME=
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20260422093003-c97949ae7a1d h1:OskzS3/kqXRpp9B+svjTRCnqBvojfMJuOy6QSCCf9+s=
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20260422093003-c97949ae7a1d/go.mod h1:DedpcqXl193qF/08Y04IO0PpxyyMu8+GrkD6kWK2MEQ=
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20260424072047-8d9ef7076ae9 h1:8WtMb7TKKx1AJM3j+uR+H25y4v+b8o8GIQg/2ooCyRo=
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20260424072047-8d9ef7076ae9/go.mod h1:DedpcqXl193qF/08Y04IO0PpxyyMu8+GrkD6kWK2MEQ=
|
||||
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
|
||||
github.com/cyphar/filepath-securejoin v0.5.1 h1:eYgfMq5yryL4fbWfkLpFFy2ukSELzaJOTaUTuh+oF48=
|
||||
github.com/cyphar/filepath-securejoin v0.5.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI=
|
||||
@@ -589,8 +589,8 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+
|
||||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||
github.com/gookit/config/v2 v2.2.7 h1:P58/uENzkDp7r7Hp8YSZxOhZ/F5a5Y/AzyhDUkQYa9A=
|
||||
github.com/gookit/config/v2 v2.2.7/go.mod h1:QST99HmkZXXD/HkZmOm1OXpgdAnc6Rl9syGl+u62Pi8=
|
||||
github.com/gookit/goutil v0.7.1 h1:AaFJPN9mrdeYBv8HOybri26EHGCC34WJVT7jUStGJsI=
|
||||
github.com/gookit/goutil v0.7.1/go.mod h1:vJS9HXctYTCLtCsZot5L5xF+O1oR17cDYO9R0HxBmnU=
|
||||
github.com/gookit/goutil v0.7.4 h1:OWgUngToNz+bPlX5aP+EMG31DraEU63uvKMwwT3vseM=
|
||||
github.com/gookit/goutil v0.7.4/go.mod h1:vJS9HXctYTCLtCsZot5L5xF+O1oR17cDYO9R0HxBmnU=
|
||||
github.com/gookit/ini/v2 v2.3.2 h1:W6tzOGE6zOLQelH2xhcH8BIBZPtnEpJgQ+J6SsAKBSw=
|
||||
github.com/gookit/ini/v2 v2.3.2/go.mod h1:StKSqY5niArRwYBS8Z71+iWUt5ow47qt359sS9YQLYY=
|
||||
github.com/gophercloud/gophercloud v0.15.1-0.20210202035223-633d73521055/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075O6i+LY+pXsKCBsb4=
|
||||
@@ -820,8 +820,8 @@ github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m
|
||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/mattn/go-runewidth v0.0.19 h1:v++JhqYnZuu5jSKrk9RbgF5v4CGUjqRfBm05byFGLdw=
|
||||
github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
|
||||
github.com/mattn/go-sqlite3 v1.14.37 h1:3DOZp4cXis1cUIpCfXLtmlGolNLp2VEqhiB/PARNBIg=
|
||||
github.com/mattn/go-sqlite3 v1.14.37/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
|
||||
github.com/mattn/go-sqlite3 v1.14.42 h1:MigqEP4ZmHw3aIdIT7T+9TLa90Z6smwcthx+Azv4Cgo=
|
||||
github.com/mattn/go-sqlite3 v1.14.42/go.mod h1:pjEuOr8IwzLJP2MfGeTb0A35jauH+C2kbHKBr7yXKVQ=
|
||||
github.com/mattn/go-tty v0.0.0-20180219170247-931426f7535a/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE=
|
||||
github.com/mattn/go-tty v0.0.3/go.mod h1:ihxohKRERHTVzN+aSVRwACLCeqIoZAWpoICkkvrWyR0=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
@@ -952,8 +952,8 @@ github.com/opencloud-eu/inotifywaitgo v0.0.0-20251111171128-a390bae3c5e9 h1:dIft
|
||||
github.com/opencloud-eu/inotifywaitgo v0.0.0-20251111171128-a390bae3c5e9/go.mod h1:JWyDC6H+5oZRdUJUgKuaye+8Ph5hEs6HVzVoPKzWSGI=
|
||||
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260310090739-853d972b282d h1:JcqGDiyrcaQwVyV861TUyQgO7uEmsjkhfm7aQd84dOw=
|
||||
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260310090739-853d972b282d/go.mod h1:pzatilMEHZFT3qV7C/X3MqOa3NlRQuYhlRhZTL+hN6Q=
|
||||
github.com/opencloud-eu/reva/v2 v2.42.7-0.20260423074216-11463a55c9a4 h1:Ka8HHFl+vLJ4Y5ZWoL9Gw9mkHE5eKKXi2o1XFbLyhcE=
|
||||
github.com/opencloud-eu/reva/v2 v2.42.7-0.20260423074216-11463a55c9a4/go.mod h1:vCgkkDyeXaAZ409xMB2FeYNCQaxEHgbV9dfP0xP92Bo=
|
||||
github.com/opencloud-eu/reva/v2 v2.43.1-0.20260424125411-c5db28365753 h1:/FpQdybaNb3OAISHmHRrh/4aWYQep3nVSYKzYt2F+jE=
|
||||
github.com/opencloud-eu/reva/v2 v2.43.1-0.20260424125411-c5db28365753/go.mod h1:msu4TkFw7Jxog0QRbGPxyQOJG9sago5nc+f//y+bbpI=
|
||||
github.com/opencloud-eu/secure v0.0.0-20260312082735-b6f5cb2244e4 h1:l2oB/RctH+t8r7QBj5p8thfEHCM/jF35aAY3WQ3hADI=
|
||||
github.com/opencloud-eu/secure v0.0.0-20260312082735-b6f5cb2244e4/go.mod h1:BmF5hyM6tXczk3MpQkFf1hpKSRqCyhqcbiQtiAF7+40=
|
||||
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
|
||||
@@ -1278,12 +1278,12 @@ github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQ
|
||||
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.etcd.io/bbolt v1.4.3 h1:dEadXpI6G79deX5prL3QRNP6JB8UxVkqo4UPnHaNXJo=
|
||||
go.etcd.io/bbolt v1.4.3/go.mod h1:tKQlpPaYCVFctUIgFKFnAlvbmB3tpy1vkTnDWohtc0E=
|
||||
go.etcd.io/etcd/api/v3 v3.6.8 h1:gqb1VN92TAI6G2FiBvWcqKtHiIjr4SU2GdXxTwyexbM=
|
||||
go.etcd.io/etcd/api/v3 v3.6.8/go.mod h1:qyQj1HZPUV3B5cbAL8scG62+fyz5dSxxu0w8pn28N6Q=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.6.8 h1:Qs/5C0LNFiqXxYf2GU8MVjYUEXJ6sZaYOz0zEqQgy50=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.6.8/go.mod h1:GsiTRUZE2318PggZkAo6sWb6l8JLVrnckTNfbG8PWtw=
|
||||
go.etcd.io/etcd/client/v3 v3.6.8 h1:B3G76t1UykqAOrbio7s/EPatixQDkQBevN8/mwiplrY=
|
||||
go.etcd.io/etcd/client/v3 v3.6.8/go.mod h1:MVG4BpSIuumPi+ELF7wYtySETmoTWBHVcDoHdVupwt8=
|
||||
go.etcd.io/etcd/api/v3 v3.6.10 h1:jlwjtELjA8yi2VWpOFH+0w0lGr3K6mVDyn0RDB9aaAY=
|
||||
go.etcd.io/etcd/api/v3 v3.6.10/go.mod h1:pdV4VeFmvhdNjB4LWRkC8ReLyRBAxUOze3GarMhE2sk=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.6.10 h1:tBT7podcPhuVbCVkAEzx8bC5I+aqxfLwBN8/As1arrA=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.6.10/go.mod h1:WEy3PpwbbEBVRdh1NVJYsuUe/8eyI21PNJRazeD8z/Y=
|
||||
go.etcd.io/etcd/client/v3 v3.6.10 h1:J598zJ+C/ZPvImypmq5waj84+bovePrlZERHklf34y0=
|
||||
go.etcd.io/etcd/client/v3 v3.6.10/go.mod h1:iHhUDUcEwaKs1YFq3MgmI9U4zhTVasp/vgdVbFf1RS8=
|
||||
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
|
||||
go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
@@ -1300,16 +1300,16 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.6
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0/go.mod h1:Sje3i3MjSPKTSPvVWCaL8ugBzJwik3u4smCjUeuupqg=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0 h1:OyrsyzuttWTSur2qN/Lm0m2a8yqyIjUVBZcxFPuXq2o=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0/go.mod h1:C2NGBr+kAB4bk3xtMXfZ94gqFDtg/GkI7e9zqGh5Beg=
|
||||
go.opentelemetry.io/contrib/zpages v0.67.0 h1:cIUwWSVDovuLEbDIKreptjdxMuIhGiqwq0uL8YNaq1c=
|
||||
go.opentelemetry.io/contrib/zpages v0.67.0/go.mod h1:vK8fsYHgPYg4Z/XDbFSEvItSGZDbjWTvjBOu8+AiDhc=
|
||||
go.opentelemetry.io/contrib/zpages v0.68.0 h1:H5yrUwxPrbvhzdBxjQD+VXMtPjIBfp8NWNVvQT8E30M=
|
||||
go.opentelemetry.io/contrib/zpages v0.68.0/go.mod h1:sZGctYYO4UOHItj9bx3F+t/s+u1Fv8CHCJ5s2eR2cjU=
|
||||
go.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I=
|
||||
go.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0 h1:88Y4s2C8oTui1LGM6bTWkw0ICGcOLCAI5l6zsD1j20k=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0/go.mod h1:Vl1/iaggsuRlrHf/hfPJPvVag77kKyvrLeD10kpMl+A=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.43.0 h1:RAE+JPfvEmvy+0LzyUA25/SGawPwIUbZ6u0Wug54sLc=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.43.0/go.mod h1:AGmbycVGEsRx9mXMZ75CsOyhSP6MFIcj/6dnG+vhVjk=
|
||||
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.42.0 h1:s/1iRkCKDfhlh1JF26knRneorus8aOwVIDhvYx9WoDw=
|
||||
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.42.0/go.mod h1:UI3wi0FXg1Pofb8ZBiBLhtMzgoTm1TYkMvn71fAqDzs=
|
||||
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.43.0 h1:mS47AX77OtFfKG4vtp+84kuGSFZHTyxtXIN269vChY0=
|
||||
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.43.0/go.mod h1:PJnsC41lAGncJlPUniSwM81gc80GkgWJWr3cu2nKEtU=
|
||||
go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM=
|
||||
go.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY=
|
||||
go.opentelemetry.io/otel/sdk v1.43.0 h1:pi5mE86i5rTeLXqoF/hhiBtUNcrAGHLKQdhg4h4V9Dg=
|
||||
@@ -1556,8 +1556,8 @@ golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo=
|
||||
golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
||||
golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI=
|
||||
golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
|
||||
@@ -75,7 +75,7 @@ func CheckProviderConsistency(storagepath string, lbs ListBlobstore, fail bool)
|
||||
}
|
||||
|
||||
// GatherData gathers and evaluates data produced by the DataProvider
|
||||
func (c *Consistency) GatherData(events <-chan interface{}) {
|
||||
func (c *Consistency) GatherData(events <-chan any) {
|
||||
for ev := range events {
|
||||
switch d := ev.(type) {
|
||||
case NodeData:
|
||||
|
||||
@@ -10,12 +10,12 @@ import (
|
||||
func TestGatherData(t *testing.T) {
|
||||
testcases := []struct {
|
||||
Name string
|
||||
Events []interface{}
|
||||
Events []any
|
||||
Expected *backup.Consistency
|
||||
}{
|
||||
{
|
||||
Name: "no symlinks - no blobs",
|
||||
Events: []interface{}{
|
||||
Events: []any{
|
||||
nodeData("nodepath", "blobpath", true),
|
||||
},
|
||||
Expected: consistency(func(c *backup.Consistency) {
|
||||
@@ -25,7 +25,7 @@ func TestGatherData(t *testing.T) {
|
||||
},
|
||||
{
|
||||
Name: "symlink not required - no blobs",
|
||||
Events: []interface{}{
|
||||
Events: []any{
|
||||
nodeData("nodepath", "blobpath", false),
|
||||
},
|
||||
Expected: consistency(func(c *backup.Consistency) {
|
||||
@@ -34,7 +34,7 @@ func TestGatherData(t *testing.T) {
|
||||
},
|
||||
{
|
||||
Name: "no inconsistencies",
|
||||
Events: []interface{}{
|
||||
Events: []any{
|
||||
nodeData("nodepath", "blobpath", true),
|
||||
linkData("linkpath", "nodepath"),
|
||||
blobData("blobpath"),
|
||||
@@ -44,7 +44,7 @@ func TestGatherData(t *testing.T) {
|
||||
},
|
||||
{
|
||||
Name: "orphaned blob",
|
||||
Events: []interface{}{
|
||||
Events: []any{
|
||||
nodeData("nodepath", "blobpath", true),
|
||||
linkData("linkpath", "nodepath"),
|
||||
blobData("blobpath"),
|
||||
@@ -56,7 +56,7 @@ func TestGatherData(t *testing.T) {
|
||||
},
|
||||
{
|
||||
Name: "missing node",
|
||||
Events: []interface{}{
|
||||
Events: []any{
|
||||
linkData("linkpath", "nodepath"),
|
||||
blobData("blobpath"),
|
||||
},
|
||||
@@ -67,7 +67,7 @@ func TestGatherData(t *testing.T) {
|
||||
},
|
||||
{
|
||||
Name: "corrupt metadata",
|
||||
Events: []interface{}{
|
||||
Events: []any{
|
||||
nodeData("nodepath", "blobpath", true, backup.InconsistencyMetadataMissing),
|
||||
linkData("linkpath", "nodepath"),
|
||||
blobData("blobpath"),
|
||||
@@ -78,7 +78,7 @@ func TestGatherData(t *testing.T) {
|
||||
},
|
||||
{
|
||||
Name: "corrupt metadata, no blob",
|
||||
Events: []interface{}{
|
||||
Events: []any{
|
||||
nodeData("nodepath", "blobpath", true, backup.InconsistencyMetadataMissing),
|
||||
linkData("linkpath", "nodepath"),
|
||||
},
|
||||
@@ -90,7 +90,7 @@ func TestGatherData(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range testcases {
|
||||
events := make(chan interface{})
|
||||
events := make(chan any)
|
||||
|
||||
go func() {
|
||||
for _, ev := range tc.Events {
|
||||
|
||||
@@ -21,7 +21,7 @@ type ListBlobstore interface {
|
||||
|
||||
// DataProvider provides data for the consistency check
|
||||
type DataProvider struct {
|
||||
Events chan interface{}
|
||||
Events chan any
|
||||
|
||||
fsys fs.FS
|
||||
discpath string
|
||||
@@ -51,7 +51,7 @@ type BlobData struct {
|
||||
// NewProvider creates a new DataProvider object
|
||||
func NewProvider(fsys fs.FS, discpath string, lbs ListBlobstore) *DataProvider {
|
||||
return &DataProvider{
|
||||
Events: make(chan interface{}),
|
||||
Events: make(chan any),
|
||||
|
||||
fsys: fsys,
|
||||
discpath: discpath,
|
||||
|
||||
@@ -90,7 +90,7 @@ func cleanup(_ *cobra.Command, cfg *config.Config) error {
|
||||
if !ok {
|
||||
return configlog.ReturnError(errors.New("Unknown share manager type '" + driver + "'"))
|
||||
}
|
||||
mgr, err := f(rcfg[driver].(map[string]interface{}))
|
||||
mgr, err := f(rcfg[driver].(map[string]any))
|
||||
if err != nil {
|
||||
return configlog.ReturnError(err)
|
||||
}
|
||||
@@ -126,13 +126,13 @@ func cleanup(_ *cobra.Command, cfg *config.Config) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func revaShareConfig(cfg *sharing.Config) map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
"json": map[string]interface{}{
|
||||
func revaShareConfig(cfg *sharing.Config) map[string]any {
|
||||
return map[string]any{
|
||||
"json": map[string]any{
|
||||
"file": cfg.UserSharingDrivers.JSON.File,
|
||||
"gateway_addr": cfg.Reva.Address,
|
||||
},
|
||||
"sql": map[string]interface{}{ // cernbox sql
|
||||
"sql": map[string]any{ // cernbox sql
|
||||
"db_username": cfg.UserSharingDrivers.SQL.DBUsername,
|
||||
"db_password": cfg.UserSharingDrivers.SQL.DBPassword,
|
||||
"db_host": cfg.UserSharingDrivers.SQL.DBHost,
|
||||
@@ -142,7 +142,7 @@ func revaShareConfig(cfg *sharing.Config) map[string]interface{} {
|
||||
"enable_expired_shares_cleanup": cfg.UserSharingDrivers.SQL.EnableExpiredSharesCleanup,
|
||||
"janitor_run_interval": cfg.UserSharingDrivers.SQL.JanitorRunInterval,
|
||||
},
|
||||
"owncloudsql": map[string]interface{}{
|
||||
"owncloudsql": map[string]any{
|
||||
"gateway_addr": cfg.Reva.Address,
|
||||
"storage_mount_id": cfg.UserSharingDrivers.OwnCloudSQL.UserStorageMountID,
|
||||
"db_username": cfg.UserSharingDrivers.OwnCloudSQL.DBUsername,
|
||||
@@ -151,14 +151,14 @@ func revaShareConfig(cfg *sharing.Config) map[string]interface{} {
|
||||
"db_port": cfg.UserSharingDrivers.OwnCloudSQL.DBPort,
|
||||
"db_name": cfg.UserSharingDrivers.OwnCloudSQL.DBName,
|
||||
},
|
||||
"cs3": map[string]interface{}{
|
||||
"cs3": map[string]any{
|
||||
"gateway_addr": cfg.UserSharingDrivers.CS3.ProviderAddr,
|
||||
"provider_addr": cfg.UserSharingDrivers.CS3.ProviderAddr,
|
||||
"service_user_id": cfg.UserSharingDrivers.CS3.SystemUserID,
|
||||
"service_user_idp": cfg.UserSharingDrivers.CS3.SystemUserIDP,
|
||||
"machine_auth_apikey": cfg.UserSharingDrivers.CS3.SystemUserAPIKey,
|
||||
},
|
||||
"jsoncs3": map[string]interface{}{
|
||||
"jsoncs3": map[string]any{
|
||||
"gateway_addr": cfg.Reva.Address,
|
||||
"provider_addr": cfg.UserSharingDrivers.JSONCS3.ProviderAddr,
|
||||
"service_user_id": cfg.UserSharingDrivers.JSONCS3.SystemUserID,
|
||||
|
||||
@@ -428,12 +428,9 @@ func Start(ctx context.Context, o ...Option) error {
|
||||
// prepare the set of services to run
|
||||
s.generateRunSet(s.cfg)
|
||||
|
||||
// There are reasons not to do this, but we have race conditions ourselves. Until we resolve them, mind the following disclaimer:
|
||||
// Calling ServeBackground will CORRECTLY start the supervisor running in a new goroutine. It is risky to directly run
|
||||
// go supervisor.Serve()
|
||||
// because that will briefly create a race condition as it starts up, if you try to .Add() services immediately afterward.
|
||||
// https://pkg.go.dev/github.com/thejerf/suture/v4@v4.0.0#Supervisor
|
||||
go s.Supervisor.ServeBackground(ctx)
|
||||
// We need to control the order in which services are started and shut down,
|
||||
// so we need a backgroud context that will outlive the service execution.
|
||||
go s.Supervisor.ServeBackground(context.Background())
|
||||
|
||||
for i, service := range s.Services {
|
||||
scheduleServiceTokens(s, service)
|
||||
|
||||
+1
-1
@@ -91,7 +91,7 @@ func NodeKey(n Node) string {
|
||||
}
|
||||
|
||||
// NodeValue tries to return the node key
|
||||
func NodeValue(n Node) interface{} {
|
||||
func NodeValue(n Node) any {
|
||||
switch node := n.(type) {
|
||||
case *StringNode:
|
||||
return node.Value
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// DiffAst returns a human-readable report of the differences between two values
|
||||
// by default it ignores every ast node Base field.
|
||||
func DiffAst(x, y interface{}, opts ...cmp.Option) string {
|
||||
func DiffAst(x, y any, opts ...cmp.Option) string {
|
||||
return cmp.Diff(
|
||||
x,
|
||||
y,
|
||||
|
||||
@@ -58,7 +58,7 @@ type Decoder interface {
|
||||
// time.ParseDuration() function and *url.URL is supported via the
|
||||
// url.Parse() function. Slices are supported for all above mentioned
|
||||
// primitive types. Semicolon is used as delimiter in environment variables.
|
||||
func Decode(target interface{}) error {
|
||||
func Decode(target any) error {
|
||||
nFields, err := decode(target, false)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -75,7 +75,7 @@ func Decode(target interface{}) error {
|
||||
|
||||
// StrictDecode is similar to Decode except all fields will have an implicit
|
||||
// ",strict" on all fields.
|
||||
func StrictDecode(target interface{}) error {
|
||||
func StrictDecode(target any) error {
|
||||
nFields, err := decode(target, true)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -90,7 +90,7 @@ func StrictDecode(target interface{}) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func decode(target interface{}, strict bool) (int, error) {
|
||||
func decode(target any, strict bool) (int, error) {
|
||||
s := reflect.ValueOf(target)
|
||||
if s.Kind() != reflect.Ptr || s.IsNil() {
|
||||
return 0, ErrInvalidTarget
|
||||
@@ -296,7 +296,7 @@ func decodePrimitiveType(f *reflect.Value, env string) error {
|
||||
|
||||
// MustDecode calls Decode and terminates the process if any errors
|
||||
// are encountered.
|
||||
func MustDecode(target interface{}) {
|
||||
func MustDecode(target any) {
|
||||
if err := Decode(target); err != nil {
|
||||
FailureFunc(err)
|
||||
}
|
||||
@@ -304,7 +304,7 @@ func MustDecode(target interface{}) {
|
||||
|
||||
// MustStrictDecode calls StrictDecode and terminates the process if any errors
|
||||
// are encountered.
|
||||
func MustStrictDecode(target interface{}) {
|
||||
func MustStrictDecode(target any) {
|
||||
if err := StrictDecode(target); err != nil {
|
||||
FailureFunc(err)
|
||||
}
|
||||
@@ -335,7 +335,7 @@ func (c ConfigInfoSlice) Swap(i, j int) {
|
||||
}
|
||||
|
||||
// Returns a list of final configuration metadata sorted by envvar name
|
||||
func Export(target interface{}) ([]*ConfigInfo, error) {
|
||||
func Export(target any) ([]*ConfigInfo, error) {
|
||||
s := reflect.ValueOf(target)
|
||||
if s.Kind() != reflect.Ptr || s.IsNil() {
|
||||
return nil, ErrInvalidTarget
|
||||
|
||||
@@ -552,7 +552,7 @@ type testConfigStrict struct {
|
||||
|
||||
func TestInvalidStrict(t *testing.T) {
|
||||
cases := []struct {
|
||||
decoder func(interface{}) error
|
||||
decoder func(any) error
|
||||
rootValue string
|
||||
nestedValue string
|
||||
rootValueImplicit string
|
||||
|
||||
@@ -19,13 +19,13 @@ var (
|
||||
)
|
||||
|
||||
// BindSourcesToStructs assigns any config value from a config file / env variable to struct `dst`.
|
||||
func BindSourcesToStructs(service string, dst interface{}) error {
|
||||
func BindSourcesToStructs(service string, dst any) error {
|
||||
fileSystem := os.DirFS("/")
|
||||
filePath := strings.TrimLeft(path.Join(defaults.BaseConfigPath(), service+".yaml"), "/")
|
||||
return bindSourcesToStructs(fileSystem, filePath, service, dst)
|
||||
}
|
||||
|
||||
func bindSourcesToStructs(fileSystem fs.FS, filePath, service string, dst interface{}) error {
|
||||
func bindSourcesToStructs(fileSystem fs.FS, filePath, service string, dst any) error {
|
||||
cnf := gofig.NewWithOptions(service)
|
||||
cnf.WithOptions(func(options *gofig.Options) {
|
||||
options.ParseEnv = true
|
||||
|
||||
@@ -63,7 +63,7 @@ func GenTempCertForAddr(addr string) (tls.Certificate, error) {
|
||||
}
|
||||
|
||||
// persistCertificate generates a certificate using pk as private key and proceeds to store it into a file named certName.
|
||||
func persistCertificate(certName string, l log.Logger, pk interface{}) error {
|
||||
func persistCertificate(certName string, l log.Logger, pk any) error {
|
||||
if err := ensureExistsDir(certName); err != nil {
|
||||
return fmt.Errorf("creating certificate destination: %s", certName)
|
||||
}
|
||||
@@ -93,7 +93,7 @@ func persistCertificate(certName string, l log.Logger, pk interface{}) error {
|
||||
}
|
||||
|
||||
// genCert generates a self signed certificate using a random rsa key.
|
||||
func generateCertificate(pk interface{}) ([]byte, error) {
|
||||
func generateCertificate(pk any) ([]byte, error) {
|
||||
for _, h := range defaultHosts {
|
||||
if ip := net.ParseIP(h); ip != nil {
|
||||
acmeTemplate.IPAddresses = append(acmeTemplate.IPAddresses, ip)
|
||||
@@ -106,7 +106,7 @@ func generateCertificate(pk interface{}) ([]byte, error) {
|
||||
}
|
||||
|
||||
// persistKey persists the private key used to generate the certificate at the configured location.
|
||||
func persistKey(destination string, l log.Logger, pk interface{}) error {
|
||||
func persistKey(destination string, l log.Logger, pk any) error {
|
||||
if err := ensureExistsDir(destination); err != nil {
|
||||
return fmt.Errorf("creating key destination: %s", destination)
|
||||
}
|
||||
@@ -129,7 +129,7 @@ func persistKey(destination string, l log.Logger, pk interface{}) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func publicKey(pk interface{}) interface{} {
|
||||
func publicKey(pk any) any {
|
||||
switch k := pk.(type) {
|
||||
case *rsa.PrivateKey:
|
||||
return &k.PublicKey
|
||||
@@ -140,7 +140,7 @@ func publicKey(pk interface{}) interface{} {
|
||||
}
|
||||
}
|
||||
|
||||
func pemBlockForKey(pk interface{}, l log.Logger) *pem.Block {
|
||||
func pemBlockForKey(pk any, l log.Logger) *pem.Block {
|
||||
switch k := pk.(type) {
|
||||
case *rsa.PrivateKey:
|
||||
return &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(k)}
|
||||
|
||||
@@ -58,7 +58,7 @@ func TestPersistKey(t *testing.T) {
|
||||
|
||||
type args struct {
|
||||
keyName string
|
||||
pk interface{}
|
||||
pk any
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -104,7 +104,7 @@ func TestPersistCertificate(t *testing.T) {
|
||||
|
||||
type args struct {
|
||||
certName string
|
||||
pk interface{}
|
||||
pk any
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
|
||||
+7
-7
@@ -9,7 +9,7 @@ import (
|
||||
"github.com/opencloud-eu/opencloud/services/search/pkg/query"
|
||||
)
|
||||
|
||||
func toNode[T ast.Node](in interface{}) (T, error) {
|
||||
func toNode[T ast.Node](in any) (T, error) {
|
||||
var t T
|
||||
out, ok := in.(T)
|
||||
if !ok {
|
||||
@@ -19,7 +19,7 @@ func toNode[T ast.Node](in interface{}) (T, error) {
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func toNodes[T ast.Node](in interface{}) ([]T, error) {
|
||||
func toNodes[T ast.Node](in any) ([]T, error) {
|
||||
switch v := in.(type) {
|
||||
case T:
|
||||
return []T{v}, nil
|
||||
@@ -27,7 +27,7 @@ func toNodes[T ast.Node](in interface{}) ([]T, error) {
|
||||
return v, nil
|
||||
case []*ast.OperatorNode, []*ast.DateTimeNode:
|
||||
return toNodes[T](v)
|
||||
case []interface{}:
|
||||
case []any:
|
||||
var nodes []T
|
||||
for _, el := range v {
|
||||
node, err := toNodes[T](el)
|
||||
@@ -46,11 +46,11 @@ func toNodes[T ast.Node](in interface{}) ([]T, error) {
|
||||
}
|
||||
}
|
||||
|
||||
func toString(in interface{}) (string, error) {
|
||||
func toString(in any) (string, error) {
|
||||
switch v := in.(type) {
|
||||
case []byte:
|
||||
return string(v), nil
|
||||
case []interface{}:
|
||||
case []any:
|
||||
var str string
|
||||
|
||||
for i := range v {
|
||||
@@ -70,7 +70,7 @@ func toString(in interface{}) (string, error) {
|
||||
}
|
||||
}
|
||||
|
||||
func toTime(in interface{}) (time.Time, error) {
|
||||
func toTime(in any) (time.Time, error) {
|
||||
ts, err := toString(in)
|
||||
if err != nil {
|
||||
return time.Time{}, err
|
||||
@@ -79,7 +79,7 @@ func toTime(in interface{}) (time.Time, error) {
|
||||
return now.Parse(ts)
|
||||
}
|
||||
|
||||
func toTimeRange(in interface{}) (*time.Time, *time.Time, error) {
|
||||
func toTimeRange(in any) (*time.Time, *time.Time, error) {
|
||||
var from, to time.Time
|
||||
|
||||
value, err := toString(in)
|
||||
|
||||
@@ -417,7 +417,6 @@ func TestParse_Spec(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
tc := tc
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
testKQL(t, tc)
|
||||
})
|
||||
@@ -851,7 +850,6 @@ func TestParse_DateTimeRestrictionNode(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
tc := tc
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
testKQL(t, tc)
|
||||
})
|
||||
@@ -909,7 +907,6 @@ func TestParse_Errors(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
tc := tc
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
testKQL(t, tc)
|
||||
})
|
||||
@@ -964,7 +961,6 @@ func TestParse_DottedKey(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
tc := tc
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
testKQL(t, tc)
|
||||
})
|
||||
@@ -1421,7 +1417,6 @@ func TestParse_Stress(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
tc := tc
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
testKQL(t, tc)
|
||||
})
|
||||
|
||||
+6
-6
@@ -27,7 +27,7 @@ func base(text []byte, pos position) (*ast.Base, error) {
|
||||
}, nil
|
||||
}
|
||||
|
||||
func buildAST(n interface{}, text []byte, pos position) (*ast.Ast, error) {
|
||||
func buildAST(n any, text []byte, pos position) (*ast.Ast, error) {
|
||||
b, err := base(text, pos)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -50,7 +50,7 @@ func buildAST(n interface{}, text []byte, pos position) (*ast.Ast, error) {
|
||||
return a, nil
|
||||
}
|
||||
|
||||
func buildStringNode(k, v interface{}, text []byte, pos position) (*ast.StringNode, error) {
|
||||
func buildStringNode(k, v any, text []byte, pos position) (*ast.StringNode, error) {
|
||||
b, err := base(text, pos)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -73,7 +73,7 @@ func buildStringNode(k, v interface{}, text []byte, pos position) (*ast.StringNo
|
||||
}, nil
|
||||
}
|
||||
|
||||
func buildDateTimeNode(k, o, v interface{}, text []byte, pos position) (*ast.DateTimeNode, error) {
|
||||
func buildDateTimeNode(k, o, v any, text []byte, pos position) (*ast.DateTimeNode, error) {
|
||||
b, err := base(text, pos)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -101,7 +101,7 @@ func buildDateTimeNode(k, o, v interface{}, text []byte, pos position) (*ast.Dat
|
||||
Value: value,
|
||||
}, nil
|
||||
}
|
||||
func buildNaturalLanguageDateTimeNodes(k, v interface{}, text []byte, pos position) ([]ast.Node, error) {
|
||||
func buildNaturalLanguageDateTimeNodes(k, v any, text []byte, pos position) ([]ast.Node, error) {
|
||||
b, err := base(text, pos)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -135,7 +135,7 @@ func buildNaturalLanguageDateTimeNodes(k, v interface{}, text []byte, pos positi
|
||||
|
||||
}
|
||||
|
||||
func buildBooleanNode(k, v interface{}, text []byte, pos position) (*ast.BooleanNode, error) {
|
||||
func buildBooleanNode(k, v any, text []byte, pos position) (*ast.BooleanNode, error) {
|
||||
b, err := base(text, pos)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -182,7 +182,7 @@ func buildOperatorNode(text []byte, pos position) (*ast.OperatorNode, error) {
|
||||
}, nil
|
||||
}
|
||||
|
||||
func buildGroupNode(k, n interface{}, text []byte, pos position) (*ast.GroupNode, error) {
|
||||
func buildGroupNode(k, n any, text []byte, pos position) (*ast.GroupNode, error) {
|
||||
b, err := base(text, pos)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -31,7 +31,6 @@ func TestNewAST(t *testing.T) {
|
||||
assert := tAssert.New(t)
|
||||
|
||||
for _, tt := range tests {
|
||||
tt := tt
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
got, err := kql.Builder{}.Build(tt.givenQuery)
|
||||
|
||||
|
||||
@@ -389,8 +389,8 @@ func TestTranslateStruct(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func mock() func(string, ...interface{}) string {
|
||||
return func(s string, i ...interface{}) string {
|
||||
func mock() func(string, ...any) string {
|
||||
return func(s string, i ...any) string {
|
||||
switch s {
|
||||
case "description":
|
||||
return "new Description"
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ func setMicroLogger() {
|
||||
}
|
||||
logger.DefaultLogger = mzlog.NewLogger(
|
||||
logger.WithLevel(logger.Level(lev)),
|
||||
logger.WithFields(map[string]interface{}{
|
||||
logger.WithFields(map[string]any{
|
||||
"system": "go-micro",
|
||||
}),
|
||||
)
|
||||
|
||||
@@ -53,8 +53,8 @@ func (h *LogrusWrapper) Fire(entry *logrus.Entry) error {
|
||||
}
|
||||
|
||||
// Convert logrus fields to zerolog
|
||||
func zeroLogFields(fields logrus.Fields) map[string]interface{} {
|
||||
fm := make(map[string]interface{})
|
||||
func zeroLogFields(fields logrus.Fields) map[string]any {
|
||||
fm := make(map[string]any)
|
||||
for k, v := range fields {
|
||||
fm[k] = v
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ const RoleIDs string = "Role-Ids"
|
||||
// and write it to the context. If there is no x-access-token the middleware is omitted.
|
||||
func ExtractAccountUUID(opts ...account.Option) func(http.Handler) http.Handler {
|
||||
opt := newAccountOptions(opts...)
|
||||
tokenManager, err := jwt.New(map[string]interface{}{
|
||||
tokenManager, err := jwt.New(map[string]any{
|
||||
"secret": opt.JWTSecret,
|
||||
"expires": int64(24 * 60 * 60),
|
||||
})
|
||||
|
||||
@@ -82,7 +82,7 @@ func OidcAuth(opts ...Option) func(http.Handler) http.Handler {
|
||||
w.WriteHeader(http.StatusUnauthorized)
|
||||
return
|
||||
}
|
||||
claims := map[string]interface{}{}
|
||||
claims := map[string]any{}
|
||||
err = userInfo.Claims(&claims)
|
||||
if err != nil {
|
||||
break
|
||||
|
||||
+5
-5
@@ -33,14 +33,14 @@ func SplitWithEscaping(s string, separator string, escapeString string) []string
|
||||
}
|
||||
|
||||
// WalkSegments uses the given array of segments to walk the claims and return whatever interface was found
|
||||
func WalkSegments(segments []string, claims map[string]interface{}) (interface{}, error) {
|
||||
func WalkSegments(segments []string, claims map[string]any) (any, error) {
|
||||
i := 0
|
||||
for ; i < len(segments)-1; i++ {
|
||||
switch castedClaims := claims[segments[i]].(type) {
|
||||
case map[string]interface{}:
|
||||
case map[string]any:
|
||||
claims = castedClaims
|
||||
case map[interface{}]interface{}:
|
||||
claims = make(map[string]interface{}, len(castedClaims))
|
||||
case map[any]any:
|
||||
claims = make(map[string]any, len(castedClaims))
|
||||
for k, v := range castedClaims {
|
||||
if s, ok := k.(string); ok {
|
||||
claims[s] = v
|
||||
@@ -56,7 +56,7 @@ func WalkSegments(segments []string, claims map[string]interface{}) (interface{}
|
||||
}
|
||||
|
||||
// ReadStringClaim returns the string obtained by following the . seperated path in the claims
|
||||
func ReadStringClaim(path string, claims map[string]interface{}) (string, error) {
|
||||
func ReadStringClaim(path string, claims map[string]any) (string, error) {
|
||||
// check the simple case first
|
||||
value, _ := claims[path].(string)
|
||||
if value != "" {
|
||||
|
||||
+13
-13
@@ -87,9 +87,9 @@ type walkSegmentsTest struct {
|
||||
segments []string
|
||||
|
||||
// seperator to use
|
||||
claims map[string]interface{}
|
||||
claims map[string]any
|
||||
|
||||
expected interface{}
|
||||
expected any
|
||||
|
||||
wantErr bool
|
||||
}
|
||||
@@ -109,7 +109,7 @@ func (wst walkSegmentsTest) run(t *testing.T) {
|
||||
|
||||
func TestWalkSegments(t *testing.T) {
|
||||
byt := []byte(`{"first":{"second":{"third":["value1","value2"]},"foo":"bar"},"fizz":"buzz"}`)
|
||||
var dat map[string]interface{}
|
||||
var dat map[string]any
|
||||
if err := json.Unmarshal(byt, &dat); err != nil {
|
||||
t.Errorf("%v", err)
|
||||
}
|
||||
@@ -118,7 +118,7 @@ func TestWalkSegments(t *testing.T) {
|
||||
{
|
||||
name: "one segment, single value",
|
||||
segments: []string{"first"},
|
||||
claims: map[string]interface{}{
|
||||
claims: map[string]any{
|
||||
"first": "value",
|
||||
},
|
||||
expected: "value",
|
||||
@@ -127,7 +127,7 @@ func TestWalkSegments(t *testing.T) {
|
||||
{
|
||||
name: "one segment, array value",
|
||||
segments: []string{"first"},
|
||||
claims: map[string]interface{}{
|
||||
claims: map[string]any{
|
||||
"first": []string{"value1", "value2"},
|
||||
},
|
||||
expected: []string{"value1", "value2"},
|
||||
@@ -136,8 +136,8 @@ func TestWalkSegments(t *testing.T) {
|
||||
{
|
||||
name: "two segments, single value",
|
||||
segments: []string{"first", "second"},
|
||||
claims: map[string]interface{}{
|
||||
"first": map[string]interface{}{
|
||||
claims: map[string]any{
|
||||
"first": map[string]any{
|
||||
"second": "value",
|
||||
},
|
||||
},
|
||||
@@ -147,8 +147,8 @@ func TestWalkSegments(t *testing.T) {
|
||||
{
|
||||
name: "two segments, array value",
|
||||
segments: []string{"first", "second"},
|
||||
claims: map[string]interface{}{
|
||||
"first": map[string]interface{}{
|
||||
claims: map[string]any{
|
||||
"first": map[string]any{
|
||||
"second": []string{"value1", "value2"},
|
||||
},
|
||||
},
|
||||
@@ -159,15 +159,15 @@ func TestWalkSegments(t *testing.T) {
|
||||
name: "three segments, array value from json",
|
||||
segments: []string{"first", "second", "third"},
|
||||
claims: dat,
|
||||
expected: []interface{}{"value1", "value2"},
|
||||
expected: []any{"value1", "value2"},
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "three segments, array value with interface key",
|
||||
segments: []string{"first", "second", "third"},
|
||||
claims: map[string]interface{}{
|
||||
"first": map[interface{}]interface{}{
|
||||
"second": map[interface{}]interface{}{
|
||||
claims: map[string]any{
|
||||
"first": map[any]any{
|
||||
"second": map[any]any{
|
||||
"third": []string{"value1", "value2"},
|
||||
},
|
||||
},
|
||||
|
||||
+2
-2
@@ -205,7 +205,7 @@ type userInfoRaw struct {
|
||||
}
|
||||
|
||||
// Claims unmarshals the raw JSON object claims into the provided object.
|
||||
func (u *UserInfo) Claims(v interface{}) error {
|
||||
func (u *UserInfo) Claims(v any) error {
|
||||
if u.claims == nil {
|
||||
return errors.New("oidc: claims not set")
|
||||
}
|
||||
@@ -359,7 +359,7 @@ func (c *oidcClient) VerifyLogoutToken(ctx context.Context, rawToken string) (*L
|
||||
return &claims, nil
|
||||
}
|
||||
|
||||
func unmarshalResp(r *http.Response, body []byte, v interface{}) error {
|
||||
func unmarshalResp(r *http.Response, body []byte, v any) error {
|
||||
err := json.Unmarshal(body, &v)
|
||||
if err == nil {
|
||||
return nil
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
)
|
||||
|
||||
type signingKey struct {
|
||||
priv interface{}
|
||||
priv any
|
||||
jwks *keyfunc.JWKS
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ func TestLogoutVerify(t *testing.T) {
|
||||
"iat": 1471566154,
|
||||
"jti": "bWJq",
|
||||
"sid": "08a5019c-17e1-4977-8f42-65a12843ea02",
|
||||
"events": map[string]interface{}{
|
||||
"events": map[string]any{
|
||||
"http://schemas.openid.net/event/backchannel-logout": struct{}{},
|
||||
},
|
||||
}),
|
||||
@@ -39,7 +39,7 @@ func TestLogoutVerify(t *testing.T) {
|
||||
logoutToken: jwt.NewWithClaims(jwt.SigningMethodRS256, jwt.MapClaims{
|
||||
"iss": "https://foo1",
|
||||
"sub": "248289761001",
|
||||
"events": map[string]interface{}{
|
||||
"events": map[string]any{
|
||||
"http://schemas.openid.net/event/backchannel-logout": struct{}{},
|
||||
},
|
||||
}),
|
||||
@@ -55,7 +55,7 @@ func TestLogoutVerify(t *testing.T) {
|
||||
"iat": 1471566154,
|
||||
"jti": "bWJq",
|
||||
"sid": "08a5019c-17e1-4977-8f42-65a12843ea02",
|
||||
"events": map[string]interface{}{
|
||||
"events": map[string]any{
|
||||
"http://schemas.openid.net/event/backchannel-logout": struct{}{},
|
||||
},
|
||||
}),
|
||||
@@ -70,7 +70,7 @@ func TestLogoutVerify(t *testing.T) {
|
||||
"aud": "s6BhdRkqt3",
|
||||
"iat": 1471566154,
|
||||
"jti": "bWJq",
|
||||
"events": map[string]interface{}{
|
||||
"events": map[string]any{
|
||||
"http://schemas.openid.net/event/backchannel-logout": struct{}{},
|
||||
},
|
||||
}),
|
||||
@@ -87,7 +87,7 @@ func TestLogoutVerify(t *testing.T) {
|
||||
"jti": "bWJq",
|
||||
"sid": "08a5019c-17e1-4977-8f42-65a12843ea02",
|
||||
"nonce": "123",
|
||||
"events": map[string]interface{}{
|
||||
"events": map[string]any{
|
||||
"http://schemas.openid.net/event/backchannel-logout": struct{}{},
|
||||
},
|
||||
}),
|
||||
@@ -103,7 +103,7 @@ func TestLogoutVerify(t *testing.T) {
|
||||
"iat": 1471566154,
|
||||
"jti": "bWJq",
|
||||
"sid": "08a5019c-17e1-4977-8f42-65a12843ea02",
|
||||
"events": map[string]interface{}{
|
||||
"events": map[string]any{
|
||||
"http://blah.blah.blash/event/backchannel-logout": struct{}{},
|
||||
},
|
||||
}),
|
||||
|
||||
+3
-3
@@ -9,13 +9,13 @@ type contextKey struct{}
|
||||
type newSessionFlagKey struct{}
|
||||
|
||||
// NewContext makes a new context that contains the OpenID connect claims in a map.
|
||||
func NewContext(parent context.Context, c map[string]interface{}) context.Context {
|
||||
func NewContext(parent context.Context, c map[string]any) context.Context {
|
||||
return context.WithValue(parent, contextKey{}, c)
|
||||
}
|
||||
|
||||
// FromContext returns the claims map stored in a context, or nil if there isn't one.
|
||||
func FromContext(ctx context.Context) map[string]interface{} {
|
||||
s, _ := ctx.Value(contextKey{}).(map[string]interface{})
|
||||
func FromContext(ctx context.Context) map[string]any {
|
||||
s, _ := ctx.Value(contextKey{}).(map[string]any)
|
||||
return s
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ func NewHandlerWrapper(limit int) server.HandlerWrapper {
|
||||
}
|
||||
|
||||
return func(h server.HandlerFunc) server.HandlerFunc {
|
||||
return func(ctx context.Context, req server.Request, rsp interface{}) error {
|
||||
return func(ctx context.Context, req server.Request, rsp any) error {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return ctx.Err()
|
||||
|
||||
@@ -99,7 +99,7 @@ func NewServiceWithClient(client client.Client, opts ...Option) (Service, error)
|
||||
// micro-plugin's opentracing wrapper: `opentracing.NewHandlerWrapper()`
|
||||
func LogHandler(l *log.Logger) func(fn server.HandlerFunc) server.HandlerFunc {
|
||||
return func(fn server.HandlerFunc) server.HandlerFunc {
|
||||
return func(ctx context.Context, req server.Request, rsp interface{}) error {
|
||||
return func(ctx context.Context, req server.Request, rsp any) error {
|
||||
now := time.Now()
|
||||
spanContext := trace.SpanContextFromContext(ctx)
|
||||
defer func() {
|
||||
|
||||
+2
-2
@@ -22,8 +22,8 @@ func (r *Reva) GetRevaOptions() []pool.Option {
|
||||
return opts
|
||||
}
|
||||
|
||||
func (r *Reva) GetGRPCClientConfig() map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
func (r *Reva) GetGRPCClientConfig() map[string]any {
|
||||
return map[string]any{
|
||||
"tls_mode": r.TLS.Mode,
|
||||
"tls_cacert": r.TLS.CACert,
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ import "time"
|
||||
// is to unpack environment variables into a Go value. We do so with reflection, and this data structure is just a step
|
||||
// in between.
|
||||
type EnvBinding struct {
|
||||
EnvVars []string // name of the environment var.
|
||||
Destination interface{} // pointer to the original config value to modify.
|
||||
EnvVars []string // name of the environment var.
|
||||
Destination any // pointer to the original config value to modify.
|
||||
}
|
||||
|
||||
// Log defines the available logging configuration.
|
||||
|
||||
+4
-4
@@ -17,7 +17,7 @@ type Cache struct {
|
||||
|
||||
// CacheEntry represents an entry on the cache. You can type assert on V.
|
||||
type CacheEntry struct {
|
||||
V interface{}
|
||||
V any
|
||||
expiration time.Time
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ type CacheEntry struct {
|
||||
func NewCache(capacity int) Cache {
|
||||
return Cache{
|
||||
capacity: uint64(capacity),
|
||||
pool: sync.Pool{New: func() interface{} {
|
||||
pool: sync.Pool{New: func() any {
|
||||
return new(CacheEntry)
|
||||
}},
|
||||
}
|
||||
@@ -45,7 +45,7 @@ func (c *Cache) Load(key string) *CacheEntry {
|
||||
}
|
||||
|
||||
// Store adds an entry for given key and value
|
||||
func (c *Cache) Store(key string, val interface{}, expiration time.Time) {
|
||||
func (c *Cache) Store(key string, val any, expiration time.Time) {
|
||||
if c.length > c.capacity {
|
||||
c.evict()
|
||||
}
|
||||
@@ -79,7 +79,7 @@ func (c *Cache) Delete(key string) bool {
|
||||
|
||||
// evict frees memory from the cache by removing entries that exceeded the cache TTL.
|
||||
func (c *Cache) evict() {
|
||||
c.entries.Range(func(key, mapEntry interface{}) bool {
|
||||
c.entries.Range(func(key, mapEntry any) bool {
|
||||
entry := mapEntry.(*CacheEntry)
|
||||
if c.expired(entry) {
|
||||
c.Delete(key.(string))
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ type NamedRWMutex struct {
|
||||
|
||||
// NewNamedRWMutex returns a new instance of NamedRWMutex.
|
||||
func NewNamedRWMutex() NamedRWMutex {
|
||||
return NamedRWMutex{pool: sync.Pool{New: func() interface{} {
|
||||
return NamedRWMutex{pool: sync.Pool{New: func() any {
|
||||
return new(sync.RWMutex)
|
||||
}}}
|
||||
}
|
||||
|
||||
@@ -52,8 +52,6 @@ func TestJailJoin(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
tt := tt
|
||||
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
@@ -30,9 +30,3 @@ plugins:
|
||||
- name: openapiv2
|
||||
path: ../../.bingo/protoc-gen-openapiv2
|
||||
out: ../gen/
|
||||
|
||||
- name: doc
|
||||
path: ../../.bingo/protoc-gen-doc
|
||||
out: ../../docs/apis/grpc_apis
|
||||
opt:
|
||||
- ../docs/GRPC.tmpl,grpc.md,source_relative
|
||||
|
||||
@@ -19,7 +19,7 @@ import (
|
||||
)
|
||||
|
||||
// Service is the service interface
|
||||
type Service interface{}
|
||||
type Service any
|
||||
|
||||
// Server initializes the http service and server.
|
||||
func Server(opts ...Option) (http.Service, error) {
|
||||
|
||||
@@ -18,12 +18,12 @@ import (
|
||||
"github.com/opencloud-eu/reva/v2/pkg/utils"
|
||||
"google.golang.org/grpc/metadata"
|
||||
|
||||
libregraph "github.com/opencloud-eu/libre-graph-api-go"
|
||||
"github.com/opencloud-eu/opencloud/pkg/ast"
|
||||
"github.com/opencloud-eu/opencloud/pkg/kql"
|
||||
"github.com/opencloud-eu/opencloud/pkg/l10n"
|
||||
ehmsg "github.com/opencloud-eu/opencloud/protogen/gen/opencloud/messages/eventhistory/v0"
|
||||
ehsvc "github.com/opencloud-eu/opencloud/protogen/gen/opencloud/services/eventhistory/v0"
|
||||
libregraph "github.com/opencloud-eu/libre-graph-api-go"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -121,7 +121,7 @@ func (s *ActivitylogService) HandleGetItemActivities(w http.ResponseWriter, r *h
|
||||
var (
|
||||
message string
|
||||
ts time.Time
|
||||
vars map[string]interface{}
|
||||
vars map[string]any
|
||||
)
|
||||
|
||||
loc := l10n.MustGetUserLocale(r.Context(), activeUser.GetId().GetOpaqueId(), r.Header.Get(l10n.HeaderAcceptLanguage), s.valService)
|
||||
@@ -252,7 +252,7 @@ func (s *ActivitylogService) HandleGetItemActivities(w http.ResponseWriter, r *h
|
||||
w.WriteHeader(http.StatusOK)
|
||||
}
|
||||
|
||||
func (s *ActivitylogService) unwrapEvent(e *ehmsg.Event) interface{} {
|
||||
func (s *ActivitylogService) unwrapEvent(e *ehmsg.Event) any {
|
||||
etype, ok := s.registeredEvents[e.GetType()]
|
||||
if !ok {
|
||||
s.log.Error().Str("eventid", e.GetId()).Str("eventtype", e.GetType()).Msg("event not registered")
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-04-05 00:04+0000\n"
|
||||
"POT-Creation-Date: 2026-04-26 00:03+0000\n"
|
||||
"PO-Revision-Date: 2025-01-27 10:17+0000\n"
|
||||
"Last-Translator: Stephan Paternotte <stephan@paternottes.net>, 2025\n"
|
||||
"Language-Team: Dutch (https://app.transifex.com/opencloud-eu/teams/204053/nl/)\n"
|
||||
|
||||
@@ -12,7 +12,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-04-05 00:04+0000\n"
|
||||
"POT-Creation-Date: 2026-04-26 00:03+0000\n"
|
||||
"PO-Revision-Date: 2025-01-27 10:17+0000\n"
|
||||
"Last-Translator: Lulufox, 2025\n"
|
||||
"Language-Team: Russian (https://app.transifex.com/opencloud-eu/teams/204053/ru/)\n"
|
||||
|
||||
@@ -54,9 +54,9 @@ func (a *ActivitylogService) migrateToV1(_ context.Context, kv nats.KeyValue) er
|
||||
|
||||
// keyValueEnvelope is the data structure used by the go micro plugin which was used previously.
|
||||
type keyValueEnvelope struct {
|
||||
Key string `json:"key"`
|
||||
Data []byte `json:"data"`
|
||||
Metadata map[string]interface{} `json:"metadata"`
|
||||
Key string `json:"key"`
|
||||
Data []byte `json:"data"`
|
||||
Metadata map[string]any `json:"metadata"`
|
||||
}
|
||||
|
||||
for key := range keyChan {
|
||||
|
||||
@@ -69,11 +69,11 @@ type Sharee struct {
|
||||
}
|
||||
|
||||
// ActivityOption allows setting variables for an activity
|
||||
type ActivityOption func(context.Context, gateway.GatewayAPIClient, map[string]interface{}) error
|
||||
type ActivityOption func(context.Context, gateway.GatewayAPIClient, map[string]any) error
|
||||
|
||||
// WithResource sets the resource variable for an activity
|
||||
func WithResource(ref *provider.Reference, addSpace bool, explicitResourceName string) ActivityOption {
|
||||
return func(ctx context.Context, gwc gateway.GatewayAPIClient, vars map[string]interface{}) error {
|
||||
return func(ctx context.Context, gwc gateway.GatewayAPIClient, vars map[string]any) error {
|
||||
info, err := utils.GetResource(ctx, ref, gwc)
|
||||
if err != nil {
|
||||
if explicitResourceName == "" {
|
||||
@@ -119,7 +119,7 @@ func WithResource(ref *provider.Reference, addSpace bool, explicitResourceName s
|
||||
|
||||
// WithOldResource sets the oldResource variable for an activity
|
||||
func WithOldResource(ref *provider.Reference) ActivityOption {
|
||||
return func(_ context.Context, _ gateway.GatewayAPIClient, vars map[string]interface{}) error {
|
||||
return func(_ context.Context, _ gateway.GatewayAPIClient, vars map[string]any) error {
|
||||
name := filepath.Base(ref.GetPath())
|
||||
vars["oldResource"] = Resource{
|
||||
Name: name,
|
||||
@@ -130,7 +130,7 @@ func WithOldResource(ref *provider.Reference) ActivityOption {
|
||||
|
||||
// WithTrashedResource sets the resource variable if the resource is trashed
|
||||
func WithTrashedResource(ref *provider.Reference, rid *provider.ResourceId) ActivityOption {
|
||||
return func(ctx context.Context, gwc gateway.GatewayAPIClient, vars map[string]interface{}) error {
|
||||
return func(ctx context.Context, gwc gateway.GatewayAPIClient, vars map[string]any) error {
|
||||
vars["resource"] = Resource{
|
||||
Name: filepath.Base(ref.GetPath()),
|
||||
}
|
||||
@@ -174,7 +174,7 @@ func WithTrashedResource(ref *provider.Reference, rid *provider.ResourceId) Acti
|
||||
|
||||
// WithUser sets the user variable for an Activity
|
||||
func WithUser(uid *user.UserId, u *user.User, impersonator *user.User) ActivityOption {
|
||||
return func(ctx context.Context, gwc gateway.GatewayAPIClient, vars map[string]interface{}) error {
|
||||
return func(ctx context.Context, gwc gateway.GatewayAPIClient, vars map[string]any) error {
|
||||
var target *user.User
|
||||
switch {
|
||||
case impersonator != nil:
|
||||
@@ -206,7 +206,7 @@ func WithUser(uid *user.UserId, u *user.User, impersonator *user.User) ActivityO
|
||||
|
||||
// WithSharee sets the sharee variable for an activity
|
||||
func WithSharee(uid *user.UserId, gid *group.GroupId) ActivityOption {
|
||||
return func(ctx context.Context, gwc gateway.GatewayAPIClient, vars map[string]interface{}) error {
|
||||
return func(ctx context.Context, gwc gateway.GatewayAPIClient, vars map[string]any) error {
|
||||
switch {
|
||||
case uid != nil:
|
||||
u, err := utils.GetUserNoGroups(ctx, uid, gwc)
|
||||
@@ -252,7 +252,7 @@ func WithSharee(uid *user.UserId, gid *group.GroupId) ActivityOption {
|
||||
|
||||
// WithSpace sets the space variable for an activity
|
||||
func WithSpace(spaceid *provider.StorageSpaceId) ActivityOption {
|
||||
return func(ctx context.Context, gwc gateway.GatewayAPIClient, vars map[string]interface{}) error {
|
||||
return func(ctx context.Context, gwc gateway.GatewayAPIClient, vars map[string]any) error {
|
||||
s, err := utils.GetSpace(ctx, spaceid.GetOpaqueId(), gwc)
|
||||
if err != nil {
|
||||
vars["space"] = Resource{
|
||||
@@ -272,7 +272,7 @@ func WithSpace(spaceid *provider.StorageSpaceId) ActivityOption {
|
||||
|
||||
// WithTranslation sets a variable that translation is needed for
|
||||
func WithTranslation(t *l10n.Translator, locale string, key string, values []string) ActivityOption {
|
||||
return func(_ context.Context, _ gateway.GatewayAPIClient, vars map[string]interface{}) error {
|
||||
return func(_ context.Context, _ gateway.GatewayAPIClient, vars map[string]any) error {
|
||||
f := t.Translate(StrSomeField, locale)
|
||||
if len(values) > 0 {
|
||||
for i := range values {
|
||||
@@ -289,7 +289,7 @@ func WithTranslation(t *l10n.Translator, locale string, key string, values []str
|
||||
|
||||
// WithVar sets a variable for an activity
|
||||
func WithVar(key, id, name string) ActivityOption {
|
||||
return func(_ context.Context, _ gateway.GatewayAPIClient, vars map[string]interface{}) error {
|
||||
return func(_ context.Context, _ gateway.GatewayAPIClient, vars map[string]any) error {
|
||||
vars[key] = Resource{
|
||||
ID: id,
|
||||
Name: name,
|
||||
@@ -299,7 +299,7 @@ func WithVar(key, id, name string) ActivityOption {
|
||||
}
|
||||
|
||||
// NewActivity creates a new activity
|
||||
func NewActivity(message string, ts time.Time, eventID string, vars map[string]interface{}) libregraph.Activity {
|
||||
func NewActivity(message string, ts time.Time, eventID string, vars map[string]any) libregraph.Activity {
|
||||
return libregraph.Activity{
|
||||
Id: eventID,
|
||||
Times: libregraph.ActivityTimes{RecordedTime: ts},
|
||||
@@ -311,13 +311,13 @@ func NewActivity(message string, ts time.Time, eventID string, vars map[string]i
|
||||
}
|
||||
|
||||
// GetVars calls other service to gather the required data for the activity variables
|
||||
func (s *ActivitylogService) GetVars(ctx context.Context, opts ...ActivityOption) (map[string]interface{}, error) {
|
||||
func (s *ActivitylogService) GetVars(ctx context.Context, opts ...ActivityOption) (map[string]any, error) {
|
||||
gwc, err := s.gws.Next()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
vars := make(map[string]interface{})
|
||||
vars := make(map[string]any)
|
||||
for _, opt := range opts {
|
||||
if err := opt(ctx, gwc, vars); err != nil {
|
||||
s.log.Info().Err(err).Msg("error getting activity vars")
|
||||
|
||||
@@ -145,7 +145,6 @@ var _ = Describe("ActivitylogService", func() {
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc // capture range variable
|
||||
Context(tc.Name, func() {
|
||||
JustBeforeEach(func() {
|
||||
getResource = func(_ context.Context, ref *provider.Reference) (*provider.ResourceInfo, error) {
|
||||
@@ -268,7 +267,7 @@ var _ = Describe("ActivitylogService", func() {
|
||||
})
|
||||
})
|
||||
|
||||
func activitites(acts ...interface{}) []RawActivity {
|
||||
func activitites(acts ...any) []RawActivity {
|
||||
var activities []RawActivity
|
||||
act := RawActivity{}
|
||||
for _, a := range acts {
|
||||
|
||||
@@ -6,28 +6,28 @@ import (
|
||||
)
|
||||
|
||||
// AppProviderConfigFromStruct will adapt an OpenCloud config struct into a reva mapstructure to start a reva service.
|
||||
func AppProviderConfigFromStruct(cfg *config.Config) map[string]interface{} {
|
||||
rcfg := map[string]interface{}{
|
||||
"shared": map[string]interface{}{
|
||||
func AppProviderConfigFromStruct(cfg *config.Config) map[string]any {
|
||||
rcfg := map[string]any{
|
||||
"shared": map[string]any{
|
||||
"jwt_secret": cfg.TokenManager.JWTSecret,
|
||||
"gatewaysvc": cfg.Reva.Address,
|
||||
"grpc_client_options": cfg.Reva.GetGRPCClientConfig(),
|
||||
"multi_tenant_enabled": cfg.Commons.MultiTenantEnabled,
|
||||
},
|
||||
"grpc": map[string]interface{}{
|
||||
"grpc": map[string]any{
|
||||
"network": cfg.GRPC.Protocol,
|
||||
"address": cfg.GRPC.Addr,
|
||||
"tls_settings": map[string]interface{}{
|
||||
"tls_settings": map[string]any{
|
||||
"enabled": cfg.GRPC.TLS.Enabled,
|
||||
"certificate": cfg.GRPC.TLS.Cert,
|
||||
"key": cfg.GRPC.TLS.Key,
|
||||
},
|
||||
"services": map[string]interface{}{
|
||||
"appprovider": map[string]interface{}{
|
||||
"services": map[string]any{
|
||||
"appprovider": map[string]any{
|
||||
"app_provider_url": cfg.ExternalAddr,
|
||||
"driver": cfg.Driver,
|
||||
"drivers": map[string]interface{}{
|
||||
"wopi": map[string]interface{}{
|
||||
"drivers": map[string]any{
|
||||
"wopi": map[string]any{
|
||||
"app_api_key": cfg.Drivers.WOPI.AppAPIKey,
|
||||
"app_desktop_only": cfg.Drivers.WOPI.AppDesktopOnly,
|
||||
"app_icon_uri": cfg.Drivers.WOPI.AppIconURI,
|
||||
@@ -45,8 +45,8 @@ func AppProviderConfigFromStruct(cfg *config.Config) map[string]interface{} {
|
||||
},
|
||||
},
|
||||
},
|
||||
"interceptors": map[string]interface{}{
|
||||
"prometheus": map[string]interface{}{
|
||||
"interceptors": map[string]any{
|
||||
"prometheus": map[string]any{
|
||||
"namespace": "opencloud",
|
||||
"subsystem": "app_provider",
|
||||
},
|
||||
|
||||
@@ -7,34 +7,34 @@ import (
|
||||
)
|
||||
|
||||
// AppRegistryConfigFromStruct will adapt an OpenCloud config struct into a reva mapstructure to start a reva service.
|
||||
func AppRegistryConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]interface{} {
|
||||
rcfg := map[string]interface{}{
|
||||
"shared": map[string]interface{}{
|
||||
func AppRegistryConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]any {
|
||||
rcfg := map[string]any{
|
||||
"shared": map[string]any{
|
||||
"jwt_secret": cfg.TokenManager.JWTSecret,
|
||||
"gatewaysvc": cfg.Reva.Address,
|
||||
"grpc_client_options": cfg.Reva.GetGRPCClientConfig(),
|
||||
"multi_tenant_enabled": cfg.Commons.MultiTenantEnabled,
|
||||
},
|
||||
"grpc": map[string]interface{}{
|
||||
"grpc": map[string]any{
|
||||
"network": cfg.GRPC.Protocol,
|
||||
"address": cfg.GRPC.Addr,
|
||||
"tls_settings": map[string]interface{}{
|
||||
"tls_settings": map[string]any{
|
||||
"enabled": cfg.GRPC.TLS.Enabled,
|
||||
"certificate": cfg.GRPC.TLS.Cert,
|
||||
"key": cfg.GRPC.TLS.Key,
|
||||
},
|
||||
"services": map[string]interface{}{
|
||||
"appregistry": map[string]interface{}{
|
||||
"services": map[string]any{
|
||||
"appregistry": map[string]any{
|
||||
"driver": "static",
|
||||
"drivers": map[string]interface{}{
|
||||
"static": map[string]interface{}{
|
||||
"drivers": map[string]any{
|
||||
"static": map[string]any{
|
||||
"mime_types": mimetypes(cfg, logger),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"interceptors": map[string]interface{}{
|
||||
"prometheus": map[string]interface{}{
|
||||
"interceptors": map[string]any{
|
||||
"prometheus": map[string]any{
|
||||
"namespace": "opencloud",
|
||||
"subsystem": "app_registry",
|
||||
},
|
||||
@@ -44,8 +44,8 @@ func AppRegistryConfigFromStruct(cfg *config.Config, logger log.Logger) map[stri
|
||||
return rcfg
|
||||
}
|
||||
|
||||
func mimetypes(cfg *config.Config, logger log.Logger) []map[string]interface{} {
|
||||
var m []map[string]interface{}
|
||||
func mimetypes(cfg *config.Config, logger log.Logger) []map[string]any {
|
||||
var m []map[string]any
|
||||
if err := mapstructure.Decode(cfg.AppRegistry.MimeTypeConfig, &m); err != nil {
|
||||
logger.Error().Err(err).Msg("Failed to decode appregistry mimetypes to mapstructure")
|
||||
return nil
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
type Log func([]byte)
|
||||
|
||||
// Marshaller is used to marshal events
|
||||
type Marshaller func(interface{}) ([]byte, error)
|
||||
type Marshaller func(any) ([]byte, error)
|
||||
|
||||
// AuditLoggerFromConfig will start a new AuditLogger generated from the config
|
||||
func AuditLoggerFromConfig(ctx context.Context, cfg config.Auditlog, ch <-chan events.Event, log log.Logger) {
|
||||
@@ -47,7 +47,7 @@ func StartAuditLogger(ctx context.Context, ch <-chan events.Event, log log.Logge
|
||||
return
|
||||
}
|
||||
|
||||
var auditEvent interface{}
|
||||
var auditEvent any
|
||||
switch ev := i.Event.(type) {
|
||||
case events.ShareCreated:
|
||||
auditEvent = types.ShareCreated(ev)
|
||||
@@ -177,13 +177,13 @@ func Marshal(format string, log log.Logger) Marshaller {
|
||||
case "json":
|
||||
return json.Marshal
|
||||
case "minimal":
|
||||
return func(ev interface{}) ([]byte, error) {
|
||||
return func(ev any) ([]byte, error) {
|
||||
b, err := json.Marshal(ev)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
m := make(map[string]interface{})
|
||||
m := make(map[string]any)
|
||||
if err := json.Unmarshal(b, &m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
// AuthAppConfigFromStruct will adapt an OpenCloud config struct into a reva mapstructure to start a reva service.
|
||||
func AuthAppConfigFromStruct(cfg *config.Config) map[string]interface{} {
|
||||
func AuthAppConfigFromStruct(cfg *config.Config) map[string]any {
|
||||
appAuthJSON := filepath.Join(defaults.BaseDataPath(), "appauth.json")
|
||||
|
||||
jsonCS3pwGenOpt := map[string]any{}
|
||||
@@ -19,38 +19,38 @@ func AuthAppConfigFromStruct(cfg *config.Config) map[string]interface{} {
|
||||
jsonCS3pwGenOpt["number_of_words"] = cfg.StorageDrivers.JSONCS3.PasswordGeneratorOptions.DicewareOptions.NumberOfWords
|
||||
}
|
||||
|
||||
rcfg := map[string]interface{}{
|
||||
"shared": map[string]interface{}{
|
||||
rcfg := map[string]any{
|
||||
"shared": map[string]any{
|
||||
"jwt_secret": cfg.TokenManager.JWTSecret,
|
||||
"gatewaysvc": cfg.Reva.Address,
|
||||
"skip_user_groups_in_token": cfg.SkipUserGroupsInToken,
|
||||
"grpc_client_options": cfg.Reva.GetGRPCClientConfig(),
|
||||
"multi_tenant_enabled": cfg.Commons.MultiTenantEnabled,
|
||||
},
|
||||
"grpc": map[string]interface{}{
|
||||
"grpc": map[string]any{
|
||||
"network": cfg.GRPC.Protocol,
|
||||
"address": cfg.GRPC.Addr,
|
||||
"tls_settings": map[string]interface{}{
|
||||
"tls_settings": map[string]any{
|
||||
"enabled": cfg.GRPC.TLS.Enabled,
|
||||
"certificate": cfg.GRPC.TLS.Cert,
|
||||
"key": cfg.GRPC.TLS.Key,
|
||||
},
|
||||
"services": map[string]interface{}{
|
||||
"authprovider": map[string]interface{}{
|
||||
"services": map[string]any{
|
||||
"authprovider": map[string]any{
|
||||
"auth_manager": "appauth",
|
||||
"auth_managers": map[string]interface{}{
|
||||
"appauth": map[string]interface{}{
|
||||
"auth_managers": map[string]any{
|
||||
"appauth": map[string]any{
|
||||
"gateway_addr": cfg.Reva.Address,
|
||||
},
|
||||
},
|
||||
},
|
||||
"applicationauth": map[string]interface{}{
|
||||
"applicationauth": map[string]any{
|
||||
"driver": cfg.StorageDriver,
|
||||
"drivers": map[string]interface{}{
|
||||
"json": map[string]interface{}{
|
||||
"drivers": map[string]any{
|
||||
"json": map[string]any{
|
||||
"file": appAuthJSON,
|
||||
},
|
||||
"jsoncs3": map[string]interface{}{
|
||||
"jsoncs3": map[string]any{
|
||||
"provider_addr": cfg.StorageDrivers.JSONCS3.ProviderAddr,
|
||||
"service_user_id": cfg.StorageDrivers.JSONCS3.SystemUserID,
|
||||
"service_user_idp": cfg.StorageDrivers.JSONCS3.SystemUserIDP,
|
||||
@@ -61,8 +61,8 @@ func AuthAppConfigFromStruct(cfg *config.Config) map[string]interface{} {
|
||||
},
|
||||
},
|
||||
},
|
||||
"interceptors": map[string]interface{}{
|
||||
"prometheus": map[string]interface{}{
|
||||
"interceptors": map[string]any{
|
||||
"prometheus": map[string]any{
|
||||
"namespace": "opencloud",
|
||||
"subsystem": "auth_app",
|
||||
},
|
||||
|
||||
@@ -19,7 +19,7 @@ import (
|
||||
)
|
||||
|
||||
// Service is the service interface
|
||||
type Service interface{}
|
||||
type Service any
|
||||
|
||||
// Server initializes the http service and server.
|
||||
func Server(opts ...Option) (http.Service, error) {
|
||||
|
||||
@@ -5,33 +5,33 @@ import (
|
||||
)
|
||||
|
||||
// AuthBasicConfigFromStruct will adapt an OpenCloud config struct into a reva mapstructure to start a reva service.
|
||||
func AuthBasicConfigFromStruct(cfg *config.Config) map[string]interface{} {
|
||||
rcfg := map[string]interface{}{
|
||||
"shared": map[string]interface{}{
|
||||
func AuthBasicConfigFromStruct(cfg *config.Config) map[string]any {
|
||||
rcfg := map[string]any{
|
||||
"shared": map[string]any{
|
||||
"jwt_secret": cfg.TokenManager.JWTSecret,
|
||||
"gatewaysvc": cfg.Reva.Address,
|
||||
"skip_user_groups_in_token": cfg.SkipUserGroupsInToken,
|
||||
"grpc_client_options": cfg.Reva.GetGRPCClientConfig(),
|
||||
"multi_tenant_enabled": cfg.Commons.MultiTenantEnabled,
|
||||
},
|
||||
"grpc": map[string]interface{}{
|
||||
"grpc": map[string]any{
|
||||
"network": cfg.GRPC.Protocol,
|
||||
"address": cfg.GRPC.Addr,
|
||||
"tls_settings": map[string]interface{}{
|
||||
"tls_settings": map[string]any{
|
||||
"enabled": cfg.GRPC.TLS.Enabled,
|
||||
"certificate": cfg.GRPC.TLS.Cert,
|
||||
"key": cfg.GRPC.TLS.Key,
|
||||
},
|
||||
// TODO build services dynamically
|
||||
"services": map[string]interface{}{
|
||||
"authprovider": map[string]interface{}{
|
||||
"services": map[string]any{
|
||||
"authprovider": map[string]any{
|
||||
"auth_manager": cfg.AuthProvider,
|
||||
"auth_managers": map[string]interface{}{
|
||||
"json": map[string]interface{}{
|
||||
"auth_managers": map[string]any{
|
||||
"json": map[string]any{
|
||||
"users": cfg.AuthProviders.JSON.File,
|
||||
},
|
||||
"ldap": ldapConfigFromString(cfg.AuthProviders.LDAP),
|
||||
"owncloudsql": map[string]interface{}{
|
||||
"owncloudsql": map[string]any{
|
||||
"dbusername": cfg.AuthProviders.OwnCloudSQL.DBUsername,
|
||||
"dbpassword": cfg.AuthProviders.OwnCloudSQL.DBPassword,
|
||||
"dbhost": cfg.AuthProviders.OwnCloudSQL.DBHost,
|
||||
@@ -45,8 +45,8 @@ func AuthBasicConfigFromStruct(cfg *config.Config) map[string]interface{} {
|
||||
},
|
||||
},
|
||||
},
|
||||
"interceptors": map[string]interface{}{
|
||||
"prometheus": map[string]interface{}{
|
||||
"interceptors": map[string]any{
|
||||
"prometheus": map[string]any{
|
||||
"namespace": "opencloud",
|
||||
"subsystem": "auth_basic",
|
||||
},
|
||||
@@ -56,8 +56,8 @@ func AuthBasicConfigFromStruct(cfg *config.Config) map[string]interface{} {
|
||||
return rcfg
|
||||
}
|
||||
|
||||
func ldapConfigFromString(cfg config.LDAPProvider) map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
func ldapConfigFromString(cfg config.LDAPProvider) map[string]any {
|
||||
return map[string]any{
|
||||
"uri": cfg.URI,
|
||||
"cacert": cfg.CACert,
|
||||
"insecure": cfg.Insecure,
|
||||
@@ -76,7 +76,7 @@ func ldapConfigFromString(cfg config.LDAPProvider) map[string]interface{} {
|
||||
"user_enabled_property": cfg.UserSchema.Enabled,
|
||||
"group_local_disabled_dn": cfg.LdapDisabledUsersGroupDN,
|
||||
"idp": cfg.IDP,
|
||||
"user_schema": map[string]interface{}{
|
||||
"user_schema": map[string]any{
|
||||
"id": cfg.UserSchema.ID,
|
||||
"tenantId": cfg.UserSchema.TenantID,
|
||||
"idIsOctetString": cfg.UserSchema.IDIsOctetString,
|
||||
@@ -84,7 +84,7 @@ func ldapConfigFromString(cfg config.LDAPProvider) map[string]interface{} {
|
||||
"displayName": cfg.UserSchema.DisplayName,
|
||||
"userName": cfg.UserSchema.Username,
|
||||
},
|
||||
"group_schema": map[string]interface{}{
|
||||
"group_schema": map[string]any{
|
||||
"id": cfg.GroupSchema.ID,
|
||||
"idIsOctetString": cfg.GroupSchema.IDIsOctetString,
|
||||
"mail": cfg.GroupSchema.Mail,
|
||||
|
||||
@@ -6,28 +6,28 @@ import (
|
||||
)
|
||||
|
||||
// AuthBearerConfigFromStruct will adapt an OpenCloud config struct into a reva mapstructure to start a reva service.
|
||||
func AuthBearerConfigFromStruct(cfg *config.Config) map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
"shared": map[string]interface{}{
|
||||
func AuthBearerConfigFromStruct(cfg *config.Config) map[string]any {
|
||||
return map[string]any{
|
||||
"shared": map[string]any{
|
||||
"jwt_secret": cfg.TokenManager.JWTSecret,
|
||||
"gatewaysvc": cfg.Reva.Address,
|
||||
"skip_user_groups_in_token": cfg.SkipUserGroupsInToken,
|
||||
"grpc_client_options": cfg.Reva.GetGRPCClientConfig(),
|
||||
"multi_tenant_enabled": cfg.Commons.MultiTenantEnabled,
|
||||
},
|
||||
"grpc": map[string]interface{}{
|
||||
"grpc": map[string]any{
|
||||
"network": cfg.GRPC.Protocol,
|
||||
"address": cfg.GRPC.Addr,
|
||||
"tls_settings": map[string]interface{}{
|
||||
"tls_settings": map[string]any{
|
||||
"enabled": cfg.GRPC.TLS.Enabled,
|
||||
"certificate": cfg.GRPC.TLS.Cert,
|
||||
"key": cfg.GRPC.TLS.Key,
|
||||
},
|
||||
"services": map[string]interface{}{
|
||||
"authprovider": map[string]interface{}{
|
||||
"services": map[string]any{
|
||||
"authprovider": map[string]any{
|
||||
"auth_manager": "oidc",
|
||||
"auth_managers": map[string]interface{}{
|
||||
"oidc": map[string]interface{}{
|
||||
"auth_managers": map[string]any{
|
||||
"oidc": map[string]any{
|
||||
"issuer": cfg.OIDC.Issuer,
|
||||
"insecure": cfg.OIDC.Insecure,
|
||||
"id_claim": cfg.OIDC.IDClaim,
|
||||
@@ -37,8 +37,8 @@ func AuthBearerConfigFromStruct(cfg *config.Config) map[string]interface{} {
|
||||
},
|
||||
},
|
||||
},
|
||||
"interceptors": map[string]interface{}{
|
||||
"prometheus": map[string]interface{}{
|
||||
"interceptors": map[string]any{
|
||||
"prometheus": map[string]any{
|
||||
"namespace": "opencloud",
|
||||
"subsystem": "auth_bearer",
|
||||
},
|
||||
|
||||
@@ -5,36 +5,36 @@ import (
|
||||
)
|
||||
|
||||
// AuthMachineConfigFromStruct will adapt an OpenCloud config struct into a reva mapstructure to start a reva service.
|
||||
func AuthMachineConfigFromStruct(cfg *config.Config) map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
"shared": map[string]interface{}{
|
||||
func AuthMachineConfigFromStruct(cfg *config.Config) map[string]any {
|
||||
return map[string]any{
|
||||
"shared": map[string]any{
|
||||
"jwt_secret": cfg.TokenManager.JWTSecret,
|
||||
"gatewaysvc": cfg.Reva.Address,
|
||||
"skip_user_groups_in_token": cfg.SkipUserGroupsInToken,
|
||||
"grpc_client_options": cfg.Reva.GetGRPCClientConfig(),
|
||||
"multi_tenant_enabled": cfg.Commons.MultiTenantEnabled,
|
||||
},
|
||||
"grpc": map[string]interface{}{
|
||||
"grpc": map[string]any{
|
||||
"network": cfg.GRPC.Protocol,
|
||||
"address": cfg.GRPC.Addr,
|
||||
"tls_settings": map[string]interface{}{
|
||||
"tls_settings": map[string]any{
|
||||
"enabled": cfg.GRPC.TLS.Enabled,
|
||||
"certificate": cfg.GRPC.TLS.Cert,
|
||||
"key": cfg.GRPC.TLS.Key,
|
||||
},
|
||||
"services": map[string]interface{}{
|
||||
"authprovider": map[string]interface{}{
|
||||
"services": map[string]any{
|
||||
"authprovider": map[string]any{
|
||||
"auth_manager": "machine",
|
||||
"auth_managers": map[string]interface{}{
|
||||
"machine": map[string]interface{}{
|
||||
"auth_managers": map[string]any{
|
||||
"machine": map[string]any{
|
||||
"api_key": cfg.MachineAuthAPIKey,
|
||||
"gateway_addr": cfg.Reva.Address,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"interceptors": map[string]interface{}{
|
||||
"prometheus": map[string]interface{}{
|
||||
"interceptors": map[string]any{
|
||||
"prometheus": map[string]any{
|
||||
"namespace": "opencloud",
|
||||
"subsystem": "auth_machine",
|
||||
},
|
||||
|
||||
@@ -5,28 +5,28 @@ import (
|
||||
)
|
||||
|
||||
// AuthMachineConfigFromStruct will adapt an OpenCloud config struct into a reva mapstructure to start a reva service.
|
||||
func AuthMachineConfigFromStruct(cfg *config.Config) map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
"shared": map[string]interface{}{
|
||||
func AuthMachineConfigFromStruct(cfg *config.Config) map[string]any {
|
||||
return map[string]any{
|
||||
"shared": map[string]any{
|
||||
"jwt_secret": cfg.TokenManager.JWTSecret,
|
||||
"gatewaysvc": cfg.Reva.Address,
|
||||
"grpc_client_options": cfg.Reva.GetGRPCClientConfig(),
|
||||
"multi_tenant_enabled": cfg.Commons.MultiTenantEnabled,
|
||||
},
|
||||
"grpc": map[string]interface{}{
|
||||
"grpc": map[string]any{
|
||||
"network": cfg.GRPC.Protocol,
|
||||
"address": cfg.GRPC.Addr,
|
||||
"tls_settings": map[string]interface{}{
|
||||
"tls_settings": map[string]any{
|
||||
"enabled": cfg.GRPC.TLS.Enabled,
|
||||
"certificate": cfg.GRPC.TLS.Cert,
|
||||
"key": cfg.GRPC.TLS.Key,
|
||||
},
|
||||
"services": map[string]interface{}{
|
||||
"authprovider": map[string]interface{}{
|
||||
"services": map[string]any{
|
||||
"authprovider": map[string]any{
|
||||
"auth_manager": "serviceaccounts",
|
||||
"auth_managers": map[string]interface{}{
|
||||
"serviceaccounts": map[string]interface{}{
|
||||
"service_accounts": []map[string]interface{}{
|
||||
"auth_managers": map[string]any{
|
||||
"serviceaccounts": map[string]any{
|
||||
"service_accounts": []map[string]any{
|
||||
{
|
||||
"id": cfg.ServiceAccount.ServiceAccountID,
|
||||
"secret": cfg.ServiceAccount.ServiceAccountSecret,
|
||||
@@ -36,8 +36,8 @@ func AuthMachineConfigFromStruct(cfg *config.Config) map[string]interface{} {
|
||||
},
|
||||
},
|
||||
},
|
||||
"interceptors": map[string]interface{}{
|
||||
"prometheus": map[string]interface{}{
|
||||
"interceptors": map[string]any{
|
||||
"prometheus": map[string]any{
|
||||
"namespace": "opencloud",
|
||||
"subsystem": "auth_service",
|
||||
},
|
||||
|
||||
@@ -118,7 +118,7 @@ func (cl *ClientlogService) processEvent(event events.Event) {
|
||||
var (
|
||||
users []string
|
||||
evType string
|
||||
data interface{}
|
||||
data any
|
||||
)
|
||||
|
||||
fileEv := func(typ string, ref *provider.Reference) {
|
||||
@@ -197,7 +197,7 @@ func (cl *ClientlogService) processEvent(event events.Event) {
|
||||
}
|
||||
}
|
||||
|
||||
func (cl *ClientlogService) sendSSE(userIDs []string, evType string, data interface{}) error {
|
||||
func (cl *ClientlogService) sendSSE(userIDs []string, evType string, data any) error {
|
||||
b, err := json.Marshal(data)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
type ConnectorResponse struct {
|
||||
Status int
|
||||
Headers map[string]string
|
||||
Body interface{}
|
||||
Body any
|
||||
}
|
||||
|
||||
// NewResponse creates a new ConnectorResponse with just the specified status.
|
||||
@@ -85,7 +85,7 @@ func NewResponseWithVersionAndLock(status int, mtime *types.Timestamp, lockID st
|
||||
// (success) status and the specified body. The headers will be nil.
|
||||
//
|
||||
// This is used for the `CheckFileInfo` method in order to return the fileinfo
|
||||
func NewResponseSuccessBody(body interface{}) *ConnectorResponse {
|
||||
func NewResponseSuccessBody(body any) *ConnectorResponse {
|
||||
return &ConnectorResponse{
|
||||
Status: 200,
|
||||
Body: body,
|
||||
@@ -101,7 +101,7 @@ func NewResponseSuccessBody(body interface{}) *ConnectorResponse {
|
||||
func NewResponseSuccessBodyName(name string) *ConnectorResponse {
|
||||
return &ConnectorResponse{
|
||||
Status: 200,
|
||||
Body: map[string]interface{}{
|
||||
Body: map[string]any{
|
||||
"Name": name,
|
||||
},
|
||||
}
|
||||
@@ -115,7 +115,7 @@ func NewResponseSuccessBodyName(name string) *ConnectorResponse {
|
||||
func NewResponseSuccessBodyNameUrl(name, url string, hostEditURL string, hostViewURL string) *ConnectorResponse {
|
||||
return &ConnectorResponse{
|
||||
Status: 200,
|
||||
Body: map[string]interface{}{
|
||||
Body: map[string]any{
|
||||
"Name": name,
|
||||
"Url": url,
|
||||
"HostEditUrl": hostEditURL,
|
||||
|
||||
@@ -874,7 +874,7 @@ func (f *FileConnector) PutRelativeFileRelative(ctx context.Context, ccs Content
|
||||
HeaderWopiLock: lockID,
|
||||
HeaderWopiLockFailureReason: "Lock Conflict",
|
||||
},
|
||||
Body: map[string]interface{}{
|
||||
Body: map[string]any{
|
||||
"Name": target,
|
||||
"Url": wopiSrcURL.String(),
|
||||
"HostViewUrl": createHostUrl("view", webURL, strings.ToLower(f.cfg.App.Name), newInfo),
|
||||
@@ -1260,7 +1260,7 @@ func (f *FileConnector) CheckFileInfo(ctx context.Context) (*ConnectorResponse,
|
||||
}
|
||||
}
|
||||
// fileinfo map
|
||||
infoMap := map[string]interface{}{
|
||||
infoMap := map[string]any{
|
||||
fileinfo.KeyOwnerID: hexEncodedOwnerId,
|
||||
fileinfo.KeySize: int64(statRes.GetInfo().GetSize()),
|
||||
fileinfo.KeyVersion: getVersion(statRes.GetInfo().GetMtime()),
|
||||
|
||||
@@ -955,7 +955,7 @@ var _ = Describe("FileConnector", func() {
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(response.Status).To(Equal(200))
|
||||
Expect(response.Headers).To(BeNil())
|
||||
rBody := response.Body.(map[string]interface{})
|
||||
rBody := response.Body.(map[string]any)
|
||||
Expect(rBody["Name"]).To(Equal("newDocument.docx"))
|
||||
Expect(rBody["Url"]).To(HavePrefix("https://wopi.opencloud.test/wopi/files/")) // skip checking the actual reference
|
||||
Expect(rBody["HostEditUrl"]).To(Equal("https://cloud.opencloud.test/external-test/personal/path/to/newDocument.docx?fileId=storageid%24spaceid%21opaqueid_newDoc&view_mode=write"))
|
||||
@@ -1010,7 +1010,7 @@ var _ = Describe("FileConnector", func() {
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(response.Status).To(Equal(200))
|
||||
Expect(response.Headers).To(BeNil())
|
||||
rBody := response.Body.(map[string]interface{})
|
||||
rBody := response.Body.(map[string]any)
|
||||
Expect(rBody["Name"]).To(Equal("file.pdf"))
|
||||
Expect(rBody["Url"]).To(HavePrefix("https://wopi.opencloud.test/wopi/files/")) // skip checking the actual reference
|
||||
Expect(rBody["HostEditUrl"]).To(Equal("https://cloud.opencloud.test/external-test/personal/path/to/file.pdf?fileId=storageid%24spaceid%21opaqueid_newDoc&view_mode=write"))
|
||||
@@ -1082,7 +1082,7 @@ var _ = Describe("FileConnector", func() {
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(response.Status).To(Equal(200))
|
||||
Expect(response.Headers).To(BeNil())
|
||||
rBody := response.Body.(map[string]interface{})
|
||||
rBody := response.Body.(map[string]any)
|
||||
Expect(rBody["Name"]).To(MatchRegexp(`[a-zA-Z0-9_-] file\.pdf`))
|
||||
Expect(rBody["Url"]).To(HavePrefix("https://wopi.opencloud.test/wopi/files/")) // skip checking the actual reference
|
||||
Expect(rBody["HostEditUrl"]).To(Equal("https://cloud.opencloud.test/external-test/personal/path/to/" + url.PathEscape(path.Base(*newFilePath)) + "?fileId=storageid%24spaceid%21opaqueid_newDoc&view_mode=write"))
|
||||
@@ -1206,7 +1206,7 @@ var _ = Describe("FileConnector", func() {
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(response.Status).To(Equal(200))
|
||||
Expect(response.Headers).To(BeNil())
|
||||
rBody := response.Body.(map[string]interface{})
|
||||
rBody := response.Body.(map[string]any)
|
||||
Expect(rBody["Name"]).To(Equal("newDocument.docx"))
|
||||
Expect(rBody["Url"]).To(HavePrefix("https://wopi.opencloud.test/wopi/files/")) // skip checking the actual reference
|
||||
Expect(rBody["HostEditUrl"]).To(Equal("https://cloud.opencloud.test/external-test/personal/path/to/newDocument.docx?fileId=storageid%24spaceid%21opaqueid_newDoc&view_mode=write"))
|
||||
@@ -1265,7 +1265,7 @@ var _ = Describe("FileConnector", func() {
|
||||
Expect(response.Status).To(Equal(409))
|
||||
Expect(response.Headers[connector.HeaderWopiLock]).To(Equal("zzz999"))
|
||||
Expect(response.Headers[connector.HeaderWopiValidRT]).To(MatchRegexp(`[a-zA-Z0-9_-] convFile\.pdf`))
|
||||
rBody := response.Body.(map[string]interface{})
|
||||
rBody := response.Body.(map[string]any)
|
||||
Expect(rBody["Name"]).To(Equal("convFile.pdf"))
|
||||
Expect(rBody["Url"]).To(HavePrefix("https://wopi.opencloud.test/wopi/files/")) // skip checking the actual reference
|
||||
Expect(rBody["HostEditUrl"]).To(Equal("https://cloud.opencloud.test/external-test/personal/path/to/convFile.pdf?fileId=storageid%24spaceid%21opaqueid_newDoc&view_mode=write"))
|
||||
@@ -1575,7 +1575,7 @@ var _ = Describe("FileConnector", func() {
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(response.Status).To(Equal(200))
|
||||
Expect(response.Headers).To(BeNil())
|
||||
rBody := response.Body.(map[string]interface{})
|
||||
rBody := response.Body.(map[string]any)
|
||||
Expect(rBody["Name"]).To(MatchRegexp(`^[a-zA-Z0-9_-]+ newFile$`))
|
||||
})
|
||||
|
||||
@@ -1607,7 +1607,7 @@ var _ = Describe("FileConnector", func() {
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(response.Status).To(Equal(200))
|
||||
Expect(response.Headers).To(BeNil())
|
||||
rBody := response.Body.(map[string]interface{})
|
||||
rBody := response.Body.(map[string]any)
|
||||
Expect(rBody["Name"]).To(Equal("newFile"))
|
||||
})
|
||||
})
|
||||
|
||||
@@ -96,7 +96,7 @@ type Collabora struct {
|
||||
}
|
||||
|
||||
// SetProperties will set the file properties for the Collabora implementation.
|
||||
func (cinfo *Collabora) SetProperties(props map[string]interface{}) {
|
||||
func (cinfo *Collabora) SetProperties(props map[string]any) {
|
||||
for key, value := range props {
|
||||
switch key {
|
||||
case KeyBaseFileName:
|
||||
|
||||
@@ -17,7 +17,7 @@ type FileInfo interface {
|
||||
// implementations with different properties. You can use the same map
|
||||
// for all the implementations knowing that the relevant properties for
|
||||
// each implementation will be set.
|
||||
SetProperties(props map[string]interface{})
|
||||
SetProperties(props map[string]any)
|
||||
|
||||
// GetTarget will return the target implementation (OnlyOffice, Collabora...).
|
||||
// This will help to identify the implementation we're using in an easy way.
|
||||
@@ -114,7 +114,7 @@ const (
|
||||
KeyDownloadAsPostMessage = "DownloadAsPostMessage"
|
||||
KeySaveAsPostmessage = "SaveAsPostmessage"
|
||||
KeyEnableOwnerTermination = "EnableOwnerTermination"
|
||||
KeyUserExtraInfo = "UserExtraInfo"
|
||||
KeyUserExtraInfo = "UserExtraInfo"
|
||||
//KeyUserPrivateInfo -> requires definition, currently not used
|
||||
KeyWatermarkText = "WatermarkText"
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ type Microsoft struct {
|
||||
}
|
||||
|
||||
// SetProperties will set the file properties for the Microsoft implementation.
|
||||
func (minfo *Microsoft) SetProperties(props map[string]interface{}) {
|
||||
func (minfo *Microsoft) SetProperties(props map[string]any) {
|
||||
for key, value := range props {
|
||||
switch key {
|
||||
case KeyBaseFileName:
|
||||
|
||||
@@ -130,7 +130,7 @@ type OnlyOffice struct {
|
||||
}
|
||||
|
||||
// SetProperties will set the file properties for the OnlyOffice implementation.
|
||||
func (oinfo *OnlyOffice) SetProperties(props map[string]interface{}) {
|
||||
func (oinfo *OnlyOffice) SetProperties(props map[string]any) {
|
||||
for key, value := range props {
|
||||
switch key {
|
||||
case KeyBaseFileName:
|
||||
|
||||
@@ -52,7 +52,7 @@ func (*NoopLockParser) ParseLock(id string) string {
|
||||
//
|
||||
// If the JSON string is not in the expected format, the original lockID will be returned.
|
||||
func (*LegacyLockParser) ParseLock(id string) string {
|
||||
var decodedValues map[string]interface{}
|
||||
var decodedValues map[string]any
|
||||
err := json.Unmarshal([]byte(id), &decodedValues)
|
||||
if err != nil || len(decodedValues) == 0 {
|
||||
return id
|
||||
|
||||
@@ -15,12 +15,12 @@ func TestLegacyLockParser(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
name: "JsonStringWithLKey",
|
||||
lock: createJsonString(map[string]interface{}{"L": "12345678", "F": 4, "E": 2, "C": "", "P": "3453345345346", "M": "12345678"}),
|
||||
lock: createJsonString(map[string]any{"L": "12345678", "F": 4, "E": 2, "C": "", "P": "3453345345346", "M": "12345678"}),
|
||||
cleanLock: "12345678",
|
||||
},
|
||||
{
|
||||
name: "JsonStringWithSKey",
|
||||
lock: createJsonString(map[string]interface{}{"S": "12345678", "F": 4, "E": 2, "C": "", "P": "3453345345346", "M": "12345678"}),
|
||||
lock: createJsonString(map[string]any{"S": "12345678", "F": 4, "E": 2, "C": "", "P": "3453345345346", "M": "12345678"}),
|
||||
cleanLock: "12345678",
|
||||
},
|
||||
{
|
||||
@@ -30,7 +30,7 @@ func TestLegacyLockParser(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "JsonStringUnknownFormat",
|
||||
lock: createJsonString(map[string]interface{}{"A": "12345678", "F": 4, "E": 2, "C": "", "P": "3453345345346", "X": "12345678"}),
|
||||
lock: createJsonString(map[string]any{"A": "12345678", "F": 4, "E": 2, "C": "", "P": "3453345345346", "X": "12345678"}),
|
||||
cleanLock: `{"A":"12345678","C":"","E":2,"F":4,"P":"3453345345346","X":"12345678"}`,
|
||||
},
|
||||
{
|
||||
@@ -78,7 +78,7 @@ func TestNoopLockParser(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func createJsonString(input map[string]interface{}) string {
|
||||
func createJsonString(input map[string]any) string {
|
||||
rawData, err := json.Marshal(&input)
|
||||
if err != nil {
|
||||
return ""
|
||||
|
||||
@@ -90,7 +90,7 @@ func WopiContextAuthMiddleware(cfg *config.Config, st microstore.Store, next htt
|
||||
}
|
||||
|
||||
claims := &Claims{}
|
||||
_, err := jwt.ParseWithClaims(accessToken, claims, func(token *jwt.Token) (interface{}, error) {
|
||||
_, err := jwt.ParseWithClaims(accessToken, claims, func(token *jwt.Token) (any, error) {
|
||||
|
||||
if _, ok := token.Method.(*jwt.SigningMethodHMAC); !ok {
|
||||
return nil, fmt.Errorf("unexpected signing method: %v", token.Header["alg"])
|
||||
@@ -111,7 +111,7 @@ func WopiContextAuthMiddleware(cfg *config.Config, st microstore.Store, next htt
|
||||
http.Error(w, http.StatusText(http.StatusUnauthorized), http.StatusUnauthorized)
|
||||
return
|
||||
}
|
||||
tokenManager, err := rjwt.New(map[string]interface{}{
|
||||
tokenManager, err := rjwt.New(map[string]any{
|
||||
"secret": cfg.TokenManager.JWTSecret,
|
||||
"expires": int64(24 * 60 * 60),
|
||||
})
|
||||
@@ -249,7 +249,7 @@ func parseWopiFileID(cfg *config.Config, path string) string {
|
||||
}
|
||||
// check if the fileid is a jwt
|
||||
if strings.Contains(s[3], ".") {
|
||||
token, err := jwt.Parse(s[3], func(_ *jwt.Token) (interface{}, error) {
|
||||
token, err := jwt.Parse(s[3], func(_ *jwt.Token) (any, error) {
|
||||
return []byte(cfg.Wopi.ProxySecret), nil
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
@@ -49,7 +49,7 @@ var _ = Describe("Wopi Context Middleware", func() {
|
||||
})
|
||||
mw = middleware.WopiContextAuthMiddleware(cfg, nil, next)
|
||||
|
||||
tknMngr, err = rjwt.New(map[string]interface{}{
|
||||
tknMngr, err = rjwt.New(map[string]any{
|
||||
"secret": cfg.TokenManager.JWTSecret,
|
||||
"expires": int64(24 * 60 * 60),
|
||||
})
|
||||
|
||||
@@ -63,7 +63,7 @@ func (eh *EventHistoryService) StoreEvents() {
|
||||
Key: event.ID,
|
||||
Value: ev,
|
||||
Expiry: eh.cfg.Store.TTL,
|
||||
Metadata: map[string]interface{}{
|
||||
Metadata: map[string]any{
|
||||
"type": event.Type,
|
||||
},
|
||||
}); err != nil {
|
||||
|
||||
@@ -121,7 +121,7 @@ func (tb testBus) Consume(_ string, _ ...microevents.ConsumeOption) (<-chan micr
|
||||
return ch, nil
|
||||
}
|
||||
|
||||
func (tb testBus) Publish(e interface{}) string {
|
||||
func (tb testBus) Publish(e any) string {
|
||||
ev := events.Event{
|
||||
ID: uuid.New().String(),
|
||||
Type: reflect.TypeOf(e).String(),
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
)
|
||||
|
||||
// FrontendConfigFromStruct will adapt an OpenCloud config struct into a reva mapstructure to start a reva service.
|
||||
func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string]interface{}, error) {
|
||||
func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string]any, error) {
|
||||
webURL, err := url.Parse(cfg.PublicURL)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -32,7 +32,7 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
|
||||
return nil, err
|
||||
}
|
||||
|
||||
archivers := []map[string]interface{}{
|
||||
archivers := []map[string]any{
|
||||
{
|
||||
"enabled": true,
|
||||
"version": "2.0.0",
|
||||
@@ -43,7 +43,7 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
|
||||
},
|
||||
}
|
||||
|
||||
appProviders := []map[string]interface{}{
|
||||
appProviders := []map[string]any{
|
||||
{
|
||||
"enabled": true,
|
||||
"version": "1.1.0",
|
||||
@@ -54,7 +54,7 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
|
||||
},
|
||||
}
|
||||
|
||||
filesCfg := map[string]interface{}{
|
||||
filesCfg := map[string]any{
|
||||
"private_links": true,
|
||||
"bigfilechunking": false,
|
||||
"blacklisted_files": []string{},
|
||||
@@ -68,7 +68,7 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
|
||||
}
|
||||
|
||||
if cfg.DefaultUploadProtocol == "tus" {
|
||||
filesCfg["tus_support"] = map[string]interface{}{
|
||||
filesCfg["tus_support"] = map[string]any{
|
||||
"version": "1.0.0",
|
||||
"resumable": "1.0.0",
|
||||
"extension": "creation,creation-with-upload",
|
||||
@@ -87,19 +87,19 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
|
||||
changePasswordDisabled = true
|
||||
}
|
||||
|
||||
return map[string]interface{}{
|
||||
"shared": map[string]interface{}{
|
||||
return map[string]any{
|
||||
"shared": map[string]any{
|
||||
"jwt_secret": cfg.TokenManager.JWTSecret,
|
||||
"gatewaysvc": cfg.Reva.Address, // Todo or address?
|
||||
"skip_user_groups_in_token": cfg.SkipUserGroupsInToken,
|
||||
"grpc_client_options": cfg.Reva.GetGRPCClientConfig(),
|
||||
"multi_tenant_enabled": cfg.Commons.MultiTenantEnabled,
|
||||
},
|
||||
"http": map[string]interface{}{
|
||||
"http": map[string]any{
|
||||
"network": cfg.HTTP.Protocol,
|
||||
"address": cfg.HTTP.Addr,
|
||||
"middlewares": map[string]interface{}{
|
||||
"cors": map[string]interface{}{
|
||||
"middlewares": map[string]any{
|
||||
"cors": map[string]any{
|
||||
"allowed_origins": cfg.HTTP.CORS.AllowedOrigins,
|
||||
"allowed_methods": cfg.HTTP.CORS.AllowedMethods,
|
||||
"allowed_headers": cfg.HTTP.CORS.AllowedHeaders,
|
||||
@@ -111,29 +111,29 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
|
||||
//"priority": ,
|
||||
//"exposed_headers": ,
|
||||
},
|
||||
"auth": map[string]interface{}{
|
||||
"auth": map[string]any{
|
||||
"credentials_by_user_agent": cfg.Middleware.Auth.CredentialsByUserAgent,
|
||||
},
|
||||
"prometheus": map[string]interface{}{
|
||||
"prometheus": map[string]any{
|
||||
"namespace": "opencloud",
|
||||
"subsystem": "frontend",
|
||||
},
|
||||
"requestid": map[string]interface{}{},
|
||||
"requestid": map[string]any{},
|
||||
},
|
||||
// TODO build services dynamically
|
||||
"services": map[string]interface{}{
|
||||
"services": map[string]any{
|
||||
// this reva service called "appprovider" comes from
|
||||
// `internal/http/services/appprovider` and is a translation
|
||||
// layer from the grpc app registry to http, used by e.g. OpenCloud Web
|
||||
// It should not be confused with `internal/grpc/services/appprovider`
|
||||
// which is currently only the driver for the CS3org WOPI server
|
||||
"appprovider": map[string]interface{}{
|
||||
"appprovider": map[string]any{
|
||||
"prefix": cfg.AppHandler.Prefix,
|
||||
"transfer_shared_secret": cfg.TransferSecret,
|
||||
"timeout": 86400,
|
||||
"insecure": cfg.AppHandler.Insecure,
|
||||
"webbaseuri": webOpenInAppURL,
|
||||
"web": map[string]interface{}{
|
||||
"web": map[string]any{
|
||||
"urlparamsmapping": map[string]string{
|
||||
// param -> value mapper
|
||||
// these mappers are static and are only subject to change when changed in oC Web
|
||||
@@ -146,24 +146,24 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
|
||||
},
|
||||
"secure_view_app_addr": cfg.AppHandler.SecureViewAppAddr,
|
||||
},
|
||||
"archiver": map[string]interface{}{
|
||||
"archiver": map[string]any{
|
||||
"prefix": cfg.Archiver.Prefix,
|
||||
"timeout": 86400,
|
||||
"insecure": cfg.Archiver.Insecure,
|
||||
"max_num_files": cfg.Archiver.MaxNumFiles,
|
||||
"max_size": cfg.Archiver.MaxSize,
|
||||
},
|
||||
"datagateway": map[string]interface{}{
|
||||
"datagateway": map[string]any{
|
||||
"prefix": cfg.DataGateway.Prefix,
|
||||
"transfer_shared_secret": cfg.TransferSecret,
|
||||
"timeout": 86400,
|
||||
"insecure": true,
|
||||
},
|
||||
"ocs": map[string]interface{}{
|
||||
"ocs": map[string]any{
|
||||
"storage_registry_svc": cfg.Reva.Address,
|
||||
"share_prefix": cfg.OCS.SharePrefix,
|
||||
"home_namespace": cfg.OCS.HomeNamespace,
|
||||
"stat_cache_config": map[string]interface{}{
|
||||
"stat_cache_config": map[string]any{
|
||||
"cache_store": cfg.OCS.StatCacheType,
|
||||
"cache_nodes": cfg.OCS.StatCacheNodes,
|
||||
"cache_database": cfg.OCS.StatCacheDatabase,
|
||||
@@ -179,8 +179,8 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
|
||||
"enable_denials": cfg.OCS.EnableDenials,
|
||||
"list_ocm_shares": cfg.OCS.ListOCMShares,
|
||||
"cache_warmup_driver": cfg.OCS.CacheWarmupDriver,
|
||||
"cache_warmup_drivers": map[string]interface{}{
|
||||
"cbox": map[string]interface{}{
|
||||
"cache_warmup_drivers": map[string]any{
|
||||
"cbox": map[string]any{
|
||||
"db_username": cfg.OCS.CacheWarmupDrivers.CBOX.DBUsername,
|
||||
"db_password": cfg.OCS.CacheWarmupDrivers.CBOX.DBPassword,
|
||||
"db_host": cfg.OCS.CacheWarmupDrivers.CBOX.DBHost,
|
||||
@@ -190,7 +190,7 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
|
||||
"gatewaysvc": cfg.Reva.Address,
|
||||
},
|
||||
},
|
||||
"config": map[string]interface{}{
|
||||
"config": map[string]any{
|
||||
"version": "1.7",
|
||||
"website": "OpenCloud",
|
||||
"host": cfg.PublicURL,
|
||||
@@ -198,12 +198,12 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
|
||||
"ssl": "false",
|
||||
},
|
||||
"default_upload_protocol": cfg.DefaultUploadProtocol,
|
||||
"capabilities": map[string]interface{}{
|
||||
"capabilities": map[string]interface{}{
|
||||
"core": map[string]interface{}{
|
||||
"capabilities": map[string]any{
|
||||
"capabilities": map[string]any{
|
||||
"core": map[string]any{
|
||||
"poll_interval": 60,
|
||||
"webdav_root": "remote.php/webdav",
|
||||
"status": map[string]interface{}{
|
||||
"status": map[string]any{
|
||||
"installed": true,
|
||||
"maintenance": false,
|
||||
"needsDbUpgrade": false,
|
||||
@@ -220,9 +220,9 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
|
||||
"support_sse": !cfg.DisableSSE,
|
||||
"support_radicale": !cfg.DisableRadicale,
|
||||
},
|
||||
"graph": map[string]interface{}{
|
||||
"graph": map[string]any{
|
||||
"personal_data_export": true,
|
||||
"users": map[string]interface{}{
|
||||
"users": map[string]any{
|
||||
"read_only_attributes": readOnlyUserAttributes,
|
||||
"create_disabled": !cfg.LDAPServerWriteEnabled,
|
||||
"delete_disabled": !cfg.LDAPServerWriteEnabled,
|
||||
@@ -230,15 +230,15 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
|
||||
"edit_login_allowed_disabled": cfg.EditLoginAllowedDisabled,
|
||||
},
|
||||
},
|
||||
"checksums": map[string]interface{}{
|
||||
"checksums": map[string]any{
|
||||
"supported_types": cfg.Checksums.SupportedTypes,
|
||||
"preferred_upload_type": cfg.Checksums.PreferredUploadType,
|
||||
},
|
||||
"files": filesCfg,
|
||||
"dav": map[string]interface{}{
|
||||
"dav": map[string]any{
|
||||
"reports": []string{"search-files"},
|
||||
},
|
||||
"files_sharing": map[string]interface{}{
|
||||
"files_sharing": map[string]any{
|
||||
"api_enabled": true,
|
||||
"group_sharing": true,
|
||||
"sharing_roles": true,
|
||||
@@ -248,7 +248,7 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
|
||||
"share_with_membership_groups_only": true,
|
||||
"default_permissions": 22,
|
||||
"search_min_length": cfg.SearchMinLength,
|
||||
"public": map[string]interface{}{
|
||||
"public": map[string]any{
|
||||
"alias": true,
|
||||
"enabled": true,
|
||||
"send_mail": true,
|
||||
@@ -258,43 +258,43 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
|
||||
"multiple": true,
|
||||
"supports_upload_only": true,
|
||||
"default_permissions": cfg.DefaultLinkPermissions,
|
||||
"password": map[string]interface{}{
|
||||
"password": map[string]any{
|
||||
"enforced": false,
|
||||
"enforced_for": map[string]interface{}{
|
||||
"enforced_for": map[string]any{
|
||||
"read_only": cfg.OCS.PublicShareMustHavePassword,
|
||||
"read_write": cfg.OCS.WriteablePublicShareMustHavePassword,
|
||||
"read_write_delete": cfg.OCS.WriteablePublicShareMustHavePassword,
|
||||
"upload_only": cfg.OCS.WriteablePublicShareMustHavePassword,
|
||||
},
|
||||
},
|
||||
"expire_date": map[string]interface{}{
|
||||
"expire_date": map[string]any{
|
||||
"enabled": false,
|
||||
},
|
||||
"can_edit": true,
|
||||
},
|
||||
"user": map[string]interface{}{
|
||||
"user": map[string]any{
|
||||
"send_mail": true,
|
||||
"profile_picture": false,
|
||||
"settings": []map[string]interface{}{
|
||||
"settings": []map[string]any{
|
||||
{
|
||||
"enabled": true,
|
||||
"version": "1.0.0",
|
||||
},
|
||||
},
|
||||
"expire_date": map[string]interface{}{
|
||||
"expire_date": map[string]any{
|
||||
"enabled": true,
|
||||
},
|
||||
},
|
||||
"user_enumeration": map[string]interface{}{
|
||||
"user_enumeration": map[string]any{
|
||||
"enabled": true,
|
||||
"group_members_only": true,
|
||||
},
|
||||
"federation": map[string]interface{}{
|
||||
"federation": map[string]any{
|
||||
"outgoing": cfg.EnableFederatedSharingOutgoing,
|
||||
"incoming": cfg.EnableFederatedSharingIncoming,
|
||||
},
|
||||
},
|
||||
"spaces": map[string]interface{}{
|
||||
"spaces": map[string]any{
|
||||
"version": "1.0.0",
|
||||
"enabled": true,
|
||||
"projects": true,
|
||||
@@ -302,49 +302,49 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
|
||||
"max_quota": cfg.MaxQuota,
|
||||
},
|
||||
"theme": capabilities.Default().Theme,
|
||||
"search": map[string]interface{}{
|
||||
"property": map[string]interface{}{
|
||||
"name": map[string]interface{}{
|
||||
"search": map[string]any{
|
||||
"property": map[string]any{
|
||||
"name": map[string]any{
|
||||
"enabled": true,
|
||||
},
|
||||
"mtime": map[string]interface{}{
|
||||
"mtime": map[string]any{
|
||||
"keywords": []string{"today", "last 7 days", "last 30 days", "this year", "last year"},
|
||||
"enabled": true,
|
||||
},
|
||||
"size": map[string]interface{}{
|
||||
"size": map[string]any{
|
||||
"enabled": false,
|
||||
},
|
||||
"mediatype": map[string]interface{}{
|
||||
"mediatype": map[string]any{
|
||||
"keywords": []string{"document", "spreadsheet", "presentation", "pdf", "image", "video", "audio", "folder", "archive"},
|
||||
"enabled": true,
|
||||
},
|
||||
"type": map[string]interface{}{
|
||||
"type": map[string]any{
|
||||
"enabled": true,
|
||||
},
|
||||
"tag": map[string]interface{}{
|
||||
"tag": map[string]any{
|
||||
"enabled": true,
|
||||
},
|
||||
"tags": map[string]interface{}{
|
||||
"tags": map[string]any{
|
||||
"enabled": true,
|
||||
},
|
||||
"content": map[string]interface{}{
|
||||
"content": map[string]any{
|
||||
"enabled": true,
|
||||
},
|
||||
"scope": map[string]interface{}{
|
||||
"scope": map[string]any{
|
||||
"enabled": true,
|
||||
},
|
||||
},
|
||||
},
|
||||
"password_policy": passwordPolicyCfg,
|
||||
"notifications": map[string]interface{}{
|
||||
"notifications": map[string]any{
|
||||
"endpoints": []string{"list", "get", "delete"},
|
||||
"configurable": cfg.ConfigurableNotifications,
|
||||
},
|
||||
"groupware": map[string]interface{}{
|
||||
"groupware": map[string]any{
|
||||
"enabled": cfg.Groupware.Enabled,
|
||||
},
|
||||
},
|
||||
"version": map[string]interface{}{
|
||||
"version": map[string]any{
|
||||
"product": "OpenCloud",
|
||||
"edition": version.Edition,
|
||||
"major": version.ParsedLegacy().Major(),
|
||||
@@ -357,7 +357,7 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
|
||||
"include_ocm_sharees": cfg.OCS.IncludeOCMSharees,
|
||||
"show_email_in_results": cfg.OCS.ShowUserEmailInResults,
|
||||
},
|
||||
"ocdav": map[string]interface{}{
|
||||
"ocdav": map[string]any{
|
||||
"prefix": cfg.OCDav.Prefix,
|
||||
"files_namespace": cfg.OCDav.FilesNamespace,
|
||||
"webdav_namespace": cfg.OCDav.WebdavNamespace,
|
||||
@@ -378,7 +378,7 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
|
||||
"product_name": "OpenCloud",
|
||||
"product_version": version.GetString(),
|
||||
"allow_depth_infinity": cfg.OCDav.AllowPropfindDepthInfinity,
|
||||
"validation": map[string]interface{}{
|
||||
"validation": map[string]any{
|
||||
"invalid_chars": cfg.OCDav.NameValidation.InvalidChars,
|
||||
"max_length": cfg.OCDav.NameValidation.MaxLength,
|
||||
},
|
||||
@@ -418,10 +418,10 @@ func fileExists(path string) bool {
|
||||
return !info.IsDir()
|
||||
}
|
||||
|
||||
func passwordPolicyConfig(cfg *config.Config) (map[string]interface{}, error) {
|
||||
func passwordPolicyConfig(cfg *config.Config) (map[string]any, error) {
|
||||
_maxCharacters := 72
|
||||
if cfg.PasswordPolicy.Disabled {
|
||||
return map[string]interface{}{
|
||||
return map[string]any{
|
||||
"max_characters": _maxCharacters,
|
||||
"banned_passwords_list": nil,
|
||||
}, nil
|
||||
@@ -434,7 +434,7 @@ func passwordPolicyConfig(cfg *config.Config) (map[string]interface{}, error) {
|
||||
return nil, fmt.Errorf("failed to load the banned passwords from a file %s: %w", cfg.PasswordPolicy.BannedPasswordsList, err)
|
||||
}
|
||||
}
|
||||
return map[string]interface{}{
|
||||
return map[string]any{
|
||||
"max_characters": _maxCharacters,
|
||||
"min_digits": cfg.PasswordPolicy.MinDigits,
|
||||
"min_characters": cfg.PasswordPolicy.MinCharacters,
|
||||
|
||||
@@ -12,28 +12,28 @@ import (
|
||||
)
|
||||
|
||||
// GatewayConfigFromStruct will adapt an OpenCloud config struct into a reva mapstructure to start a reva service.
|
||||
func GatewayConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]interface{} {
|
||||
func GatewayConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]any {
|
||||
localEndpoint := pkgconfig.LocalEndpoint(cfg.GRPC.Protocol, cfg.GRPC.Addr)
|
||||
|
||||
rcfg := map[string]interface{}{
|
||||
"shared": map[string]interface{}{
|
||||
rcfg := map[string]any{
|
||||
"shared": map[string]any{
|
||||
"jwt_secret": cfg.TokenManager.JWTSecret,
|
||||
"gatewaysvc": cfg.Reva.Address,
|
||||
"skip_user_groups_in_token": cfg.SkipUserGroupsInToken,
|
||||
"grpc_client_options": cfg.Reva.GetGRPCClientConfig(),
|
||||
"multi_tenant_enabled": cfg.Commons.MultiTenantEnabled,
|
||||
},
|
||||
"grpc": map[string]interface{}{
|
||||
"grpc": map[string]any{
|
||||
"network": cfg.GRPC.Protocol,
|
||||
"address": cfg.GRPC.Addr,
|
||||
"tls_settings": map[string]interface{}{
|
||||
"tls_settings": map[string]any{
|
||||
"enabled": cfg.GRPC.TLS.Enabled,
|
||||
"certificate": cfg.GRPC.TLS.Cert,
|
||||
"key": cfg.GRPC.TLS.Key,
|
||||
},
|
||||
// TODO build services dynamically
|
||||
"services": map[string]interface{}{
|
||||
"gateway": map[string]interface{}{
|
||||
"services": map[string]any{
|
||||
"gateway": map[string]any{
|
||||
"applicationauthsvc": cfg.AuthAppEndpoint,
|
||||
// registries are located on the gateway
|
||||
"authregistrysvc": localEndpoint,
|
||||
@@ -60,7 +60,7 @@ func GatewayConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]i
|
||||
"transfer_shared_secret": cfg.TransferSecret,
|
||||
"transfer_expires": cfg.TransferExpires,
|
||||
// cache and TTLs
|
||||
"provider_cache_config": map[string]interface{}{
|
||||
"provider_cache_config": map[string]any{
|
||||
"cache_store": cfg.Cache.ProviderCacheStore,
|
||||
"cache_nodes": cfg.Cache.ProviderCacheNodes,
|
||||
"cache_database": cfg.Cache.ProviderCacheDatabase,
|
||||
@@ -70,7 +70,7 @@ func GatewayConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]i
|
||||
"cache_auth_username": cfg.Cache.ProviderCacheAuthUsername,
|
||||
"cache_auth_password": cfg.Cache.ProviderCacheAuthPassword,
|
||||
},
|
||||
"create_personal_space_cache_config": map[string]interface{}{
|
||||
"create_personal_space_cache_config": map[string]any{
|
||||
"cache_store": cfg.Cache.CreateHomeCacheStore,
|
||||
"cache_nodes": cfg.Cache.CreateHomeCacheNodes,
|
||||
"cache_database": cfg.Cache.CreateHomeCacheDatabase,
|
||||
@@ -81,11 +81,11 @@ func GatewayConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]i
|
||||
"cache_auth_password": cfg.Cache.CreateHomeCacheAuthPassword,
|
||||
},
|
||||
},
|
||||
"authregistry": map[string]interface{}{
|
||||
"authregistry": map[string]any{
|
||||
"driver": "static",
|
||||
"drivers": map[string]interface{}{
|
||||
"static": map[string]interface{}{
|
||||
"rules": map[string]interface{}{
|
||||
"drivers": map[string]any{
|
||||
"static": map[string]any{
|
||||
"rules": map[string]any{
|
||||
"appauth": cfg.AuthAppEndpoint,
|
||||
"basic": cfg.AuthBasicEndpoint,
|
||||
"machine": cfg.AuthMachineEndpoint,
|
||||
@@ -96,17 +96,17 @@ func GatewayConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]i
|
||||
},
|
||||
},
|
||||
},
|
||||
"storageregistry": map[string]interface{}{
|
||||
"storageregistry": map[string]any{
|
||||
"driver": cfg.StorageRegistry.Driver,
|
||||
"drivers": map[string]interface{}{
|
||||
"spaces": map[string]interface{}{
|
||||
"drivers": map[string]any{
|
||||
"spaces": map[string]any{
|
||||
"providers": spacesProviders(cfg, logger),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"interceptors": map[string]interface{}{
|
||||
"prometheus": map[string]interface{}{
|
||||
"interceptors": map[string]any{
|
||||
"prometheus": map[string]any{
|
||||
"namespace": "opencloud",
|
||||
"subsystem": "gateway",
|
||||
},
|
||||
@@ -116,14 +116,14 @@ func GatewayConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]i
|
||||
return rcfg
|
||||
}
|
||||
|
||||
func spacesProviders(cfg *config.Config, logger log.Logger) map[string]map[string]interface{} {
|
||||
func spacesProviders(cfg *config.Config, logger log.Logger) map[string]map[string]any {
|
||||
|
||||
// if a list of rules is given it overrides the generated rules from below
|
||||
if len(cfg.StorageRegistry.Rules) > 0 {
|
||||
rules := map[string]map[string]interface{}{}
|
||||
rules := map[string]map[string]any{}
|
||||
for i := range cfg.StorageRegistry.Rules {
|
||||
parts := strings.SplitN(cfg.StorageRegistry.Rules[i], "=", 2)
|
||||
rules[parts[0]] = map[string]interface{}{"address": parts[1]}
|
||||
rules[parts[0]] = map[string]any{"address": parts[1]}
|
||||
}
|
||||
return rules
|
||||
}
|
||||
@@ -135,7 +135,7 @@ func spacesProviders(cfg *config.Config, logger log.Logger) map[string]map[strin
|
||||
logger.Error().Err(err).Msg("Failed to read storage registry rules from JSON file: " + cfg.StorageRegistry.JSON)
|
||||
return nil
|
||||
}
|
||||
var rules map[string]map[string]interface{}
|
||||
var rules map[string]map[string]any
|
||||
if err = json.Unmarshal(data, &rules); err != nil {
|
||||
logger.Error().Err(err).Msg("Failed to unmarshal storage registry rules")
|
||||
return nil
|
||||
@@ -143,15 +143,15 @@ func spacesProviders(cfg *config.Config, logger log.Logger) map[string]map[strin
|
||||
return rules
|
||||
}
|
||||
// generate rules based on default config
|
||||
return map[string]map[string]interface{}{
|
||||
return map[string]map[string]any{
|
||||
cfg.StorageUsersEndpoint: {
|
||||
"providerid": cfg.StorageRegistry.StorageUsersMountID,
|
||||
"spaces": map[string]interface{}{
|
||||
"personal": map[string]interface{}{
|
||||
"spaces": map[string]any{
|
||||
"personal": map[string]any{
|
||||
"mount_point": "/users",
|
||||
"path_template": "/users/{{.Space.Owner.Id.OpaqueId}}",
|
||||
},
|
||||
"project": map[string]interface{}{
|
||||
"project": map[string]any{
|
||||
"mount_point": "/projects",
|
||||
"path_template": "/projects/{{.Space.Name}}",
|
||||
},
|
||||
@@ -159,16 +159,16 @@ func spacesProviders(cfg *config.Config, logger log.Logger) map[string]map[strin
|
||||
},
|
||||
cfg.StorageSharesEndpoint: {
|
||||
"providerid": utils.ShareStorageProviderID,
|
||||
"spaces": map[string]interface{}{
|
||||
"virtual": map[string]interface{}{
|
||||
"spaces": map[string]any{
|
||||
"virtual": map[string]any{
|
||||
// The root of the share jail is mounted here
|
||||
"mount_point": "/users/{{.CurrentUser.Id.OpaqueId}}/Shares",
|
||||
},
|
||||
"grant": map[string]interface{}{
|
||||
"grant": map[string]any{
|
||||
// Grants are relative to a space root that the gateway will determine with a stat
|
||||
"mount_point": ".",
|
||||
},
|
||||
"mountpoint": map[string]interface{}{
|
||||
"mountpoint": map[string]any{
|
||||
// The jail needs to be filled with mount points
|
||||
// .Space.Name is a path relative to the mount point
|
||||
"mount_point": "/users/{{.CurrentUser.Id.OpaqueId}}/Shares",
|
||||
@@ -179,11 +179,11 @@ func spacesProviders(cfg *config.Config, logger log.Logger) map[string]map[strin
|
||||
// public link storage returns the mount id of the actual storage
|
||||
cfg.StoragePublicLinkEndpoint: {
|
||||
"providerid": utils.PublicStorageProviderID,
|
||||
"spaces": map[string]interface{}{
|
||||
"grant": map[string]interface{}{
|
||||
"spaces": map[string]any{
|
||||
"grant": map[string]any{
|
||||
"mount_point": ".",
|
||||
},
|
||||
"mountpoint": map[string]interface{}{
|
||||
"mountpoint": map[string]any{
|
||||
"mount_point": "/public",
|
||||
"path_template": "/public/{{.Space.Root.OpaqueId}}",
|
||||
},
|
||||
@@ -191,11 +191,11 @@ func spacesProviders(cfg *config.Config, logger log.Logger) map[string]map[strin
|
||||
},
|
||||
cfg.OCMEndpoint: {
|
||||
"providerid": utils.OCMStorageProviderID,
|
||||
"spaces": map[string]interface{}{
|
||||
"grant": map[string]interface{}{
|
||||
"spaces": map[string]any{
|
||||
"grant": map[string]any{
|
||||
"mount_point": ".",
|
||||
},
|
||||
"mountpoint": map[string]interface{}{
|
||||
"mountpoint": map[string]any{
|
||||
"mount_point": "/ocm",
|
||||
"path_template": "/ocm/{{.Space.Root.OpaqueId}}",
|
||||
},
|
||||
|
||||
@@ -114,7 +114,7 @@ func (e ErrorCode) Render(w http.ResponseWriter, r *http.Request, status int, ms
|
||||
|
||||
// CreateOdataError creates and populates a Graph ErrorCode object
|
||||
func (e ErrorCode) CreateOdataError(ctx context.Context, msg string) *libregraph.OdataError {
|
||||
innererror := map[string]interface{}{
|
||||
innererror := map[string]any{
|
||||
"date": time.Now().UTC().Format(time.RFC3339),
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/go-ldap/ldap/v3"
|
||||
"github.com/opencloud-eu/opencloud/services/graph/pkg/identity/mocks"
|
||||
libregraph "github.com/opencloud-eu/libre-graph-api-go"
|
||||
"github.com/opencloud-eu/opencloud/services/graph/pkg/identity/mocks"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
)
|
||||
@@ -333,7 +333,7 @@ func TestLDAP_UpdateEducationClass(t *testing.T) {
|
||||
modifyDNData modifyDNData
|
||||
modifyData modifyData
|
||||
searchData searchData
|
||||
assertion func(assert.TestingT, error, ...interface{}) bool
|
||||
assertion func(assert.TestingT, error, ...any) bool
|
||||
}{
|
||||
{
|
||||
name: "Change name",
|
||||
@@ -343,7 +343,7 @@ func TestLDAP_UpdateEducationClass(t *testing.T) {
|
||||
DisplayName: "Math-2",
|
||||
},
|
||||
},
|
||||
assertion: func(tt assert.TestingT, err error, i ...interface{}) bool { return assert.Nil(tt, err) },
|
||||
assertion: func(tt assert.TestingT, err error, i ...any) bool { return assert.Nil(tt, err) },
|
||||
modifyData: modifyData{
|
||||
arg: &ldap.ModifyRequest{
|
||||
DN: "openCloudEducationExternalId=Math0123",
|
||||
@@ -377,7 +377,7 @@ func TestLDAP_UpdateEducationClass(t *testing.T) {
|
||||
ExternalId: &externalIDs[0],
|
||||
},
|
||||
},
|
||||
assertion: func(tt assert.TestingT, err error, i ...interface{}) bool { return assert.Nil(tt, err) },
|
||||
assertion: func(tt assert.TestingT, err error, i ...any) bool { return assert.Nil(tt, err) },
|
||||
modifyData: modifyData{
|
||||
arg: &ldap.ModifyRequest{},
|
||||
},
|
||||
@@ -406,7 +406,7 @@ func TestLDAP_UpdateEducationClass(t *testing.T) {
|
||||
ExternalId: &externalIDs[0],
|
||||
},
|
||||
},
|
||||
assertion: func(tt assert.TestingT, err error, i ...interface{}) bool { return assert.Nil(tt, err) },
|
||||
assertion: func(tt assert.TestingT, err error, i ...any) bool { return assert.Nil(tt, err) },
|
||||
modifyData: modifyData{
|
||||
arg: &ldap.ModifyRequest{
|
||||
DN: "openCloudEducationExternalId=Math3210,ou=groups,dc=test",
|
||||
@@ -445,7 +445,7 @@ func TestLDAP_UpdateEducationClass(t *testing.T) {
|
||||
Id: &changeString,
|
||||
},
|
||||
},
|
||||
assertion: func(tt assert.TestingT, err error, i ...interface{}) bool { return assert.Error(tt, err) },
|
||||
assertion: func(tt assert.TestingT, err error, i ...any) bool { return assert.Error(tt, err) },
|
||||
modifyData: modifyData{
|
||||
arg: &ldap.ModifyRequest{},
|
||||
},
|
||||
@@ -468,7 +468,7 @@ func TestLDAP_UpdateEducationClass(t *testing.T) {
|
||||
Description: &changeString,
|
||||
},
|
||||
},
|
||||
assertion: func(tt assert.TestingT, err error, i ...interface{}) bool { return assert.Error(tt, err) },
|
||||
assertion: func(tt assert.TestingT, err error, i ...any) bool { return assert.Error(tt, err) },
|
||||
modifyData: modifyData{
|
||||
arg: &ldap.ModifyRequest{},
|
||||
},
|
||||
@@ -491,7 +491,7 @@ func TestLDAP_UpdateEducationClass(t *testing.T) {
|
||||
Classification: changeString,
|
||||
},
|
||||
},
|
||||
assertion: func(tt assert.TestingT, err error, i ...interface{}) bool { return assert.Error(tt, err) },
|
||||
assertion: func(tt assert.TestingT, err error, i ...any) bool { return assert.Error(tt, err) },
|
||||
modifyData: modifyData{
|
||||
arg: &ldap.ModifyRequest{},
|
||||
},
|
||||
@@ -514,7 +514,7 @@ func TestLDAP_UpdateEducationClass(t *testing.T) {
|
||||
Members: []libregraph.User{*libregraph.NewUser("display name", "username")},
|
||||
},
|
||||
},
|
||||
assertion: func(tt assert.TestingT, err error, i ...interface{}) bool { return assert.Error(tt, err) },
|
||||
assertion: func(tt assert.TestingT, err error, i ...any) bool { return assert.Error(tt, err) },
|
||||
modifyData: modifyData{
|
||||
arg: &ldap.ModifyRequest{},
|
||||
},
|
||||
|
||||
@@ -327,8 +327,8 @@ func TestUpdateGroupName(t *testing.T) {
|
||||
|
||||
type mockInputs struct {
|
||||
funcName string
|
||||
args []interface{}
|
||||
returns []interface{}
|
||||
args []any
|
||||
returns []any
|
||||
}
|
||||
|
||||
tests := []struct {
|
||||
@@ -343,13 +343,13 @@ func TestUpdateGroupName(t *testing.T) {
|
||||
groupId: "some-uuid-string",
|
||||
newName: "TheGroup",
|
||||
},
|
||||
assertion: func(t assert.TestingT, err error, args ...interface{}) bool {
|
||||
assertion: func(t assert.TestingT, err error, args ...any) bool {
|
||||
return assert.Nil(t, err, args...)
|
||||
},
|
||||
ldapMocks: []mockInputs{
|
||||
{
|
||||
funcName: "Search",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
ldap.NewSearchRequest(
|
||||
"ou=groups,dc=test",
|
||||
ldap.ScopeWholeSubtree,
|
||||
@@ -359,7 +359,7 @@ func TestUpdateGroupName(t *testing.T) {
|
||||
nil,
|
||||
),
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
&ldap.SearchResult{
|
||||
Entries: []*ldap.Entry{
|
||||
{
|
||||
@@ -384,13 +384,13 @@ func TestUpdateGroupName(t *testing.T) {
|
||||
groupId: "some-uuid-string",
|
||||
newName: "TheGroupWithShinyNewName",
|
||||
},
|
||||
assertion: func(t assert.TestingT, err error, args ...interface{}) bool {
|
||||
assertion: func(t assert.TestingT, err error, args ...any) bool {
|
||||
return assert.Nil(t, err, args...)
|
||||
},
|
||||
ldapMocks: []mockInputs{
|
||||
{
|
||||
funcName: "Search",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
ldap.NewSearchRequest(
|
||||
"ou=groups,dc=test",
|
||||
ldap.ScopeWholeSubtree,
|
||||
@@ -400,7 +400,7 @@ func TestUpdateGroupName(t *testing.T) {
|
||||
nil,
|
||||
),
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
&ldap.SearchResult{
|
||||
Entries: []*ldap.Entry{
|
||||
{
|
||||
@@ -419,7 +419,7 @@ func TestUpdateGroupName(t *testing.T) {
|
||||
},
|
||||
{
|
||||
funcName: "ModifyDN",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
&ldap.ModifyDNRequest{
|
||||
DN: groupDn,
|
||||
NewRDN: "cn=TheGroupWithShinyNewName",
|
||||
@@ -428,7 +428,7 @@ func TestUpdateGroupName(t *testing.T) {
|
||||
Controls: []ldap.Control(nil),
|
||||
},
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
nil,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -405,8 +405,8 @@ func TestUpdateUser(t *testing.T) {
|
||||
}
|
||||
type mockInputs struct {
|
||||
funcName string
|
||||
args []interface{}
|
||||
returns []interface{}
|
||||
args []any
|
||||
returns []any
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -424,13 +424,13 @@ func TestUpdateUser(t *testing.T) {
|
||||
},
|
||||
},
|
||||
want: nil,
|
||||
assertion: func(t assert.TestingT, err error, args ...interface{}) bool {
|
||||
assertion: func(t assert.TestingT, err error, args ...any) bool {
|
||||
return assert.NotNil(t, err, args...)
|
||||
},
|
||||
ldapMocks: []mockInputs{
|
||||
{
|
||||
funcName: "Search",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
ldap.NewSearchRequest(
|
||||
"ou=people,dc=test",
|
||||
ldap.ScopeWholeSubtree,
|
||||
@@ -440,7 +440,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
nil,
|
||||
),
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
&ldap.SearchResult{
|
||||
Entries: []*ldap.Entry{
|
||||
{
|
||||
@@ -469,13 +469,13 @@ func TestUpdateUser(t *testing.T) {
|
||||
accountEnabled: nil,
|
||||
userType: &memberType,
|
||||
},
|
||||
assertion: func(t assert.TestingT, err error, args ...interface{}) bool {
|
||||
assertion: func(t assert.TestingT, err error, args ...any) bool {
|
||||
return assert.Nil(t, err, args...)
|
||||
},
|
||||
ldapMocks: []mockInputs{
|
||||
{
|
||||
funcName: "Search",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
ldap.NewSearchRequest(
|
||||
"ou=people,dc=test",
|
||||
ldap.ScopeWholeSubtree,
|
||||
@@ -485,7 +485,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
nil,
|
||||
),
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
&ldap.SearchResult{
|
||||
Entries: []*ldap.Entry{
|
||||
{
|
||||
@@ -516,7 +516,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
},
|
||||
{
|
||||
funcName: "Search",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
&ldap.SearchRequest{
|
||||
BaseDN: "uid=oldName",
|
||||
Scope: 0,
|
||||
@@ -529,7 +529,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
Controls: []ldap.Control(nil),
|
||||
},
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
&ldap.SearchResult{
|
||||
Entries: []*ldap.Entry{
|
||||
{
|
||||
@@ -564,7 +564,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
},
|
||||
{
|
||||
funcName: "Modify",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
&ldap.ModifyRequest{
|
||||
DN: "uid=oldName",
|
||||
Changes: []ldap.Change{
|
||||
@@ -579,7 +579,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
Controls: []ldap.Control(nil),
|
||||
},
|
||||
},
|
||||
returns: []interface{}{nil},
|
||||
returns: []any{nil},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -599,13 +599,13 @@ func TestUpdateUser(t *testing.T) {
|
||||
accountEnabled: nil,
|
||||
userType: &memberType,
|
||||
},
|
||||
assertion: func(t assert.TestingT, err error, args ...interface{}) bool {
|
||||
assertion: func(t assert.TestingT, err error, args ...any) bool {
|
||||
return assert.Nil(t, err, args...)
|
||||
},
|
||||
ldapMocks: []mockInputs{
|
||||
{
|
||||
funcName: "Search",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
ldap.NewSearchRequest(
|
||||
"ou=people,dc=test",
|
||||
ldap.ScopeWholeSubtree,
|
||||
@@ -615,7 +615,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
nil,
|
||||
),
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
&ldap.SearchResult{
|
||||
Entries: []*ldap.Entry{
|
||||
{
|
||||
@@ -646,7 +646,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
},
|
||||
{
|
||||
funcName: "Search",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
&ldap.SearchRequest{
|
||||
BaseDN: "uid=oldName",
|
||||
Scope: 0,
|
||||
@@ -659,7 +659,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
Controls: []ldap.Control(nil),
|
||||
},
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
&ldap.SearchResult{
|
||||
Entries: []*ldap.Entry{
|
||||
{
|
||||
@@ -694,7 +694,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
},
|
||||
{
|
||||
funcName: "Modify",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
&ldap.ModifyRequest{
|
||||
DN: "uid=oldName",
|
||||
Changes: []ldap.Change{
|
||||
@@ -709,7 +709,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
Controls: []ldap.Control(nil),
|
||||
},
|
||||
},
|
||||
returns: []interface{}{nil},
|
||||
returns: []any{nil},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -729,13 +729,13 @@ func TestUpdateUser(t *testing.T) {
|
||||
accountEnabled: nil,
|
||||
userType: &memberType,
|
||||
},
|
||||
assertion: func(t assert.TestingT, err error, args ...interface{}) bool {
|
||||
assertion: func(t assert.TestingT, err error, args ...any) bool {
|
||||
return assert.Nil(t, err, args...)
|
||||
},
|
||||
ldapMocks: []mockInputs{
|
||||
{
|
||||
funcName: "Search",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
ldap.NewSearchRequest(
|
||||
"ou=people,dc=test",
|
||||
ldap.ScopeWholeSubtree,
|
||||
@@ -745,7 +745,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
nil,
|
||||
),
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
&ldap.SearchResult{
|
||||
Entries: []*ldap.Entry{
|
||||
{
|
||||
@@ -780,7 +780,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
},
|
||||
{
|
||||
funcName: "Search",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
&ldap.SearchRequest{
|
||||
BaseDN: "ou=groups,dc=test",
|
||||
Scope: 2, DerefAliases: 0, SizeLimit: 0, TimeLimit: 0,
|
||||
@@ -790,7 +790,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
Controls: []ldap.Control(nil),
|
||||
},
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
&ldap.SearchResult{
|
||||
Entries: []*ldap.Entry{
|
||||
{
|
||||
@@ -813,7 +813,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
},
|
||||
{
|
||||
funcName: "ModifyDN",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
&ldap.ModifyDNRequest{
|
||||
DN: "uid=oldName,ou=people,dc=test,dc=net",
|
||||
NewRDN: "uid=newName",
|
||||
@@ -822,13 +822,13 @@ func TestUpdateUser(t *testing.T) {
|
||||
Controls: []ldap.Control(nil),
|
||||
},
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
nil,
|
||||
},
|
||||
},
|
||||
{
|
||||
funcName: "Search",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
&ldap.SearchRequest{
|
||||
BaseDN: "uid=newName,ou=people,dc=test,dc=net",
|
||||
Scope: 0,
|
||||
@@ -841,7 +841,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
Controls: []ldap.Control(nil),
|
||||
},
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
&ldap.SearchResult{
|
||||
Entries: []*ldap.Entry{
|
||||
{
|
||||
@@ -876,7 +876,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
},
|
||||
{
|
||||
funcName: "Modify",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
&ldap.ModifyRequest{
|
||||
DN: "cn=group1",
|
||||
Changes: []ldap.Change{
|
||||
@@ -898,7 +898,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
Controls: []ldap.Control(nil),
|
||||
},
|
||||
},
|
||||
returns: []interface{}{nil},
|
||||
returns: []any{nil},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -919,13 +919,13 @@ func TestUpdateUser(t *testing.T) {
|
||||
accountEnabled: &falseBool,
|
||||
userType: &memberType,
|
||||
},
|
||||
assertion: func(t assert.TestingT, err error, args ...interface{}) bool {
|
||||
assertion: func(t assert.TestingT, err error, args ...any) bool {
|
||||
return assert.Nil(t, err, args...)
|
||||
},
|
||||
ldapMocks: []mockInputs{
|
||||
{
|
||||
funcName: "Search",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
ldap.NewSearchRequest(
|
||||
"ou=people,dc=test",
|
||||
ldap.ScopeWholeSubtree,
|
||||
@@ -935,7 +935,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
nil,
|
||||
),
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
&ldap.SearchResult{
|
||||
Entries: []*ldap.Entry{
|
||||
{
|
||||
@@ -966,7 +966,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
},
|
||||
{
|
||||
funcName: "Search",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
&ldap.SearchRequest{
|
||||
BaseDN: "uid=name",
|
||||
Scope: 0,
|
||||
@@ -979,7 +979,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
Controls: []ldap.Control(nil),
|
||||
},
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
&ldap.SearchResult{
|
||||
Entries: []*ldap.Entry{
|
||||
{
|
||||
@@ -1014,7 +1014,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
},
|
||||
{
|
||||
funcName: "Modify",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
&ldap.ModifyRequest{
|
||||
DN: "uid=name",
|
||||
Changes: []ldap.Change{
|
||||
@@ -1029,7 +1029,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
Controls: []ldap.Control(nil),
|
||||
},
|
||||
},
|
||||
returns: []interface{}{nil},
|
||||
returns: []any{nil},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -1050,13 +1050,13 @@ func TestUpdateUser(t *testing.T) {
|
||||
accountEnabled: &falseBool,
|
||||
userType: &memberType,
|
||||
},
|
||||
assertion: func(t assert.TestingT, err error, args ...interface{}) bool {
|
||||
assertion: func(t assert.TestingT, err error, args ...any) bool {
|
||||
return assert.Nil(t, err, args...)
|
||||
},
|
||||
ldapMocks: []mockInputs{
|
||||
{
|
||||
funcName: "Search",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
ldap.NewSearchRequest(
|
||||
"ou=people,dc=test",
|
||||
ldap.ScopeWholeSubtree,
|
||||
@@ -1066,7 +1066,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
nil,
|
||||
),
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
&ldap.SearchResult{
|
||||
Entries: []*ldap.Entry{
|
||||
{
|
||||
@@ -1097,7 +1097,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
},
|
||||
{
|
||||
funcName: "Search",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
&ldap.SearchRequest{
|
||||
BaseDN: disableUsersGroup,
|
||||
Scope: 0,
|
||||
@@ -1110,7 +1110,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
Controls: []ldap.Control(nil),
|
||||
},
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
&ldap.SearchResult{
|
||||
Entries: []*ldap.Entry{
|
||||
{
|
||||
@@ -1129,7 +1129,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
},
|
||||
{
|
||||
funcName: "Modify",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
&ldap.ModifyRequest{
|
||||
DN: "uid=name",
|
||||
Changes: []ldap.Change{
|
||||
@@ -1144,22 +1144,22 @@ func TestUpdateUser(t *testing.T) {
|
||||
Controls: []ldap.Control(nil),
|
||||
},
|
||||
},
|
||||
returns: []interface{}{nil},
|
||||
returns: []any{nil},
|
||||
},
|
||||
{
|
||||
funcName: "Modify",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
&ldap.ModifyRequest{
|
||||
DN: "uid=name",
|
||||
Changes: []ldap.Change(nil),
|
||||
Controls: []ldap.Control(nil),
|
||||
},
|
||||
},
|
||||
returns: []interface{}{nil},
|
||||
returns: []any{nil},
|
||||
},
|
||||
{
|
||||
funcName: "Search",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
ldap.NewSearchRequest(
|
||||
"uid=name",
|
||||
ldap.ScopeBaseObject,
|
||||
@@ -1169,7 +1169,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
[]ldap.Control(nil),
|
||||
),
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
&ldap.SearchResult{
|
||||
Entries: []*ldap.Entry{
|
||||
{
|
||||
@@ -1217,13 +1217,13 @@ func TestUpdateUser(t *testing.T) {
|
||||
accountEnabled: &trueBool,
|
||||
userType: &memberType,
|
||||
},
|
||||
assertion: func(t assert.TestingT, err error, args ...interface{}) bool {
|
||||
assertion: func(t assert.TestingT, err error, args ...any) bool {
|
||||
return assert.Nil(t, err, args...)
|
||||
},
|
||||
ldapMocks: []mockInputs{
|
||||
{
|
||||
funcName: "Search",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
ldap.NewSearchRequest(
|
||||
"ou=people,dc=test",
|
||||
ldap.ScopeWholeSubtree,
|
||||
@@ -1233,7 +1233,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
nil,
|
||||
),
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
&ldap.SearchResult{
|
||||
Entries: []*ldap.Entry{
|
||||
{
|
||||
@@ -1264,7 +1264,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
},
|
||||
{
|
||||
funcName: "Search",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
&ldap.SearchRequest{
|
||||
BaseDN: disableUsersGroup,
|
||||
Scope: 0,
|
||||
@@ -1277,7 +1277,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
Controls: []ldap.Control(nil),
|
||||
},
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
&ldap.SearchResult{
|
||||
Entries: []*ldap.Entry{
|
||||
{
|
||||
@@ -1296,7 +1296,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
},
|
||||
{
|
||||
funcName: "Modify",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
&ldap.ModifyRequest{
|
||||
DN: "uid=name",
|
||||
Changes: []ldap.Change{
|
||||
@@ -1311,22 +1311,22 @@ func TestUpdateUser(t *testing.T) {
|
||||
Controls: []ldap.Control(nil),
|
||||
},
|
||||
},
|
||||
returns: []interface{}{nil},
|
||||
returns: []any{nil},
|
||||
},
|
||||
{
|
||||
funcName: "Modify",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
&ldap.ModifyRequest{
|
||||
DN: "uid=name",
|
||||
Changes: []ldap.Change(nil),
|
||||
Controls: []ldap.Control(nil),
|
||||
},
|
||||
},
|
||||
returns: []interface{}{nil},
|
||||
returns: []any{nil},
|
||||
},
|
||||
{
|
||||
funcName: "Search",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
ldap.NewSearchRequest(
|
||||
"uid=name",
|
||||
ldap.ScopeBaseObject,
|
||||
@@ -1336,7 +1336,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
[]ldap.Control(nil),
|
||||
),
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
&ldap.SearchResult{
|
||||
Entries: []*ldap.Entry{
|
||||
{
|
||||
@@ -1383,13 +1383,13 @@ func TestUpdateUser(t *testing.T) {
|
||||
onPremisesSamAccountName: "testUser",
|
||||
userType: &memberType,
|
||||
},
|
||||
assertion: func(t assert.TestingT, err error, args ...interface{}) bool {
|
||||
assertion: func(t assert.TestingT, err error, args ...any) bool {
|
||||
return assert.Nil(t, err, args...)
|
||||
},
|
||||
ldapMocks: []mockInputs{
|
||||
{
|
||||
funcName: "Search",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
ldap.NewSearchRequest(
|
||||
"ou=people,dc=test",
|
||||
ldap.ScopeWholeSubtree,
|
||||
@@ -1399,7 +1399,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
nil,
|
||||
),
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
&ldap.SearchResult{
|
||||
Entries: []*ldap.Entry{
|
||||
{
|
||||
@@ -1430,7 +1430,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
},
|
||||
{
|
||||
funcName: "Modify",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
&ldap.ModifyRequest{
|
||||
DN: "uid=name",
|
||||
Changes: []ldap.Change{
|
||||
@@ -1445,22 +1445,22 @@ func TestUpdateUser(t *testing.T) {
|
||||
Controls: []ldap.Control(nil),
|
||||
},
|
||||
},
|
||||
returns: []interface{}{nil},
|
||||
returns: []any{nil},
|
||||
},
|
||||
{
|
||||
funcName: "Modify",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
&ldap.ModifyRequest{
|
||||
DN: "uid=name",
|
||||
Changes: []ldap.Change(nil),
|
||||
Controls: []ldap.Control(nil),
|
||||
},
|
||||
},
|
||||
returns: []interface{}{nil},
|
||||
returns: []any{nil},
|
||||
},
|
||||
{
|
||||
funcName: "Search",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
ldap.NewSearchRequest(
|
||||
"uid=name",
|
||||
ldap.ScopeBaseObject,
|
||||
@@ -1470,7 +1470,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
[]ldap.Control(nil),
|
||||
),
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
&ldap.SearchResult{
|
||||
Entries: []*ldap.Entry{
|
||||
{
|
||||
@@ -1588,8 +1588,8 @@ func TestUsersEnabledState(t *testing.T) {
|
||||
}
|
||||
type mockInputs struct {
|
||||
funcName string
|
||||
args []interface{}
|
||||
returns []interface{}
|
||||
args []any
|
||||
returns []any
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -1606,7 +1606,7 @@ func TestUsersEnabledState(t *testing.T) {
|
||||
disableUserMechanism: "attribute",
|
||||
},
|
||||
want: map[string]bool{},
|
||||
assertion: func(t assert.TestingT, err error, args ...interface{}) bool {
|
||||
assertion: func(t assert.TestingT, err error, args ...any) bool {
|
||||
return assert.Nil(t, err, args...)
|
||||
},
|
||||
ldapMocks: []mockInputs{},
|
||||
@@ -1619,7 +1619,7 @@ func TestUsersEnabledState(t *testing.T) {
|
||||
disableUserMechanism: "attribute",
|
||||
},
|
||||
want: map[string]bool{"alice": true, "bob": false, "carol": true},
|
||||
assertion: func(t assert.TestingT, err error, args ...interface{}) bool {
|
||||
assertion: func(t assert.TestingT, err error, args ...any) bool {
|
||||
return assert.Nil(t, err, args...)
|
||||
},
|
||||
ldapMocks: []mockInputs{},
|
||||
@@ -1632,13 +1632,13 @@ func TestUsersEnabledState(t *testing.T) {
|
||||
disableUserMechanism: "group",
|
||||
},
|
||||
want: map[string]bool{"alice": true, "bob": true, "carol": true},
|
||||
assertion: func(t assert.TestingT, err error, args ...interface{}) bool {
|
||||
assertion: func(t assert.TestingT, err error, args ...any) bool {
|
||||
return assert.Nil(t, err, args...)
|
||||
},
|
||||
ldapMocks: []mockInputs{
|
||||
{
|
||||
funcName: "Search",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
ldap.NewSearchRequest(
|
||||
disableUsersGroup,
|
||||
ldap.ScopeBaseObject,
|
||||
@@ -1648,7 +1648,7 @@ func TestUsersEnabledState(t *testing.T) {
|
||||
[]ldap.Control(nil),
|
||||
),
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
&ldap.SearchResult{
|
||||
Entries: []*ldap.Entry{
|
||||
{
|
||||
@@ -1675,13 +1675,13 @@ func TestUsersEnabledState(t *testing.T) {
|
||||
disableUserMechanism: "group",
|
||||
},
|
||||
want: map[string]bool{"alice": false, "bob": true, "carol": false},
|
||||
assertion: func(t assert.TestingT, err error, args ...interface{}) bool {
|
||||
assertion: func(t assert.TestingT, err error, args ...any) bool {
|
||||
return assert.Nil(t, err, args...)
|
||||
},
|
||||
ldapMocks: []mockInputs{
|
||||
{
|
||||
funcName: "Search",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
ldap.NewSearchRequest(
|
||||
disableUsersGroup,
|
||||
ldap.ScopeBaseObject,
|
||||
@@ -1691,7 +1691,7 @@ func TestUsersEnabledState(t *testing.T) {
|
||||
[]ldap.Control(nil),
|
||||
),
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
&ldap.SearchResult{
|
||||
Entries: []*ldap.Entry{
|
||||
{
|
||||
@@ -1718,13 +1718,13 @@ func TestUsersEnabledState(t *testing.T) {
|
||||
disableUserMechanism: "group",
|
||||
},
|
||||
want: nil,
|
||||
assertion: func(t assert.TestingT, err error, args ...interface{}) bool {
|
||||
assertion: func(t assert.TestingT, err error, args ...any) bool {
|
||||
return assert.NotNil(t, err, args...)
|
||||
},
|
||||
ldapMocks: []mockInputs{
|
||||
{
|
||||
funcName: "Search",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
ldap.NewSearchRequest(
|
||||
disableUsersGroup,
|
||||
ldap.ScopeBaseObject,
|
||||
@@ -1734,7 +1734,7 @@ func TestUsersEnabledState(t *testing.T) {
|
||||
[]ldap.Control(nil),
|
||||
),
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
nil,
|
||||
&ldap.Error{
|
||||
Err: fmt.Errorf("very problematic problems"),
|
||||
|
||||
@@ -32,7 +32,7 @@ func Auth(opts ...account.Option) func(http.Handler) http.Handler {
|
||||
// Note: This largely duplicates what pkg/middleware/account.go already does (apart from a slightly different error
|
||||
// handling). Ideally we should merge both middlewares.
|
||||
opt := authOptions(opts...)
|
||||
tokenManager, err := jwt.New(map[string]interface{}{
|
||||
tokenManager, err := jwt.New(map[string]any{
|
||||
"secret": opt.JWTSecret,
|
||||
"expires": int64(24 * 60 * 60),
|
||||
})
|
||||
|
||||
@@ -678,7 +678,7 @@ func (api DriveItemPermissionsApi) Invite(w http.ResponseWriter, r *http.Request
|
||||
}
|
||||
|
||||
render.Status(r, http.StatusOK)
|
||||
render.JSON(w, r, &ListResponse{Value: []interface{}{permission}})
|
||||
render.JSON(w, r, &ListResponse{Value: []any{permission}})
|
||||
}
|
||||
|
||||
// SpaceRootInvite handles DriveItemInvite requests on a space root
|
||||
@@ -711,7 +711,7 @@ func (api DriveItemPermissionsApi) SpaceRootInvite(w http.ResponseWriter, r *htt
|
||||
}
|
||||
|
||||
render.Status(r, http.StatusOK)
|
||||
render.JSON(w, r, &ListResponse{Value: []interface{}{permission}})
|
||||
render.JSON(w, r, &ListResponse{Value: []any{permission}})
|
||||
}
|
||||
|
||||
// ListPermissions handles ListPermissions requests
|
||||
|
||||
@@ -158,7 +158,7 @@ var _ = Describe("EducationClass", func() {
|
||||
res := service.ListResponse{}
|
||||
err = json.Unmarshal(data, &res)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(res.Value).To(Equal([]interface{}{}))
|
||||
Expect(res.Value).To(Equal([]any{}))
|
||||
})
|
||||
|
||||
It("renders a list of classes", func() {
|
||||
|
||||
@@ -157,7 +157,7 @@ var _ = Describe("Schools", func() {
|
||||
res := service.ListResponse{}
|
||||
err = json.Unmarshal(data, &res)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(res.Value).To(Equal([]interface{}{}))
|
||||
Expect(res.Value).To(Equal([]any{}))
|
||||
})
|
||||
|
||||
It("renders a list of schools", func() {
|
||||
|
||||
@@ -12,6 +12,8 @@ import (
|
||||
"github.com/opencloud-eu/reva/v2/pkg/events"
|
||||
)
|
||||
|
||||
const _favoriteLabel = "favorite"
|
||||
|
||||
// FollowDriveItem marks a drive item as favorite.
|
||||
func (g Graph) FollowDriveItem(w http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
@@ -59,34 +61,36 @@ func (g Graph) FollowDriveItem(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
req := &provider.AddFavoriteRequest{
|
||||
req := &provider.AddLabelRequest{
|
||||
Ref: ref,
|
||||
UserId: u.Id,
|
||||
Label: _favoriteLabel,
|
||||
}
|
||||
|
||||
res, err := gatewayClient.AddFavorite(ctx, req)
|
||||
res, err := gatewayClient.AddLabel(ctx, req)
|
||||
if err != nil {
|
||||
g.logger.Error().Err(err).Msg("could not add favorite")
|
||||
errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, "could not add favorite")
|
||||
g.logger.Error().Err(err).Msg("could not add label")
|
||||
errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, "could not add label")
|
||||
return
|
||||
}
|
||||
|
||||
if res.Status.Code != rpc.Code_CODE_OK {
|
||||
errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, "could not add favorite")
|
||||
errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, "could not add label")
|
||||
return
|
||||
}
|
||||
|
||||
if g.eventsPublisher != nil {
|
||||
ev := events.FavoriteAdded{
|
||||
ev := events.LabelAdded{
|
||||
Ref: &provider.Reference{
|
||||
ResourceId: &itemID,
|
||||
Path: ".",
|
||||
},
|
||||
Label: _favoriteLabel,
|
||||
UserID: u.Id,
|
||||
Executant: revaCtx.ContextMustGetUser(r.Context()).Id,
|
||||
}
|
||||
if err := events.Publish(r.Context(), g.eventsPublisher, ev); err != nil {
|
||||
g.logger.Error().Err(err).Msg("Failed to publish FavoriteAdded event")
|
||||
g.logger.Error().Err(err).Msg("Failed to publish LabelAdded event")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,15 +130,16 @@ func (g Graph) UnfollowDriveItem(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
req := &provider.RemoveFavoriteRequest{
|
||||
req := &provider.RemoveLabelRequest{
|
||||
Ref: ref,
|
||||
UserId: u.Id,
|
||||
Label: _favoriteLabel,
|
||||
}
|
||||
|
||||
res, err := gatewayClient.RemoveFavorite(ctx, req)
|
||||
res, err := gatewayClient.RemoveLabel(ctx, req)
|
||||
if err != nil {
|
||||
g.logger.Error().Err(err).Msg("could not remove favorite")
|
||||
errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, "could not remove favorite")
|
||||
g.logger.Error().Err(err).Msg("could not remove label")
|
||||
errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, "could not remove label")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -150,16 +155,17 @@ func (g Graph) UnfollowDriveItem(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
if g.eventsPublisher != nil {
|
||||
ev := events.FavoriteRemoved{
|
||||
ev := events.LabelRemoved{
|
||||
Ref: &provider.Reference{
|
||||
ResourceId: &itemID,
|
||||
Path: ".",
|
||||
},
|
||||
Label: _favoriteLabel,
|
||||
UserID: u.Id,
|
||||
Executant: revaCtx.ContextMustGetUser(r.Context()).Id,
|
||||
}
|
||||
if err := events.Publish(r.Context(), g.eventsPublisher, ev); err != nil {
|
||||
g.logger.Error().Err(err).Msg("Failed to publish FavoriteRemoved event")
|
||||
g.logger.Error().Err(err).Msg("Failed to publish LabelRemoved event")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ type Graph struct {
|
||||
roleService RoleService
|
||||
permissionsService Permissions
|
||||
valueService settingssvc.ValueService
|
||||
specialDriveItemsCache *ttlcache.Cache[string, interface{}]
|
||||
specialDriveItemsCache *ttlcache.Cache[string, any]
|
||||
eventsPublisher events.Publisher
|
||||
eventsConsumer events.Consumer
|
||||
searchService searchsvc.SearchProviderService
|
||||
@@ -83,7 +83,7 @@ func (g Graph) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
g.mux.ServeHTTP(w, r)
|
||||
}
|
||||
|
||||
func (g Graph) publishEvent(ctx context.Context, ev interface{}) {
|
||||
func (g Graph) publishEvent(ctx context.Context, ev any) {
|
||||
if g.eventsPublisher != nil {
|
||||
if err := events.Publish(ctx, g.eventsPublisher, ev); err != nil {
|
||||
g.logger.Error().
|
||||
@@ -104,7 +104,7 @@ func (g Graph) getWebDavBaseURL() (*url.URL, error) {
|
||||
|
||||
// ListResponse is used for proper marshalling of Graph list responses
|
||||
type ListResponse struct {
|
||||
Value interface{} `json:"value,omitempty"`
|
||||
Value any `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
@@ -188,7 +188,7 @@ var _ = Describe("Groups", func() {
|
||||
res := service.ListResponse{}
|
||||
err = json.Unmarshal(data, &res)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(res.Value).To(Equal([]interface{}{}))
|
||||
Expect(res.Value).To(Equal([]any{}))
|
||||
})
|
||||
|
||||
It("renders a list of groups", func() {
|
||||
|
||||
@@ -150,7 +150,7 @@ func (g Graph) GatherPersonalData(usr *user.User, ref *provider.Reference, token
|
||||
g.logger.Error().Err(err).Str("userID", usr.GetId().GetOpaqueId()).Msg("cannot impersonate user")
|
||||
}
|
||||
// create data
|
||||
data := make(map[string]interface{})
|
||||
data := make(map[string]any)
|
||||
|
||||
// reva user
|
||||
data["user"] = usr
|
||||
@@ -316,12 +316,12 @@ func getLocation(r *http.Request) string {
|
||||
}
|
||||
|
||||
// we want the events to look nice in the file, don't we?
|
||||
func convertEvents(evs []*ehmsg.Event) []map[string]interface{} {
|
||||
out := make([]map[string]interface{}, len(evs))
|
||||
func convertEvents(evs []*ehmsg.Event) []map[string]any {
|
||||
out := make([]map[string]any, len(evs))
|
||||
for i, e := range evs {
|
||||
var content map[string]interface{}
|
||||
var content map[string]any
|
||||
_ = json.Unmarshal(e.GetEvent(), &content)
|
||||
out[i] = map[string]interface{}{
|
||||
out[i] = map[string]any{
|
||||
"id": e.GetId(),
|
||||
"type": e.GetType(),
|
||||
"event": content,
|
||||
|
||||
@@ -141,10 +141,10 @@ func NewService(opts ...Option) (Graph, error) { //nolint:maintidx
|
||||
)
|
||||
|
||||
spacePropertiesCache := ttlcache.New(
|
||||
ttlcache.WithTTL[string, interface{}](
|
||||
ttlcache.WithTTL[string, any](
|
||||
time.Duration(options.Config.Spaces.ExtendedSpacePropertiesCacheTTL),
|
||||
),
|
||||
ttlcache.WithDisableTouchOnHit[string, interface{}](),
|
||||
ttlcache.WithDisableTouchOnHit[string, any](),
|
||||
)
|
||||
go spacePropertiesCache.Start()
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import (
|
||||
)
|
||||
|
||||
// StrictJSONUnmarshal is a wrapper around json.Unmarshal that returns an error if the json contains unknown fields.
|
||||
func StrictJSONUnmarshal(r io.Reader, v interface{}) error {
|
||||
func StrictJSONUnmarshal(r io.Reader, v any) error {
|
||||
dec := json.NewDecoder(r)
|
||||
dec.DisallowUnknownFields()
|
||||
return dec.Decode(v)
|
||||
|
||||
@@ -21,6 +21,6 @@ func init() {
|
||||
func Default() *validator.Validate { return defaultValidator.Load().(*validator.Validate) }
|
||||
|
||||
// StructCtx validates a struct and returns the error.
|
||||
func StructCtx(ctx context.Context, s interface{}) error {
|
||||
func StructCtx(ctx context.Context, s any) error {
|
||||
return Default().StructCtx(ctx, s)
|
||||
}
|
||||
|
||||
@@ -5,33 +5,33 @@ import (
|
||||
)
|
||||
|
||||
// GroupsConfigFromStruct will adapt an OpenCloud config struct into a reva mapstructure to start a reva service.
|
||||
func GroupsConfigFromStruct(cfg *config.Config) map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
"shared": map[string]interface{}{
|
||||
func GroupsConfigFromStruct(cfg *config.Config) map[string]any {
|
||||
return map[string]any{
|
||||
"shared": map[string]any{
|
||||
"jwt_secret": cfg.TokenManager.JWTSecret,
|
||||
"gatewaysvc": cfg.Reva.Address,
|
||||
"skip_user_groups_in_token": cfg.SkipUserGroupsInToken,
|
||||
"grpc_client_options": cfg.Reva.GetGRPCClientConfig(),
|
||||
"multi_tenant_enabled": cfg.Commons.MultiTenantEnabled,
|
||||
},
|
||||
"grpc": map[string]interface{}{
|
||||
"grpc": map[string]any{
|
||||
"network": cfg.GRPC.Protocol,
|
||||
"address": cfg.GRPC.Addr,
|
||||
"tls_settings": map[string]interface{}{
|
||||
"tls_settings": map[string]any{
|
||||
"enabled": cfg.GRPC.TLS.Enabled,
|
||||
"certificate": cfg.GRPC.TLS.Cert,
|
||||
"key": cfg.GRPC.TLS.Key,
|
||||
},
|
||||
// TODO build services dynamically
|
||||
"services": map[string]interface{}{
|
||||
"groupprovider": map[string]interface{}{
|
||||
"services": map[string]any{
|
||||
"groupprovider": map[string]any{
|
||||
"driver": cfg.Driver,
|
||||
"drivers": map[string]interface{}{
|
||||
"json": map[string]interface{}{
|
||||
"drivers": map[string]any{
|
||||
"json": map[string]any{
|
||||
"groups": cfg.Drivers.JSON.File,
|
||||
},
|
||||
"ldap": ldapConfigFromString(cfg.Drivers.LDAP),
|
||||
"rest": map[string]interface{}{
|
||||
"rest": map[string]any{
|
||||
"client_id": cfg.Drivers.REST.ClientID,
|
||||
"client_secret": cfg.Drivers.REST.ClientSecret,
|
||||
"redis_address": cfg.Drivers.REST.RedisAddr,
|
||||
@@ -45,8 +45,8 @@ func GroupsConfigFromStruct(cfg *config.Config) map[string]interface{} {
|
||||
},
|
||||
},
|
||||
},
|
||||
"interceptors": map[string]interface{}{
|
||||
"prometheus": map[string]interface{}{
|
||||
"interceptors": map[string]any{
|
||||
"prometheus": map[string]any{
|
||||
"namespace": "opencloud",
|
||||
"subsystem": "groups",
|
||||
},
|
||||
@@ -55,8 +55,8 @@ func GroupsConfigFromStruct(cfg *config.Config) map[string]interface{} {
|
||||
}
|
||||
}
|
||||
|
||||
func ldapConfigFromString(cfg config.LDAPDriver) map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
func ldapConfigFromString(cfg config.LDAPDriver) map[string]any {
|
||||
return map[string]any{
|
||||
"uri": cfg.URI,
|
||||
"cacert": cfg.CACert,
|
||||
"insecure": cfg.Insecure,
|
||||
@@ -72,14 +72,14 @@ func ldapConfigFromString(cfg config.LDAPDriver) map[string]interface{} {
|
||||
"user_objectclass": cfg.UserObjectClass,
|
||||
"group_objectclass": cfg.GroupObjectClass,
|
||||
"idp": cfg.IDP,
|
||||
"user_schema": map[string]interface{}{
|
||||
"user_schema": map[string]any{
|
||||
"id": cfg.UserSchema.ID,
|
||||
"idIsOctetString": cfg.UserSchema.IDIsOctetString,
|
||||
"mail": cfg.UserSchema.Mail,
|
||||
"displayName": cfg.UserSchema.DisplayName,
|
||||
"userName": cfg.UserSchema.Username,
|
||||
},
|
||||
"group_schema": map[string]interface{}{
|
||||
"group_schema": map[string]any{
|
||||
"id": cfg.GroupSchema.ID,
|
||||
"idIsOctetString": cfg.GroupSchema.IDIsOctetString,
|
||||
"mail": cfg.GroupSchema.Mail,
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@material-ui/core": "^4.12.4",
|
||||
"@types/node": "^22.19.17",
|
||||
"@types/node": "^25.6.0",
|
||||
"@types/react": "^17.0.91",
|
||||
"@types/react-dom": "^17.0.26",
|
||||
"@types/react-redux": "^7.1.34",
|
||||
|
||||
@@ -196,7 +196,7 @@ func (b *CS3Backend) ResolveUserByUsername(ctx context.Context, username string)
|
||||
}
|
||||
|
||||
// RefreshSession implements the Backend interface.
|
||||
func (b *CS3Backend) RefreshSession(_ context.Context, _ string, _ *string, _ map[string]interface{}) error {
|
||||
func (b *CS3Backend) RefreshSession(_ context.Context, _ string, _ *string, _ map[string]any) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ func (b *CS3Backend) DestroySession(_ context.Context, sessionRef *string) error
|
||||
|
||||
// UserClaims implements the Backend interface, providing user specific claims
|
||||
// for the user specified by the userID.
|
||||
func (b *CS3Backend) UserClaims(_ string, _ map[string]bool) map[string]interface{} {
|
||||
func (b *CS3Backend) UserClaims(_ string, _ map[string]bool) map[string]any {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -56,8 +56,8 @@ func (u *cs3User) UniqueID() string {
|
||||
}
|
||||
|
||||
// BackendClaims returns additional claims the cs3 users provides
|
||||
func (u *cs3User) BackendClaims() map[string]interface{} {
|
||||
claims := make(map[string]interface{})
|
||||
func (u *cs3User) BackendClaims() map[string]any {
|
||||
claims := make(map[string]any)
|
||||
claims[konnect.IdentifiedUserIDClaim] = u.u.GetId().GetOpaqueId()
|
||||
|
||||
return claims
|
||||
|
||||
Generated
+40
-17
@@ -15,8 +15,8 @@ importers:
|
||||
specifier: ^4.12.4
|
||||
version: 4.12.4(@types/react@17.0.91)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)
|
||||
'@types/node':
|
||||
specifier: ^22.19.17
|
||||
version: 22.19.17
|
||||
specifier: ^25.6.0
|
||||
version: 25.6.0
|
||||
'@types/react':
|
||||
specifier: ^17.0.91
|
||||
version: 17.0.91
|
||||
@@ -1529,8 +1529,8 @@ packages:
|
||||
'@types/minimatch@3.0.5':
|
||||
resolution: {integrity: sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==}
|
||||
|
||||
'@types/node@22.19.17':
|
||||
resolution: {integrity: sha512-wGdMcf+vPYM6jikpS/qhg6WiqSV/OhG+jeeHT/KlVqxYfD40iYJf9/AE1uQxVWFvU7MipKRkRv8NSHiCGgPr8Q==}
|
||||
'@types/node@25.6.0':
|
||||
resolution: {integrity: sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ==}
|
||||
|
||||
'@types/parse-json@4.0.2':
|
||||
resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==}
|
||||
@@ -1629,6 +1629,7 @@ packages:
|
||||
'@xmldom/xmldom@0.8.12':
|
||||
resolution: {integrity: sha512-9k/gHF6n/pAi/9tqr3m3aqkuiNosYTurLLUtc7xQ9sxB/wm7WPygCv8GYa6mS0fLJEHhqMC1ATYhz++U/lRHqg==}
|
||||
engines: {node: '>=10.0.0'}
|
||||
deprecated: this version has critical issues, please update to the latest version
|
||||
|
||||
'@xtuc/ieee754@1.2.0':
|
||||
resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==}
|
||||
@@ -1694,9 +1695,15 @@ packages:
|
||||
ajv@6.14.0:
|
||||
resolution: {integrity: sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==}
|
||||
|
||||
ajv@6.15.0:
|
||||
resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==}
|
||||
|
||||
ajv@8.18.0:
|
||||
resolution: {integrity: sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==}
|
||||
|
||||
ajv@8.20.0:
|
||||
resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==}
|
||||
|
||||
ansi-colors@4.1.3:
|
||||
resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==}
|
||||
engines: {node: '>=6'}
|
||||
@@ -4682,8 +4689,8 @@ packages:
|
||||
underscore.string@3.3.6:
|
||||
resolution: {integrity: sha512-VoC83HWXmCrF6rgkyxS9GHv8W9Q5nhMKho+OadDJGzL2oDYbYEppBaCMH6pFlwLeqj2QS+hhkw2kpXkSdD1JxQ==}
|
||||
|
||||
undici-types@6.21.0:
|
||||
resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==}
|
||||
undici-types@7.19.2:
|
||||
resolution: {integrity: sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==}
|
||||
|
||||
undici@7.24.8:
|
||||
resolution: {integrity: sha512-6KQ/+QxK49Z/p3HO6E5ZCZWNnCasyZLa5ExaVYyvPxUwKtbCPMKELJOqh7EqOle0t9cH/7d2TaaTRRa6Nhs4YQ==}
|
||||
@@ -6229,7 +6236,7 @@ snapshots:
|
||||
|
||||
'@eslint/eslintrc@0.4.3':
|
||||
dependencies:
|
||||
ajv: 6.14.0
|
||||
ajv: 6.15.0
|
||||
debug: 4.4.3
|
||||
espree: 7.3.1
|
||||
globals: 13.24.0
|
||||
@@ -6271,7 +6278,7 @@ snapshots:
|
||||
|
||||
'@jest/pattern@30.0.1':
|
||||
dependencies:
|
||||
'@types/node': 22.19.17
|
||||
'@types/node': 25.6.0
|
||||
jest-regex-util: 30.0.1
|
||||
|
||||
'@jest/schemas@30.0.5':
|
||||
@@ -6284,7 +6291,7 @@ snapshots:
|
||||
'@jest/schemas': 30.0.5
|
||||
'@types/istanbul-lib-coverage': 2.0.6
|
||||
'@types/istanbul-reports': 3.0.4
|
||||
'@types/node': 22.19.17
|
||||
'@types/node': 25.6.0
|
||||
'@types/yargs': 17.0.35
|
||||
chalk: 4.1.2
|
||||
|
||||
@@ -6512,9 +6519,9 @@ snapshots:
|
||||
|
||||
'@types/minimatch@3.0.5': {}
|
||||
|
||||
'@types/node@22.19.17':
|
||||
'@types/node@25.6.0':
|
||||
dependencies:
|
||||
undici-types: 6.21.0
|
||||
undici-types: 7.19.2
|
||||
|
||||
'@types/parse-json@4.0.2': {}
|
||||
|
||||
@@ -6692,6 +6699,14 @@ snapshots:
|
||||
json-schema-traverse: 0.4.1
|
||||
uri-js: 4.4.1
|
||||
|
||||
ajv@6.15.0:
|
||||
dependencies:
|
||||
fast-deep-equal: 3.1.3
|
||||
fast-json-stable-stringify: 2.1.0
|
||||
json-schema-traverse: 0.4.1
|
||||
uri-js: 4.4.1
|
||||
optional: true
|
||||
|
||||
ajv@8.18.0:
|
||||
dependencies:
|
||||
fast-deep-equal: 3.1.3
|
||||
@@ -6699,6 +6714,14 @@ snapshots:
|
||||
json-schema-traverse: 1.0.0
|
||||
require-from-string: 2.0.2
|
||||
|
||||
ajv@8.20.0:
|
||||
dependencies:
|
||||
fast-deep-equal: 3.1.3
|
||||
fast-uri: 3.1.0
|
||||
json-schema-traverse: 1.0.0
|
||||
require-from-string: 2.0.2
|
||||
optional: true
|
||||
|
||||
ansi-colors@4.1.3:
|
||||
optional: true
|
||||
|
||||
@@ -7587,7 +7610,7 @@ snapshots:
|
||||
'@babel/code-frame': 7.12.11
|
||||
'@eslint/eslintrc': 0.4.3
|
||||
'@humanwhocodes/config-array': 0.5.0
|
||||
ajv: 6.14.0
|
||||
ajv: 6.15.0
|
||||
chalk: 4.1.2
|
||||
cross-spawn: 7.0.6
|
||||
debug: 4.4.3
|
||||
@@ -8344,7 +8367,7 @@ snapshots:
|
||||
jest-util@30.3.0:
|
||||
dependencies:
|
||||
'@jest/types': 30.3.0
|
||||
'@types/node': 22.19.17
|
||||
'@types/node': 25.6.0
|
||||
chalk: 4.1.2
|
||||
ci-info: 4.4.0
|
||||
graceful-fs: 4.2.11
|
||||
@@ -8352,13 +8375,13 @@ snapshots:
|
||||
|
||||
jest-worker@27.5.1:
|
||||
dependencies:
|
||||
'@types/node': 22.19.17
|
||||
'@types/node': 25.6.0
|
||||
merge-stream: 2.0.0
|
||||
supports-color: 8.1.1
|
||||
|
||||
jest-worker@30.3.0:
|
||||
dependencies:
|
||||
'@types/node': 22.19.17
|
||||
'@types/node': 25.6.0
|
||||
'@ungap/structured-clone': 1.3.0
|
||||
jest-util: 30.3.0
|
||||
merge-stream: 2.0.0
|
||||
@@ -9961,7 +9984,7 @@ snapshots:
|
||||
|
||||
table@6.9.0:
|
||||
dependencies:
|
||||
ajv: 8.18.0
|
||||
ajv: 8.20.0
|
||||
lodash.truncate: 4.4.2
|
||||
slice-ansi: 4.0.0
|
||||
string-width: 4.2.3
|
||||
@@ -10124,7 +10147,7 @@ snapshots:
|
||||
sprintf-js: 1.1.3
|
||||
util-deprecate: 1.0.2
|
||||
|
||||
undici-types@6.21.0: {}
|
||||
undici-types@7.19.2: {}
|
||||
|
||||
undici@7.24.8: {}
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@ func TestBackend_CreateUser(t *testing.T) {
|
||||
}
|
||||
type mockInputs struct {
|
||||
funcName string
|
||||
args []interface{}
|
||||
returns []interface{}
|
||||
args []any
|
||||
returns []any
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -51,7 +51,7 @@ func TestBackend_CreateUser(t *testing.T) {
|
||||
clientMocks: []mockInputs{
|
||||
{
|
||||
funcName: "CreateUser",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
mock.Anything,
|
||||
userRealm,
|
||||
mock.Anything, // can't match on the user because it generates a UUID internally.
|
||||
@@ -60,13 +60,13 @@ func TestBackend_CreateUser(t *testing.T) {
|
||||
kcpkg.UserActionVerifyEmail,
|
||||
},
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
"test-id",
|
||||
nil,
|
||||
},
|
||||
},
|
||||
},
|
||||
assertion: func(t assert.TestingT, err error, args ...interface{}) bool {
|
||||
assertion: func(t assert.TestingT, err error, args ...any) bool {
|
||||
return assert.Nil(t, err, args...)
|
||||
},
|
||||
},
|
||||
@@ -92,8 +92,8 @@ func TestBackend_SendMail(t *testing.T) {
|
||||
}
|
||||
type mockInputs struct {
|
||||
funcName string
|
||||
args []interface{}
|
||||
returns []interface{}
|
||||
args []any
|
||||
returns []any
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -109,7 +109,7 @@ func TestBackend_SendMail(t *testing.T) {
|
||||
clientMocks: []mockInputs{
|
||||
{
|
||||
funcName: "SendActionsMail",
|
||||
args: []interface{}{
|
||||
args: []any{
|
||||
mock.Anything,
|
||||
userRealm,
|
||||
"test-id",
|
||||
@@ -118,12 +118,12 @@ func TestBackend_SendMail(t *testing.T) {
|
||||
kcpkg.UserActionVerifyEmail,
|
||||
},
|
||||
},
|
||||
returns: []interface{}{
|
||||
returns: []any{
|
||||
nil,
|
||||
},
|
||||
},
|
||||
},
|
||||
assertion: func(t assert.TestingT, err error, args ...interface{}) bool {
|
||||
assertion: func(t assert.TestingT, err error, args ...any) bool {
|
||||
return assert.Nil(t, err, args...)
|
||||
},
|
||||
},
|
||||
|
||||
@@ -91,7 +91,9 @@ func Server(cfg *config.Config) *cobra.Command {
|
||||
gr.Add(runner.New(cfg.Service.Name+".svc", func() error {
|
||||
return natsServer.ListenAndServe()
|
||||
}, func() {
|
||||
logger.Info().Msg("Gracefully shutting down the NATS server...")
|
||||
natsServer.Shutdown()
|
||||
logger.Info().Msg("NATS server shutdown")
|
||||
}))
|
||||
|
||||
grResults := gr.Run(ctx)
|
||||
|
||||
@@ -16,37 +16,37 @@ type LogWrapper struct {
|
||||
}
|
||||
|
||||
// Noticef logs a notice statement
|
||||
func (l *LogWrapper) Noticef(format string, v ...interface{}) {
|
||||
func (l *LogWrapper) Noticef(format string, v ...any) {
|
||||
msg := fmt.Sprintf(format, v...)
|
||||
l.logger.Info().Msg(msg)
|
||||
}
|
||||
|
||||
// Warnf logs a warning statement
|
||||
func (l *LogWrapper) Warnf(format string, v ...interface{}) {
|
||||
func (l *LogWrapper) Warnf(format string, v ...any) {
|
||||
msg := fmt.Sprintf(format, v...)
|
||||
l.logger.Warn().Msg(msg)
|
||||
}
|
||||
|
||||
// Fatalf logs a fatal statement
|
||||
func (l *LogWrapper) Fatalf(format string, v ...interface{}) {
|
||||
func (l *LogWrapper) Fatalf(format string, v ...any) {
|
||||
msg := fmt.Sprintf(format, v...)
|
||||
l.logger.Fatal().Msg(msg)
|
||||
}
|
||||
|
||||
// Errorf logs an error statement
|
||||
func (l *LogWrapper) Errorf(format string, v ...interface{}) {
|
||||
func (l *LogWrapper) Errorf(format string, v ...any) {
|
||||
msg := fmt.Sprintf(format, v...)
|
||||
l.logger.Error().Msg(msg)
|
||||
}
|
||||
|
||||
// Debugf logs a debug statement
|
||||
func (l *LogWrapper) Debugf(format string, v ...interface{}) {
|
||||
func (l *LogWrapper) Debugf(format string, v ...any) {
|
||||
msg := fmt.Sprintf(format, v...)
|
||||
l.logger.Debug().Msg(msg)
|
||||
}
|
||||
|
||||
// Tracef logs a trace statement
|
||||
func (l *LogWrapper) Tracef(format string, v ...interface{}) {
|
||||
func (l *LogWrapper) Tracef(format string, v ...any) {
|
||||
msg := fmt.Sprintf(format, v...)
|
||||
l.logger.Trace().Msg(msg)
|
||||
}
|
||||
|
||||
@@ -21,19 +21,19 @@ var (
|
||||
func NewTextTemplate(mt MessageTemplate, locale, defaultLocale string, translationPath string, vars map[string]string) (MessageTemplate, error) {
|
||||
var err error
|
||||
t := l10n.NewTranslatorFromCommonConfig(defaultLocale, _domain, translationPath, _translationFS, "l10n/locale").Locale(locale)
|
||||
mt.Subject, err = composeMessage(t.Get(mt.Subject, []interface{}{}...), vars)
|
||||
mt.Subject, err = composeMessage(t.Get(mt.Subject, []any{}...), vars)
|
||||
if err != nil {
|
||||
return mt, err
|
||||
}
|
||||
mt.Greeting, err = composeMessage(t.Get(mt.Greeting, []interface{}{}...), vars)
|
||||
mt.Greeting, err = composeMessage(t.Get(mt.Greeting, []any{}...), vars)
|
||||
if err != nil {
|
||||
return mt, err
|
||||
}
|
||||
mt.MessageBody, err = composeMessage(t.Get(mt.MessageBody, []interface{}{}...), vars)
|
||||
mt.MessageBody, err = composeMessage(t.Get(mt.MessageBody, []any{}...), vars)
|
||||
if err != nil {
|
||||
return mt, err
|
||||
}
|
||||
mt.CallToAction, err = composeMessage(t.Get(mt.CallToAction, []interface{}{}...), vars)
|
||||
mt.CallToAction, err = composeMessage(t.Get(mt.CallToAction, []any{}...), vars)
|
||||
if err != nil {
|
||||
return mt, err
|
||||
}
|
||||
@@ -44,19 +44,19 @@ func NewTextTemplate(mt MessageTemplate, locale, defaultLocale string, translati
|
||||
func NewHTMLTemplate(mt MessageTemplate, locale, defaultLocale string, translationPath string, vars map[string]string) (MessageTemplate, error) {
|
||||
var err error
|
||||
t := l10n.NewTranslatorFromCommonConfig(defaultLocale, _domain, translationPath, _translationFS, "l10n/locale").Locale(locale)
|
||||
mt.Subject, err = composeMessage(t.Get(mt.Subject, []interface{}{}...), vars)
|
||||
mt.Subject, err = composeMessage(t.Get(mt.Subject, []any{}...), vars)
|
||||
if err != nil {
|
||||
return mt, err
|
||||
}
|
||||
mt.Greeting, err = composeMessage(newlineToBr(t.Get(mt.Greeting, []interface{}{}...)), vars)
|
||||
mt.Greeting, err = composeMessage(newlineToBr(t.Get(mt.Greeting, []any{}...)), vars)
|
||||
if err != nil {
|
||||
return mt, err
|
||||
}
|
||||
mt.MessageBody, err = composeMessage(newlineToBr(t.Get(mt.MessageBody, []interface{}{}...)), vars)
|
||||
mt.MessageBody, err = composeMessage(newlineToBr(t.Get(mt.MessageBody, []any{}...)), vars)
|
||||
if err != nil {
|
||||
return mt, err
|
||||
}
|
||||
mt.CallToAction, err = composeMessage(callToActionToHTML(t.Get(mt.CallToAction, []interface{}{}...)), vars)
|
||||
mt.CallToAction, err = composeMessage(callToActionToHTML(t.Get(mt.CallToAction, []any{}...)), vars)
|
||||
if err != nil {
|
||||
return mt, err
|
||||
}
|
||||
@@ -71,18 +71,18 @@ func NewGroupedTextTemplate(gmt GroupedMessageTemplate, vars map[string]string,
|
||||
|
||||
var err error
|
||||
t := l10n.NewTranslatorFromCommonConfig(defaultLocale, _domain, translationPath, _translationFS, "l10n/locale").Locale(locale)
|
||||
gmt.Subject, err = composeMessage(t.Get(gmt.Subject, []interface{}{}...), vars)
|
||||
gmt.Subject, err = composeMessage(t.Get(gmt.Subject, []any{}...), vars)
|
||||
if err != nil {
|
||||
return gmt, err
|
||||
}
|
||||
gmt.Greeting, err = composeMessage(t.Get(gmt.Greeting, []interface{}{}...), vars)
|
||||
gmt.Greeting, err = composeMessage(t.Get(gmt.Greeting, []any{}...), vars)
|
||||
if err != nil {
|
||||
return gmt, err
|
||||
}
|
||||
|
||||
bodyParts := make([]string, 0, len(mtsVars))
|
||||
for i, mt := range mts {
|
||||
bodyPart, err := composeMessage(t.Get(mt.MessageBody, []interface{}{}...), mtsVars[i])
|
||||
bodyPart, err := composeMessage(t.Get(mt.MessageBody, []any{}...), mtsVars[i])
|
||||
if err != nil {
|
||||
return gmt, err
|
||||
}
|
||||
@@ -100,18 +100,18 @@ func NewGroupedHTMLTemplate(gmt GroupedMessageTemplate, vars map[string]string,
|
||||
|
||||
var err error
|
||||
t := l10n.NewTranslatorFromCommonConfig(defaultLocale, _domain, translationPath, _translationFS, "l10n/locale").Locale(locale)
|
||||
gmt.Subject, err = composeMessage(t.Get(gmt.Subject, []interface{}{}...), vars)
|
||||
gmt.Subject, err = composeMessage(t.Get(gmt.Subject, []any{}...), vars)
|
||||
if err != nil {
|
||||
return gmt, err
|
||||
}
|
||||
gmt.Greeting, err = composeMessage(newlineToBr(t.Get(gmt.Greeting, []interface{}{}...)), vars)
|
||||
gmt.Greeting, err = composeMessage(newlineToBr(t.Get(gmt.Greeting, []any{}...)), vars)
|
||||
if err != nil {
|
||||
return gmt, err
|
||||
}
|
||||
|
||||
bodyParts := make([]string, 0, len(mtsVars))
|
||||
for i, mt := range mts {
|
||||
bodyPart, err := composeMessage(t.Get(mt.MessageBody, []interface{}{}...), mtsVars[i])
|
||||
bodyPart, err := composeMessage(t.Get(mt.MessageBody, []any{}...), mtsVars[i])
|
||||
if err != nil {
|
||||
return gmt, err
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ func RenderGroupedEmailTemplate(gmt GroupedMessageTemplate, vars map[string]stri
|
||||
|
||||
// emailTemplate builds the email template. It does not use any user provided input, so it is safe to use template.HTML.
|
||||
func emailTemplate(tpl *template.Template, mt MessageTemplate) (string, error) {
|
||||
str, err := executeTemplate(tpl, map[string]interface{}{
|
||||
str, err := executeTemplate(tpl, map[string]any{
|
||||
"Greeting": template.HTML(strings.TrimSpace(mt.Greeting)), // #nosec G203
|
||||
"MessageBody": template.HTML(strings.TrimSpace(mt.MessageBody)), // #nosec G203
|
||||
"CallToAction": template.HTML(strings.TrimSpace(mt.CallToAction)), // #nosec G203
|
||||
@@ -129,7 +129,7 @@ func emailTemplate(tpl *template.Template, mt MessageTemplate) (string, error) {
|
||||
|
||||
// groupedEmailTemplate builds the email template. It does not use any user provided input, so it is safe to use template.HTML.
|
||||
func groupedEmailTemplate(tpl *template.Template, gmt GroupedMessageTemplate) (string, error) {
|
||||
str, err := executeTemplate(tpl, map[string]interface{}{
|
||||
str, err := executeTemplate(tpl, map[string]any{
|
||||
"Greeting": template.HTML(strings.TrimSpace(gmt.Greeting)), // #nosec G203
|
||||
"MessageBody": template.HTML(strings.TrimSpace(gmt.MessageBody)), // #nosec G203
|
||||
})
|
||||
|
||||
@@ -45,12 +45,12 @@ func (s eventsNotifier) handleScienceMeshInviteTokenGenerated(e events.ScienceMe
|
||||
// event that is optional when the event got triggered...
|
||||
// this means if we get a validation error, we can't send the message and skip it
|
||||
{
|
||||
validationEnv := make(map[string]interface{}, len(msgENV))
|
||||
validationEnv := make(map[string]any, len(msgENV))
|
||||
for k, v := range msgENV {
|
||||
validationEnv[k] = v
|
||||
}
|
||||
if errs := validate.ValidateMap(validationEnv,
|
||||
map[string]interface{}{
|
||||
map[string]any{
|
||||
"RecipientMail": "required,email", // only recipient mail is required to send the message
|
||||
}); len(errs) > 0 {
|
||||
return // no mail, no message
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
// OCMConfigFromStruct will adapt an OpenCloud config struct into a reva mapstructure to start a reva service.
|
||||
func OCMConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]interface{} {
|
||||
func OCMConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]any {
|
||||
|
||||
// Construct the ocm provider domain from the OpenCloud URL
|
||||
providerDomain := ""
|
||||
@@ -23,18 +23,18 @@ func OCMConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]inter
|
||||
providerDomain = u.Host
|
||||
}
|
||||
|
||||
return map[string]interface{}{
|
||||
"shared": map[string]interface{}{
|
||||
return map[string]any{
|
||||
"shared": map[string]any{
|
||||
"jwt_secret": cfg.TokenManager.JWTSecret,
|
||||
"gatewaysvc": cfg.Reva.Address, // Todo or address?
|
||||
"grpc_client_options": cfg.Reva.GetGRPCClientConfig(),
|
||||
"multi_tenant_enabled": cfg.Commons.MultiTenantEnabled,
|
||||
},
|
||||
"http": map[string]interface{}{
|
||||
"http": map[string]any{
|
||||
"network": cfg.HTTP.Protocol,
|
||||
"address": cfg.HTTP.Addr,
|
||||
"middlewares": map[string]interface{}{
|
||||
"cors": map[string]interface{}{
|
||||
"middlewares": map[string]any{
|
||||
"cors": map[string]any{
|
||||
"allowed_origins": cfg.HTTP.CORS.AllowedOrigins,
|
||||
"allowed_methods": cfg.HTTP.CORS.AllowedMethods,
|
||||
"allowed_headers": cfg.HTTP.CORS.AllowedHeaders,
|
||||
@@ -46,20 +46,20 @@ func OCMConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]inter
|
||||
//"priority": ,
|
||||
//"exposed_headers": ,
|
||||
},
|
||||
"auth": map[string]interface{}{
|
||||
"auth": map[string]any{
|
||||
"credentials_by_user_agent": cfg.Middleware.Auth.CredentialsByUserAgent,
|
||||
},
|
||||
"prometheus": map[string]interface{}{
|
||||
"prometheus": map[string]any{
|
||||
"namespace": "opencloud",
|
||||
"subsystem": "ocm",
|
||||
},
|
||||
"requestid": map[string]interface{}{},
|
||||
"requestid": map[string]any{},
|
||||
},
|
||||
// TODO build services dynamically
|
||||
"services": map[string]interface{}{
|
||||
"wellknown": map[string]interface{}{
|
||||
"services": map[string]any{
|
||||
"wellknown": map[string]any{
|
||||
"prefix": ".well-known",
|
||||
"ocmprovider": map[string]interface{}{
|
||||
"ocmprovider": map[string]any{
|
||||
"ocm_prefix": cfg.OCMD.Prefix,
|
||||
"endpoint": cfg.Commons.OpenCloudURL,
|
||||
"provider": "OpenCloud",
|
||||
@@ -70,7 +70,7 @@ func OCMConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]inter
|
||||
"enable_datatx": false,
|
||||
},
|
||||
},
|
||||
"sciencemesh": map[string]interface{}{
|
||||
"sciencemesh": map[string]any{
|
||||
"prefix": cfg.ScienceMesh.Prefix,
|
||||
"smtp_credentials": map[string]string{},
|
||||
"gatewaysvc": cfg.Reva.Address,
|
||||
@@ -78,7 +78,7 @@ func OCMConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]inter
|
||||
"directory_service_urls": cfg.ScienceMesh.DirectoryServiceURLs,
|
||||
"ocm_client_insecure": cfg.ScienceMesh.OCMClientInsecure,
|
||||
"provider_domain": providerDomain,
|
||||
"events": map[string]interface{}{
|
||||
"events": map[string]any{
|
||||
"natsaddress": cfg.Events.Endpoint,
|
||||
"natsclusterid": cfg.Events.Cluster,
|
||||
"tlsinsecure": cfg.Events.TLSInsecure,
|
||||
@@ -87,34 +87,34 @@ func OCMConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]inter
|
||||
"authpassword": cfg.Events.AuthPassword,
|
||||
},
|
||||
},
|
||||
"ocmd": map[string]interface{}{
|
||||
"ocmd": map[string]any{
|
||||
"prefix": cfg.OCMD.Prefix,
|
||||
"gatewaysvc": cfg.Reva.Address,
|
||||
"expose_recipient_display_name": cfg.OCMD.ExposeRecipientDisplayName,
|
||||
},
|
||||
"dataprovider": map[string]interface{}{
|
||||
"dataprovider": map[string]any{
|
||||
"prefix": "data",
|
||||
"driver": "ocmreceived",
|
||||
"drivers": map[string]interface{}{
|
||||
"ocmreceived": map[string]interface{}{
|
||||
"drivers": map[string]any{
|
||||
"ocmreceived": map[string]any{
|
||||
"insecure": cfg.OCMStorageProvider.Insecure,
|
||||
"storage_root": cfg.OCMStorageProvider.StorageRoot,
|
||||
"service_account_id": cfg.ServiceAccount.ID,
|
||||
"service_account_secret": cfg.ServiceAccount.Secret,
|
||||
},
|
||||
},
|
||||
"data_txs": map[string]interface{}{
|
||||
"simple": map[string]interface{}{
|
||||
"data_txs": map[string]any{
|
||||
"simple": map[string]any{
|
||||
"cache_store": "noop",
|
||||
"cache_database": "system",
|
||||
"cache_table": "stat",
|
||||
},
|
||||
"spaces": map[string]interface{}{
|
||||
"spaces": map[string]any{
|
||||
"cache_store": "noop",
|
||||
"cache_database": "system",
|
||||
"cache_table": "stat",
|
||||
},
|
||||
"tus": map[string]interface{}{
|
||||
"tus": map[string]any{
|
||||
"cache_store": "noop",
|
||||
"cache_database": "system",
|
||||
"cache_table": "stat",
|
||||
@@ -123,19 +123,19 @@ func OCMConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]inter
|
||||
},
|
||||
},
|
||||
},
|
||||
"grpc": map[string]interface{}{
|
||||
"grpc": map[string]any{
|
||||
"network": cfg.GRPC.Protocol,
|
||||
"address": cfg.GRPC.Addr,
|
||||
"tls_settings": map[string]interface{}{
|
||||
"tls_settings": map[string]any{
|
||||
"enabled": cfg.GRPC.TLS.Enabled,
|
||||
"certificate": cfg.GRPC.TLS.Cert,
|
||||
"key": cfg.GRPC.TLS.Key,
|
||||
},
|
||||
"services": map[string]interface{}{
|
||||
"ocminvitemanager": map[string]interface{}{
|
||||
"services": map[string]any{
|
||||
"ocminvitemanager": map[string]any{
|
||||
"driver": cfg.OCMInviteManager.Driver,
|
||||
"drivers": map[string]interface{}{
|
||||
"json": map[string]interface{}{
|
||||
"drivers": map[string]any{
|
||||
"json": map[string]any{
|
||||
"file": cfg.OCMInviteManager.Drivers.JSON.File,
|
||||
},
|
||||
},
|
||||
@@ -144,18 +144,18 @@ func OCMConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]inter
|
||||
"ocm_timeout": int(math.Round(cfg.OCMInviteManager.Timeout.Seconds())),
|
||||
"ocm_insecure": cfg.OCMInviteManager.Insecure,
|
||||
},
|
||||
"ocmproviderauthorizer": map[string]interface{}{
|
||||
"ocmproviderauthorizer": map[string]any{
|
||||
"driver": cfg.OCMProviderAuthorizerDriver,
|
||||
"drivers": map[string]interface{}{
|
||||
"json": map[string]interface{}{
|
||||
"drivers": map[string]any{
|
||||
"json": map[string]any{
|
||||
"providers": cfg.OCMProviderAuthorizerDrivers.JSON.Providers,
|
||||
},
|
||||
},
|
||||
},
|
||||
"ocmshareprovider": map[string]interface{}{
|
||||
"ocmshareprovider": map[string]any{
|
||||
"driver": cfg.OCMShareProvider.Driver,
|
||||
"drivers": map[string]interface{}{
|
||||
"json": map[string]interface{}{
|
||||
"drivers": map[string]any{
|
||||
"json": map[string]any{
|
||||
"file": cfg.OCMShareProvider.Drivers.JSON.File,
|
||||
},
|
||||
},
|
||||
@@ -165,28 +165,28 @@ func OCMConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]inter
|
||||
"webapp_template": cfg.OCMShareProvider.WebappTemplate,
|
||||
"client_insecure": cfg.OCMShareProvider.Insecure,
|
||||
},
|
||||
"ocmcore": map[string]interface{}{
|
||||
"ocmcore": map[string]any{
|
||||
"driver": cfg.OCMCore.Driver,
|
||||
"drivers": map[string]interface{}{
|
||||
"json": map[string]interface{}{
|
||||
"drivers": map[string]any{
|
||||
"json": map[string]any{
|
||||
"file": cfg.OCMCore.Drivers.JSON.File,
|
||||
},
|
||||
},
|
||||
},
|
||||
"storageprovider": map[string]interface{}{
|
||||
"storageprovider": map[string]any{
|
||||
"driver": "ocmreceived",
|
||||
"drivers": map[string]interface{}{
|
||||
"ocmreceived": map[string]interface{}{
|
||||
"drivers": map[string]any{
|
||||
"ocmreceived": map[string]any{
|
||||
"insecure": cfg.OCMStorageProvider.Insecure,
|
||||
"storage_root": cfg.OCMStorageProvider.StorageRoot,
|
||||
},
|
||||
},
|
||||
"data_server_url": cfg.OCMStorageProvider.DataServerURL,
|
||||
},
|
||||
"authprovider": map[string]interface{}{
|
||||
"authprovider": map[string]any{
|
||||
"auth_manager": "ocmshares",
|
||||
"auth_managers": map[string]interface{}{
|
||||
"ocmshares": map[string]interface{}{
|
||||
"auth_managers": map[string]any{
|
||||
"ocmshares": map[string]any{
|
||||
"gatewaysvc": cfg.Reva.Address,
|
||||
},
|
||||
},
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user