Compare commits

..

1 Commits

Author SHA1 Message Date
Jörn Friedrich Dreyer
59b6845af5 ocm fixes
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-11-28 15:10:40 +01:00
985 changed files with 9783 additions and 35453 deletions

View File

@@ -1,6 +0,0 @@
{
"repoOwner": "opencloud-eu",
"repoName": "opencloud",
"targetBranchChoices": ["main", "stable-2.0", "stable-4.0"],
"fork": false
}

View File

@@ -36,18 +36,8 @@ ifndef DATE
DATE := $(shell date -u '+%Y%m%d') DATE := $(shell date -u '+%Y%m%d')
endif endif
LDFLAGS += -X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn -s -w \ LDFLAGS += -X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn -s -w -X "$(OC_REPO)/pkg/version.String=$(STRING)" -X "$(OC_REPO)/pkg/version.Tag=$(VERSION)" -X "$(OC_REPO)/pkg/version.Date=$(DATE)"
-X "$(OC_REPO)/pkg/version.Edition=$(EDITION)" \ DEBUG_LDFLAGS += -X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn -X "$(OC_REPO)/pkg/version.String=$(STRING)" -X "$(OC_REPO)/pkg/version.Tag=$(VERSION)" -X "$(OC_REPO)/pkg/version.Date=$(DATE)"
-X "$(OC_REPO)/pkg/version.String=$(STRING)" \
-X "$(OC_REPO)/pkg/version.Tag=$(VERSION)" \
-X "$(OC_REPO)/pkg/version.Date=$(DATE)"
DEBUG_LDFLAGS += -X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn \
-X "$(OC_REPO)/pkg/version.Edition=$(EDITION)" \
-X "$(OC_REPO)/pkg/version.String=$(STRING)" \
-X "$(OC_REPO)/pkg/version.Tag=$(VERSION)" \
-X "$(OC_REPO)/pkg/version.Date=$(DATE)"
DOCKER_LDFLAGS += -X "$(OC_REPO)/pkg/config/defaults.BaseDataPathType=path" -X "$(OC_REPO)/pkg/config/defaults.BaseDataPathValue=/var/lib/opencloud" DOCKER_LDFLAGS += -X "$(OC_REPO)/pkg/config/defaults.BaseDataPathType=path" -X "$(OC_REPO)/pkg/config/defaults.BaseDataPathValue=/var/lib/opencloud"
DOCKER_LDFLAGS += -X "$(OC_REPO)/pkg/config/defaults.BaseConfigPathType=path" -X "$(OC_REPO)/pkg/config/defaults.BaseConfigPathValue=/etc/opencloud" DOCKER_LDFLAGS += -X "$(OC_REPO)/pkg/config/defaults.BaseConfigPathType=path" -X "$(OC_REPO)/pkg/config/defaults.BaseConfigPathValue=/etc/opencloud"

View File

@@ -1,4 +1,4 @@
# The test runner source for UI tests # The test runner source for UI tests
WEB_COMMITID=3120ea384c7a9d1f1ea0c328965951fc06d66900 WEB_COMMITID=3d7367cfb1abe288d0fc0b0b1cc494a7747bcaf6
WEB_BRANCH=main WEB_BRANCH=stable-4.2

View File

File diff suppressed because it is too large Load Diff

View File

@@ -1,116 +1,5 @@
# Changelog # Changelog
## [4.1.0](https://github.com/opencloud-eu/opencloud/releases/tag/v4.1.0) - 2025-12-15
### ❤️ Thanks to all contributors! ❤️
@JammingBen, @ScharfViktor, @Svanvith, @butonic, @flimmy, @fschade, @individual-it, @kulmann, @micbar, @prashant-gurung899, @saw-jan
### 📚 Documentation
- fix typo [[#2024](https://github.com/opencloud-eu/opencloud/pull/2024)]
- [docs] update policies link [[#1996](https://github.com/opencloud-eu/opencloud/pull/1996)]
- fix the link in quickstart script for itself [[#1956](https://github.com/opencloud-eu/opencloud/pull/1956)]
### ✅ Tests
- [full-ci][tests-only] test: fix some test flakiness [[#2003](https://github.com/opencloud-eu/opencloud/pull/2003)]
- [tests-only] Skip test related pipelines for ready-release-go PRs [[#2011](https://github.com/opencloud-eu/opencloud/pull/2011)]
- [full-ci][tests-only] test: add test to check mismatch offset during TUS upload [[#1993](https://github.com/opencloud-eu/opencloud/pull/1993)]
- [full-ci][tests-only] test: proper resource existence check [[#1990](https://github.com/opencloud-eu/opencloud/pull/1990)]
- check propfing after renaming data in file system [[#1809](https://github.com/opencloud-eu/opencloud/pull/1809)]
- fix-get-attribute-test [[#1974](https://github.com/opencloud-eu/opencloud/pull/1974)]
### 📈 Enhancement
- Show edition in opencloud version command [[#2019](https://github.com/opencloud-eu/opencloud/pull/2019)]
### 🐛 Bug Fixes
- fix: enforce trailing slash for server url [[#1995](https://github.com/opencloud-eu/opencloud/pull/1995)]
- fix: enhance resource creation with detailed process information [[#1978](https://github.com/opencloud-eu/opencloud/pull/1978)]
### 📦️ Dependencies
- chore: bump web to v4.3.0 [[#2030](https://github.com/opencloud-eu/opencloud/pull/2030)]
- reva-bump-2.41.0 [[#2032](https://github.com/opencloud-eu/opencloud/pull/2032)]
- build(deps): bump github.com/testcontainers/testcontainers-go from 0.39.0 to 0.40.0 [[#1931](https://github.com/opencloud-eu/opencloud/pull/1931)]
## [4.0.0](https://github.com/opencloud-eu/opencloud/releases/tag/v4.0.0) - 2025-12-01
### ❤️ Thanks to all contributors! ❤️
@AlexAndBear, @MahdiBaghbani, @ScharfViktor, @butonic, @dragonchaser, @flimmy, @fschade, @individual-it, @jnweiger, @kulmann, @micbar, @mikelolasagasti, @pbleser-oc, @rhafer, @schweigisito
### 💥 Breaking changes
- collaboration: Enable `InsertRemoteImage` option [[#1692](https://github.com/opencloud-eu/opencloud/pull/1692)]
### 📚 Documentation
- Fix typos in antivirus README documentation [[#1940](https://github.com/opencloud-eu/opencloud/pull/1940)]
- fix: add missing service README.md files with basic description [[#1859](https://github.com/opencloud-eu/opencloud/pull/1859)]
- Fix README.md files which contain broken or missing links [[#1854](https://github.com/opencloud-eu/opencloud/pull/1854)]
### 🐛 Bug Fixes
- introduce OC_EVENTS_TLS_INSECURE [[#1936](https://github.com/opencloud-eu/opencloud/pull/1936)]
- kill unused env vars [[#1888](https://github.com/opencloud-eu/opencloud/pull/1888)]
- rc-handling was only active for the dryrun, not the real build-and-push [[#1919](https://github.com/opencloud-eu/opencloud/pull/1919)]
- handle objectguid endianess [[#1901](https://github.com/opencloud-eu/opencloud/pull/1901)]
- fix: add update server to default csp rules [[#1875](https://github.com/opencloud-eu/opencloud/pull/1875)]
- fix: add missing capability flag support-radicale [[#1891](https://github.com/opencloud-eu/opencloud/pull/1891)]
- fix opensearch client certificate [[#1890](https://github.com/opencloud-eu/opencloud/pull/1890)]
- Bump reva [[#1882](https://github.com/opencloud-eu/opencloud/pull/1882)]
- load two yaml configs [[#1617](https://github.com/opencloud-eu/opencloud/pull/1617)]
- make user cache tenant aware [[#1732](https://github.com/opencloud-eu/opencloud/pull/1732)]
- fix: sanitise markdow code to make docusaurus happy [[#1851](https://github.com/opencloud-eu/opencloud/pull/1851)]
- update launch.json [[#1843](https://github.com/opencloud-eu/opencloud/pull/1843)]
- docs: Fix auth-app examples in README [[#1844](https://github.com/opencloud-eu/opencloud/pull/1844)]
- fix: fix typo in treesize logging [[#1826](https://github.com/opencloud-eu/opencloud/pull/1826)]
- fix: set global signing secret fallback correctly [[#1781](https://github.com/opencloud-eu/opencloud/pull/1781)]
### 📈 Enhancement
- feat(ocm): add WAYF configuration for reva OCM service [[#1714](https://github.com/opencloud-eu/opencloud/pull/1714)]
- log missing name or id attributes [[#1914](https://github.com/opencloud-eu/opencloud/pull/1914)]
- collabora: Set IsAdminUser and IsAnonymousUser in CheckFileInfo [[#1745](https://github.com/opencloud-eu/opencloud/pull/1745)]
### ✅ Tests
- [full-ci] disable running ci with watch fs when full-ci [[#1902](https://github.com/opencloud-eu/opencloud/pull/1902)]
- api-tests: delete spaces before users [[#1877](https://github.com/opencloud-eu/opencloud/pull/1877)]
- update tika version [[#1872](https://github.com/opencloud-eu/opencloud/pull/1872)]
- add share sync to collaborativePosix suite [[#1806](https://github.com/opencloud-eu/opencloud/pull/1806)]
- removed test virus files from repo [[#1812](https://github.com/opencloud-eu/opencloud/pull/1812)]
- increase timeouts waiting for notification & search [[#1802](https://github.com/opencloud-eu/opencloud/pull/1802)]
- Sync share before action [[#1795](https://github.com/opencloud-eu/opencloud/pull/1795)]
- correct STORAGE_USERS_POSIX_WATCH_FS env typo in CI [[#1746](https://github.com/opencloud-eu/opencloud/pull/1746)]
### 📦️ Dependencies
- [full-ci] revaBump-v2.40.1 [[#1927](https://github.com/opencloud-eu/opencloud/pull/1927)]
- [full-ci] chore: bump web to v4.2.1 [[#1938](https://github.com/opencloud-eu/opencloud/pull/1938)]
- build(deps): bump google.golang.org/grpc from 1.76.0 to 1.77.0 [[#1923](https://github.com/opencloud-eu/opencloud/pull/1923)]
- build(deps): bump github.com/nats-io/nats-server/v2 from 2.12.1 to 2.12.2 [[#1922](https://github.com/opencloud-eu/opencloud/pull/1922)]
- build(deps): bump github.com/kovidgoyal/imaging from 1.7.2 to 1.8.17 [[#1912](https://github.com/opencloud-eu/opencloud/pull/1912)]
- build(deps): bump golang.org/x/crypto from 0.44.0 to 0.45.0 [[#1911](https://github.com/opencloud-eu/opencloud/pull/1911)]
- [decomposed]Update version 4.0.0 rc.2 [[#1917](https://github.com/opencloud-eu/opencloud/pull/1917)]
- chore: bump web to v4.2.1-rc.1 [[#1900](https://github.com/opencloud-eu/opencloud/pull/1900)]
- revaBump-getting#428 [[#1887](https://github.com/opencloud-eu/opencloud/pull/1887)]
- build(deps): bump github.com/blevesearch/bleve/v2 from 2.5.4 to 2.5.5 [[#1884](https://github.com/opencloud-eu/opencloud/pull/1884)]
- build(deps): bump github.com/olekukonko/tablewriter from 1.1.0 to 1.1.1 [[#1869](https://github.com/opencloud-eu/opencloud/pull/1869)]
- build(deps): bump golang.org/x/term from 0.36.0 to 0.37.0 [[#1845](https://github.com/opencloud-eu/opencloud/pull/1845)]
- reva-bump-2.39.2. update opencloud 4.0.0-rc.1 [[#1849](https://github.com/opencloud-eu/opencloud/pull/1849)]
- build(deps): bump golang.org/x/sync from 0.17.0 to 0.18.0 [[#1836](https://github.com/opencloud-eu/opencloud/pull/1836)]
- build(deps): bump golang.org/x/oauth2 from 0.32.0 to 0.33.0 [[#1828](https://github.com/opencloud-eu/opencloud/pull/1828)]
- build(deps): bump github.com/KimMachineGun/automemlimit from 0.7.4 to 0.7.5 [[#1787](https://github.com/opencloud-eu/opencloud/pull/1787)]
- build(deps): bump github.com/open-policy-agent/opa from 1.9.0 to 1.10.1 [[#1788](https://github.com/opencloud-eu/opencloud/pull/1788)]
- Bump reva [[#1786](https://github.com/opencloud-eu/opencloud/pull/1786)]
- build(deps): bump github.com/gabriel-vasile/mimetype from 1.4.10 to 1.4.11 [[#1775](https://github.com/opencloud-eu/opencloud/pull/1775)]
- build(deps): bump github.com/nats-io/nats-server/v2 from 2.12.0 to 2.12.1 [[#1706](https://github.com/opencloud-eu/opencloud/pull/1706)]
- build(deps): bump github.com/onsi/ginkgo/v2 from 2.27.1 to 2.27.2 [[#1754](https://github.com/opencloud-eu/opencloud/pull/1754)]
## [3.7.0](https://github.com/opencloud-eu/opencloud/releases/tag/v3.7.0) - 2025-11-03 ## [3.7.0](https://github.com/opencloud-eu/opencloud/releases/tag/v3.7.0) - 2025-11-03
### ❤️ Thanks to all contributors! ❤️ ### ❤️ Thanks to all contributors! ❤️

View File

@@ -198,10 +198,6 @@ go-mod-tidy:
test: test:
@go test -v -tags '$(TAGS)' -coverprofile coverage.out ./... @go test -v -tags '$(TAGS)' -coverprofile coverage.out ./...
.PHONY: test-with-race
test-with-race:
@go test -race -v -tags '$(TAGS)' -coverprofile coverage.out ./...
.PHONY: go-coverage .PHONY: go-coverage
go-coverage: go-coverage:
@if [ ! -f coverage.out ]; then $(MAKE) test &>/dev/null; fi; @if [ ! -f coverage.out ]; then $(MAKE) test &>/dev/null; fi;

View File

@@ -1,8 +1,8 @@
{ {
"name": "opencloud-eu/opencloud", "name": "opencloud-eu/opencloud",
"config": { "config" : {
"platform": { "platform": {
"php": "8.3" "php": "8.2"
}, },
"vendor-dir": "./vendor-php", "vendor-dir": "./vendor-php",
"allow-plugins": { "allow-plugins": {

View File

@@ -11,7 +11,7 @@ set -euo pipefail
# OC_VERSION: Version to download, e.g. OC_VERSION="1.2.0" # OC_VERSION: Version to download, e.g. OC_VERSION="1.2.0"
# Call this script directly from opencloud: # Call this script directly from opencloud:
# curl -L https://opencloud.eu/install | /bin/bash # curl -L https://opencloud.eu/quickinstall.sh | /bin/bash
# This function is borrowed from openSUSEs /usr/bin/old, thanks. # This function is borrowed from openSUSEs /usr/bin/old, thanks.
function backup_file () { function backup_file () {

View File

@@ -19,11 +19,6 @@ services:
- "--entryPoints.http.http.redirections.entryPoint.to=https" - "--entryPoints.http.http.redirections.entryPoint.to=https"
- "--entryPoints.http.http.redirections.entryPoint.scheme=https" - "--entryPoints.http.http.redirections.entryPoint.scheme=https"
- "--entryPoints.https.address=:443" - "--entryPoints.https.address=:443"
# http2 optimizations
- "--entryPoints.https.http2.maxConcurrentStreams=512"
- "--serversTransport.maxIdleConnsPerHost=100"
# allow self signed certificate from OpenCloud
- "--serversTransport.insecureSkipVerify=true"
# change default timeouts for long-running requests # change default timeouts for long-running requests
# this is needed for webdav clients that do not support the TUS protocol # this is needed for webdav clients that do not support the TUS protocol
- "--entryPoints.https.transport.respondingTimeouts.readTimeout=12h" - "--entryPoints.https.transport.respondingTimeouts.readTimeout=12h"

View File

@@ -25,7 +25,7 @@ services:
OC_LOG_COLOR: "${LOG_PRETTY:-false}" OC_LOG_COLOR: "${LOG_PRETTY:-false}"
OC_LOG_PRETTY: "${LOG_PRETTY:-false}" OC_LOG_PRETTY: "${LOG_PRETTY:-false}"
# do not use SSL between Traefik and OpenCloud # do not use SSL between Traefik and OpenCloud
PROXY_TLS: "true" PROXY_TLS: "false"
# make the REVA gateway accessible to the app drivers # make the REVA gateway accessible to the app drivers
GATEWAY_GRPC_ADDR: 0.0.0.0:9142 GATEWAY_GRPC_ADDR: 0.0.0.0:9142
# INSECURE: needed if OpenCloud / Traefik is using self generated certificates # INSECURE: needed if OpenCloud / Traefik is using self generated certificates
@@ -72,7 +72,6 @@ services:
- "traefik.http.routers.opencloud.tls.certresolver=http" - "traefik.http.routers.opencloud.tls.certresolver=http"
- "traefik.http.routers.opencloud.service=opencloud" - "traefik.http.routers.opencloud.service=opencloud"
- "traefik.http.services.opencloud.loadbalancer.server.port=9200" - "traefik.http.services.opencloud.loadbalancer.server.port=9200"
- "traefik.http.services.opencloud.loadbalancer.server.scheme=https"
logging: logging:
driver: ${LOG_DRIVER:-local} driver: ${LOG_DRIVER:-local}
restart: always restart: always

74
go.mod
View File

@@ -47,7 +47,7 @@ require (
github.com/jellydator/ttlcache/v3 v3.4.0 github.com/jellydator/ttlcache/v3 v3.4.0
github.com/jinzhu/now v1.1.5 github.com/jinzhu/now v1.1.5
github.com/justinas/alice v1.2.0 github.com/justinas/alice v1.2.0
github.com/kovidgoyal/imaging v1.8.18 github.com/kovidgoyal/imaging v1.8.17
github.com/leonelquinteros/gotext v1.7.2 github.com/leonelquinteros/gotext v1.7.2
github.com/libregraph/idm v0.5.0 github.com/libregraph/idm v0.5.0
github.com/libregraph/lico v0.66.0 github.com/libregraph/lico v0.66.0
@@ -61,11 +61,11 @@ require (
github.com/onsi/ginkgo v1.16.5 github.com/onsi/ginkgo v1.16.5
github.com/onsi/ginkgo/v2 v2.27.2 github.com/onsi/ginkgo/v2 v2.27.2
github.com/onsi/gomega v1.38.2 github.com/onsi/gomega v1.38.2
github.com/open-policy-agent/opa v1.11.1 github.com/open-policy-agent/opa v1.10.1
github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89 github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76 github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76
github.com/opencloud-eu/reva/v2 v2.41.0 github.com/opencloud-eu/reva/v2 v2.39.3
github.com/opensearch-project/opensearch-go/v4 v4.6.0 github.com/opensearch-project/opensearch-go/v4 v4.5.0
github.com/orcaman/concurrent-map v1.0.0 github.com/orcaman/concurrent-map v1.0.0
github.com/pkg/errors v0.9.1 github.com/pkg/errors v0.9.1
github.com/pkg/xattr v0.4.12 github.com/pkg/xattr v0.4.12
@@ -78,18 +78,17 @@ require (
github.com/sirupsen/logrus v1.9.4-0.20230606125235-dd1b4c2e81af github.com/sirupsen/logrus v1.9.4-0.20230606125235-dd1b4c2e81af
github.com/spf13/afero v1.15.0 github.com/spf13/afero v1.15.0
github.com/spf13/cobra v1.10.1 github.com/spf13/cobra v1.10.1
github.com/spf13/pflag v1.0.10
github.com/spf13/viper v1.21.0
github.com/stretchr/testify v1.11.1 github.com/stretchr/testify v1.11.1
github.com/test-go/testify v1.1.4 github.com/test-go/testify v1.1.4
github.com/testcontainers/testcontainers-go v0.40.0 github.com/testcontainers/testcontainers-go v0.39.0
github.com/testcontainers/testcontainers-go/modules/opensearch v0.40.0 github.com/testcontainers/testcontainers-go/modules/opensearch v0.39.0
github.com/theckman/yacspin v0.13.12 github.com/theckman/yacspin v0.13.12
github.com/thejerf/suture/v4 v4.0.6 github.com/thejerf/suture/v4 v4.0.6
github.com/tidwall/gjson v1.18.0 github.com/tidwall/gjson v1.18.0
github.com/tidwall/sjson v1.2.5 github.com/tidwall/sjson v1.2.5
github.com/tus/tusd/v2 v2.8.0 github.com/tus/tusd/v2 v2.8.0
github.com/unrolled/secure v1.16.0 github.com/unrolled/secure v1.16.0
github.com/urfave/cli/v2 v2.27.7
github.com/vmihailenco/msgpack/v5 v5.4.1 github.com/vmihailenco/msgpack/v5 v5.4.1
github.com/xhit/go-simple-mail/v2 v2.16.0 github.com/xhit/go-simple-mail/v2 v2.16.0
go-micro.dev/v4 v4.11.0 go-micro.dev/v4 v4.11.0
@@ -97,21 +96,21 @@ require (
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0
go.opentelemetry.io/contrib/zpages v0.63.0 go.opentelemetry.io/contrib/zpages v0.63.0
go.opentelemetry.io/otel v1.39.0 go.opentelemetry.io/otel v1.38.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.38.0 go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.38.0
go.opentelemetry.io/otel/sdk v1.39.0 go.opentelemetry.io/otel/sdk v1.38.0
go.opentelemetry.io/otel/trace v1.39.0 go.opentelemetry.io/otel/trace v1.38.0
golang.org/x/crypto v0.46.0 golang.org/x/crypto v0.45.0
golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac
golang.org/x/image v0.34.0 golang.org/x/image v0.33.0
golang.org/x/net v0.48.0 golang.org/x/net v0.47.0
golang.org/x/oauth2 v0.33.0 golang.org/x/oauth2 v0.33.0
golang.org/x/sync v0.19.0 golang.org/x/sync v0.18.0
golang.org/x/term v0.38.0 golang.org/x/term v0.37.0
golang.org/x/text v0.32.0 golang.org/x/text v0.31.0
google.golang.org/genproto/googleapis/api v0.0.0-20251029180050-ab9386a59fda google.golang.org/genproto/googleapis/api v0.0.0-20251022142026-3a174f9686a8
google.golang.org/grpc v1.78.0 google.golang.org/grpc v1.77.0
google.golang.org/protobuf v1.36.10 google.golang.org/protobuf v1.36.10
gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1 gopkg.in/yaml.v3 v3.0.1
@@ -172,7 +171,7 @@ require (
github.com/containerd/errdefs v1.0.0 // indirect github.com/containerd/errdefs v1.0.0 // indirect
github.com/containerd/errdefs/pkg v0.3.0 // indirect github.com/containerd/errdefs/pkg v0.3.0 // indirect
github.com/containerd/log v0.1.0 // indirect github.com/containerd/log v0.1.0 // indirect
github.com/containerd/platforms v1.0.0-rc.2 // indirect github.com/containerd/platforms v1.0.0-rc.1 // indirect
github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-semver v0.3.1 // indirect
github.com/coreos/go-systemd/v22 v22.6.0 // indirect github.com/coreos/go-systemd/v22 v22.6.0 // indirect
github.com/cornelk/hashmap v1.0.8 // indirect github.com/cornelk/hashmap v1.0.8 // indirect
@@ -190,7 +189,7 @@ require (
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/distribution/reference v0.6.0 // indirect github.com/distribution/reference v0.6.0 // indirect
github.com/dlclark/regexp2 v1.4.0 // indirect github.com/dlclark/regexp2 v1.4.0 // indirect
github.com/docker/docker v28.5.1+incompatible // indirect github.com/docker/docker v28.3.3+incompatible // indirect
github.com/docker/go-connections v0.6.0 // indirect github.com/docker/go-connections v0.6.0 // indirect
github.com/docker/go-units v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect github.com/dustin/go-humanize v1.0.1 // indirect
@@ -237,7 +236,7 @@ require (
github.com/gofrs/uuid v4.4.0+incompatible // indirect github.com/gofrs/uuid v4.4.0+incompatible // indirect
github.com/gogo/protobuf v1.3.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/snappy v0.0.4 // indirect github.com/golang/snappy v0.0.4 // indirect
github.com/gomodule/redigo v1.9.3 // indirect github.com/gomodule/redigo v1.9.3 // indirect
github.com/google/go-querystring v1.1.0 // indirect github.com/google/go-querystring v1.1.0 // indirect
@@ -271,7 +270,7 @@ require (
github.com/lestrrat-go/dsig-secp256k1 v1.0.0 // indirect github.com/lestrrat-go/dsig-secp256k1 v1.0.0 // indirect
github.com/lestrrat-go/httpcc v1.0.1 // indirect github.com/lestrrat-go/httpcc v1.0.1 // indirect
github.com/lestrrat-go/httprc/v3 v3.0.1 // indirect github.com/lestrrat-go/httprc/v3 v3.0.1 // indirect
github.com/lestrrat-go/jwx/v3 v3.0.12 // indirect github.com/lestrrat-go/jwx/v3 v3.0.11 // indirect
github.com/lestrrat-go/option v1.0.1 // indirect github.com/lestrrat-go/option v1.0.1 // indirect
github.com/lestrrat-go/option/v2 v2.0.0 // indirect github.com/lestrrat-go/option/v2 v2.0.0 // indirect
github.com/libregraph/oidc-go v1.1.0 // indirect github.com/libregraph/oidc-go v1.1.0 // indirect
@@ -302,7 +301,7 @@ require (
github.com/moby/sys/userns v0.1.0 // indirect github.com/moby/sys/userns v0.1.0 // indirect
github.com/moby/term v0.5.0 // indirect github.com/moby/term v0.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/morikuni/aec v1.0.0 // indirect github.com/morikuni/aec v1.0.0 // indirect
github.com/mschoch/smat v0.2.0 // indirect github.com/mschoch/smat v0.2.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
@@ -320,7 +319,6 @@ require (
github.com/pablodz/inotifywaitgo v0.0.9 // indirect github.com/pablodz/inotifywaitgo v0.0.9 // indirect
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/philhofer/fwd v1.2.0 // indirect github.com/philhofer/fwd v1.2.0 // indirect
github.com/pierrec/lz4/v4 v4.1.15 // indirect github.com/pierrec/lz4/v4 v4.1.15 // indirect
github.com/pjbgf/sha1cd v0.3.2 // indirect github.com/pjbgf/sha1cd v0.3.2 // indirect
@@ -337,11 +335,10 @@ require (
github.com/russellhaering/goxmldsig v1.5.0 // indirect github.com/russellhaering/goxmldsig v1.5.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd // indirect github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd // indirect
github.com/sagikazarmark/locafero v0.11.0 // indirect
github.com/samber/lo v1.51.0 // indirect github.com/samber/lo v1.51.0 // indirect
github.com/samber/slog-common v0.19.0 // indirect github.com/samber/slog-common v0.19.0 // indirect
github.com/samber/slog-zerolog/v2 v2.9.0 // indirect github.com/samber/slog-zerolog/v2 v2.9.0 // indirect
github.com/segmentio/asm v1.2.1 // indirect github.com/segmentio/asm v1.2.0 // indirect
github.com/segmentio/kafka-go v0.4.49 // indirect github.com/segmentio/kafka-go v0.4.49 // indirect
github.com/segmentio/ksuid v1.0.4 // indirect github.com/segmentio/ksuid v1.0.4 // indirect
github.com/sercand/kuberesolver/v5 v5.1.1 // indirect github.com/sercand/kuberesolver/v5 v5.1.1 // indirect
@@ -353,12 +350,10 @@ require (
github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c // indirect github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c // indirect
github.com/shurcooL/vfsgen v0.0.0-20230704071429-0000e147ea92 // indirect github.com/shurcooL/vfsgen v0.0.0-20230704071429-0000e147ea92 // indirect
github.com/skeema/knownhosts v1.3.0 // indirect github.com/skeema/knownhosts v1.3.0 // indirect
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
github.com/spacewander/go-suffix-tree v0.0.0-20191010040751-0865e368c784 // indirect github.com/spacewander/go-suffix-tree v0.0.0-20191010040751-0865e368c784 // indirect
github.com/spf13/cast v1.10.0 // indirect github.com/spf13/pflag v1.0.10 // indirect
github.com/stretchr/objx v0.5.2 // indirect github.com/stretchr/objx v0.5.2 // indirect
github.com/studio-b12/gowebdav v0.9.0 // indirect github.com/studio-b12/gowebdav v0.9.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/tchap/go-patricia/v2 v2.3.3 // indirect github.com/tchap/go-patricia/v2 v2.3.3 // indirect
github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect
@@ -367,9 +362,8 @@ require (
github.com/tklauser/numcpus v0.8.0 // indirect github.com/tklauser/numcpus v0.8.0 // indirect
github.com/toorop/go-dkim v0.0.0-20201103131630-e1cd1a0a5208 // indirect github.com/toorop/go-dkim v0.0.0-20201103131630-e1cd1a0a5208 // indirect
github.com/trustelem/zxcvbn v1.0.1 // indirect github.com/trustelem/zxcvbn v1.0.1 // indirect
github.com/urfave/cli/v2 v2.27.7 // indirect
github.com/valyala/fastjson v1.6.4 // indirect github.com/valyala/fastjson v1.6.4 // indirect
github.com/vektah/gqlparser/v2 v2.5.31 // indirect github.com/vektah/gqlparser/v2 v2.5.30 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/wk8/go-ordered-map v1.0.0 // indirect github.com/wk8/go-ordered-map v1.0.0 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect
@@ -378,24 +372,24 @@ require (
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
github.com/yashtewari/glob-intersection v0.2.0 // indirect github.com/yashtewari/glob-intersection v0.2.0 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.etcd.io/etcd/api/v3 v3.6.6 // indirect go.etcd.io/etcd/api/v3 v3.6.5 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.6.6 // indirect go.etcd.io/etcd/client/pkg/v3 v3.6.5 // indirect
go.etcd.io/etcd/client/v3 v3.6.6 // indirect go.etcd.io/etcd/client/v3 v3.6.5 // indirect
go.opencensus.io v0.24.0 // indirect go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 // indirect
go.opentelemetry.io/otel/metric v1.39.0 // indirect go.opentelemetry.io/otel/metric v1.38.0 // indirect
go.opentelemetry.io/proto/otlp v1.7.1 // indirect go.opentelemetry.io/proto/otlp v1.7.1 // indirect
go.uber.org/multierr v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect go.uber.org/zap v1.27.0 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect go.yaml.in/yaml/v2 v2.4.3 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/mod v0.30.0 // indirect golang.org/x/mod v0.29.0 // indirect
golang.org/x/sys v0.39.0 // indirect golang.org/x/sys v0.38.0 // indirect
golang.org/x/time v0.14.0 // indirect golang.org/x/time v0.14.0 // indirect
golang.org/x/tools v0.39.0 // indirect golang.org/x/tools v0.38.0 // indirect
google.golang.org/genproto v0.0.0-20250303144028-a0af3efb3deb // indirect google.golang.org/genproto v0.0.0-20250303144028-a0af3efb3deb // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20251029180050-ab9386a59fda // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8 // indirect
gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect

148
go.sum
View File

@@ -198,8 +198,8 @@ github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/
github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c= github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c=
github.com/butonic/go-micro/v4 v4.11.1-0.20241115112658-b5d4de5ed9b3 h1:h8Z0hBv5tg/uZMKu8V47+DKWYVQg0lYP8lXDQq7uRpE= github.com/butonic/go-micro/v4 v4.11.1-0.20241115112658-b5d4de5ed9b3 h1:h8Z0hBv5tg/uZMKu8V47+DKWYVQg0lYP8lXDQq7uRpE=
github.com/butonic/go-micro/v4 v4.11.1-0.20241115112658-b5d4de5ed9b3/go.mod h1:eE/tD53n3KbVrzrWxKLxdkGw45Fg1qaNLWjpJMvIUF4= github.com/butonic/go-micro/v4 v4.11.1-0.20241115112658-b5d4de5ed9b3/go.mod h1:eE/tD53n3KbVrzrWxKLxdkGw45Fg1qaNLWjpJMvIUF4=
github.com/bytecodealliance/wasmtime-go/v39 v39.0.1 h1:RibaT47yiyCRxMOj/l2cvL8cWiWBSqDXHyqsa9sGcCE= github.com/bytecodealliance/wasmtime-go/v37 v37.0.0 h1:DPjdn2V3JhXHMoZ2ymRqGK+y1bDyr9wgpyYCvhjMky8=
github.com/bytecodealliance/wasmtime-go/v39 v39.0.1/go.mod h1:miR4NYIEBXeDNamZIzpskhJ0z/p8al+lwMWylQ/ZJb4= github.com/bytecodealliance/wasmtime-go/v37 v37.0.0/go.mod h1:Pf1l2JCTUFMnOqDIwkjzx1qfVJ09xbaXETKgRVE4jZ0=
github.com/c-bata/go-prompt v0.2.5/go.mod h1:vFnjEGDIIA/Lib7giyE4E9c50Lvl8j0S+7FVlAwDAVw= github.com/c-bata/go-prompt v0.2.5/go.mod h1:vFnjEGDIIA/Lib7giyE4E9c50Lvl8j0S+7FVlAwDAVw=
github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4=
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
@@ -239,8 +239,8 @@ github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151X
github.com/containerd/errdefs/pkg v0.3.0/go.mod h1:NJw6s9HwNuRhnjJhM7pylWwMyAkmCQvQ4GpJHEqRLVk= github.com/containerd/errdefs/pkg v0.3.0/go.mod h1:NJw6s9HwNuRhnjJhM7pylWwMyAkmCQvQ4GpJHEqRLVk=
github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=
github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo=
github.com/containerd/platforms v1.0.0-rc.2 h1:0SPgaNZPVWGEi4grZdV8VRYQn78y+nm6acgLGv/QzE4= github.com/containerd/platforms v1.0.0-rc.1 h1:83KIq4yy1erSRgOVHNk1HYdPvzdJ5CnsWaRoJX4C41E=
github.com/containerd/platforms v1.0.0-rc.2/go.mod h1:J71L7B+aiM5SdIEqmd9wp6THLVRzJGXfNuWCZCllLA4= github.com/containerd/platforms v1.0.0-rc.1/go.mod h1:J71L7B+aiM5SdIEqmd9wp6THLVRzJGXfNuWCZCllLA4=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/go-oidc/v3 v3.17.0 h1:hWBGaQfbi0iVviX4ibC7bk8OKT5qNr4klBaCHVNvehc= github.com/coreos/go-oidc/v3 v3.17.0 h1:hWBGaQfbi0iVviX4ibC7bk8OKT5qNr4klBaCHVNvehc=
@@ -310,8 +310,8 @@ github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E
github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
github.com/dnsimple/dnsimple-go v0.63.0/go.mod h1:O5TJ0/U6r7AfT8niYNlmohpLbCSG+c71tQlGr9SeGrg= github.com/dnsimple/dnsimple-go v0.63.0/go.mod h1:O5TJ0/U6r7AfT8niYNlmohpLbCSG+c71tQlGr9SeGrg=
github.com/docker/docker v28.5.1+incompatible h1:Bm8DchhSD2J6PsFzxC35TZo4TLGR2PdW/E69rU45NhM= github.com/docker/docker v28.3.3+incompatible h1:Dypm25kh4rmk49v1eiVbsAtpAsYURjYkaKubwuBdxEI=
github.com/docker/docker v28.5.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v28.3.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94= github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94=
github.com/docker/go-connections v0.6.0/go.mod h1:AahvXYshr6JgfUJGdDCs2b5EZG/vmaMAntpSFH5BFKE= github.com/docker/go-connections v0.6.0/go.mod h1:AahvXYshr6JgfUJGdDCs2b5EZG/vmaMAntpSFH5BFKE=
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
@@ -352,8 +352,6 @@ github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8
github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
github.com/foxcpp/go-mockdns v1.1.0 h1:jI0rD8M0wuYAxL7r/ynTrCQQq0BVqfB99Vgk7DlmewI= github.com/foxcpp/go-mockdns v1.1.0 h1:jI0rD8M0wuYAxL7r/ynTrCQQq0BVqfB99Vgk7DlmewI=
github.com/foxcpp/go-mockdns v1.1.0/go.mod h1:IhLeSFGed3mJIAXPH2aiRQB+kqz7oqu8ld2qVbOu7Wk= github.com/foxcpp/go-mockdns v1.1.0/go.mod h1:IhLeSFGed3mJIAXPH2aiRQB+kqz7oqu8ld2qVbOu7Wk=
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
@@ -511,9 +509,8 @@ github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4er
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ=
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
@@ -745,8 +742,8 @@ github.com/kovidgoyal/go-parallel v1.1.1 h1:1OzpNjtrUkBPq3UaqrnvOoB2F9RttSt811ui
github.com/kovidgoyal/go-parallel v1.1.1/go.mod h1:BJNIbe6+hxyFWv7n6oEDPj3PA5qSw5OCtf0hcVxWJiw= github.com/kovidgoyal/go-parallel v1.1.1/go.mod h1:BJNIbe6+hxyFWv7n6oEDPj3PA5qSw5OCtf0hcVxWJiw=
github.com/kovidgoyal/go-shm v1.0.0 h1:HJEel9D1F9YhULvClEHJLawoRSj/1u/EDV7MJbBPgQo= github.com/kovidgoyal/go-shm v1.0.0 h1:HJEel9D1F9YhULvClEHJLawoRSj/1u/EDV7MJbBPgQo=
github.com/kovidgoyal/go-shm v1.0.0/go.mod h1:Yzb80Xf9L3kaoB2RGok9hHwMIt7Oif61kT6t3+VnZds= github.com/kovidgoyal/go-shm v1.0.0/go.mod h1:Yzb80Xf9L3kaoB2RGok9hHwMIt7Oif61kT6t3+VnZds=
github.com/kovidgoyal/imaging v1.8.18 h1:42JCqJnQBzBo0hGllLEJVYDARWXPP9MT3HgiTno9Chc= github.com/kovidgoyal/imaging v1.8.17 h1:IDc7lbN2Qrn8s50y7Zt355HhOc+jUpvsScYAaGCW8vs=
github.com/kovidgoyal/imaging v1.8.18/go.mod h1:bqjHpeAxSuTLvKob6HuqAr9td2wP9G54Snbgd+1QLoU= github.com/kovidgoyal/imaging v1.8.17/go.mod h1:uD4XKN42lLV9du0TsPkwi53yw23vz/qDmfpiDWCSUCE=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
@@ -777,8 +774,8 @@ github.com/lestrrat-go/httpcc v1.0.1 h1:ydWCStUeJLkpYyjLDHihupbn2tYmZ7m22BGkcvZZ
github.com/lestrrat-go/httpcc v1.0.1/go.mod h1:qiltp3Mt56+55GPVCbTdM9MlqhvzyuL6W/NMDA8vA5E= github.com/lestrrat-go/httpcc v1.0.1/go.mod h1:qiltp3Mt56+55GPVCbTdM9MlqhvzyuL6W/NMDA8vA5E=
github.com/lestrrat-go/httprc/v3 v3.0.1 h1:3n7Es68YYGZb2Jf+k//llA4FTZMl3yCwIjFIk4ubevI= github.com/lestrrat-go/httprc/v3 v3.0.1 h1:3n7Es68YYGZb2Jf+k//llA4FTZMl3yCwIjFIk4ubevI=
github.com/lestrrat-go/httprc/v3 v3.0.1/go.mod h1:2uAvmbXE4Xq8kAUjVrZOq1tZVYYYs5iP62Cmtru00xk= github.com/lestrrat-go/httprc/v3 v3.0.1/go.mod h1:2uAvmbXE4Xq8kAUjVrZOq1tZVYYYs5iP62Cmtru00xk=
github.com/lestrrat-go/jwx/v3 v3.0.12 h1:p25r68Y4KrbBdYjIsQweYxq794CtGCzcrc5dGzJIRjg= github.com/lestrrat-go/jwx/v3 v3.0.11 h1:yEeUGNUuNjcez/Voxvr7XPTYNraSQTENJgtVTfwvG/w=
github.com/lestrrat-go/jwx/v3 v3.0.12/go.mod h1:HiUSaNmMLXgZ08OmGBaPVvoZQgJVOQphSrGr5zMamS8= github.com/lestrrat-go/jwx/v3 v3.0.11/go.mod h1:XSOAh2SiXm0QgRe3DulLZLyt+wUuEdFo81zuKTLcvgQ=
github.com/lestrrat-go/option v1.0.1 h1:oAzP2fvZGQKWkvHa1/SAcFolBEca1oN+mQ7eooNBEYU= github.com/lestrrat-go/option v1.0.1 h1:oAzP2fvZGQKWkvHa1/SAcFolBEca1oN+mQ7eooNBEYU=
github.com/lestrrat-go/option v1.0.1/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= github.com/lestrrat-go/option v1.0.1/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I=
github.com/lestrrat-go/option/v2 v2.0.0 h1:XxrcaJESE1fokHy3FpaQ/cXW8ZsIdWcdFzzLOcID3Ss= github.com/lestrrat-go/option/v2 v2.0.0 h1:XxrcaJESE1fokHy3FpaQ/cXW8ZsIdWcdFzzLOcID3Ss=
@@ -898,9 +895,8 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8=
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
@@ -957,8 +953,8 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A= github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A=
github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k= github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k=
github.com/open-policy-agent/opa v1.11.1 h1:4bMlG6DjRZTRAswRyF+KUCgxHu1Gsk0h9EbZ4W9REvM= github.com/open-policy-agent/opa v1.10.1 h1:haIvxZSPky8HLjRrvQwWAjCPLg8JDFSZMbbG4yyUHgY=
github.com/open-policy-agent/opa v1.11.1/go.mod h1:QimuJO4T3KYxWzrmAymqlFvsIanCjKrGjmmC8GgAdgE= github.com/open-policy-agent/opa v1.10.1/go.mod h1:7uPI3iRpOalJ0BhK6s1JALWPU9HvaV1XeBSSMZnr/PM=
github.com/opencloud-eu/go-micro-plugins/v4/store/nats-js-kv v0.0.0-20250512152754-23325793059a h1:Sakl76blJAaM6NxylVkgSzktjo2dS504iDotEFJsh3M= github.com/opencloud-eu/go-micro-plugins/v4/store/nats-js-kv v0.0.0-20250512152754-23325793059a h1:Sakl76blJAaM6NxylVkgSzktjo2dS504iDotEFJsh3M=
github.com/opencloud-eu/go-micro-plugins/v4/store/nats-js-kv v0.0.0-20250512152754-23325793059a/go.mod h1:pjcozWijkNPbEtX5SIQaxEW/h8VAVZYTLx+70bmB3LY= github.com/opencloud-eu/go-micro-plugins/v4/store/nats-js-kv v0.0.0-20250512152754-23325793059a/go.mod h1:pjcozWijkNPbEtX5SIQaxEW/h8VAVZYTLx+70bmB3LY=
github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89 h1:W1ms+lP5lUUIzjRGDg93WrQfZJZCaV1ZP3KeyXi8bzY= github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89 h1:W1ms+lP5lUUIzjRGDg93WrQfZJZCaV1ZP3KeyXi8bzY=
@@ -967,14 +963,14 @@ 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/inotifywaitgo v0.0.0-20251111171128-a390bae3c5e9/go.mod h1:JWyDC6H+5oZRdUJUgKuaye+8Ph5hEs6HVzVoPKzWSGI=
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76 h1:vD/EdfDUrv4omSFjrinT8Mvf+8D7f9g4vgQ2oiDrVUI= github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76 h1:vD/EdfDUrv4omSFjrinT8Mvf+8D7f9g4vgQ2oiDrVUI=
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76/go.mod h1:pzatilMEHZFT3qV7C/X3MqOa3NlRQuYhlRhZTL+hN6Q= github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76/go.mod h1:pzatilMEHZFT3qV7C/X3MqOa3NlRQuYhlRhZTL+hN6Q=
github.com/opencloud-eu/reva/v2 v2.41.0 h1:oie8+sxcA+drREXRTqm0LmfUdy/mmaa6pA6wkdF6tF4= github.com/opencloud-eu/reva/v2 v2.39.3 h1:/9NW08Bpy1GaNAPo8HrlyT21Flj8uNnOUyWLud1ehGc=
github.com/opencloud-eu/reva/v2 v2.41.0/go.mod h1:DGH08n2mvtsQLkt8o15FV6m51FwSJJGhjR8Ty+iIJww= github.com/opencloud-eu/reva/v2 v2.39.3/go.mod h1:kkGiMeEVR59VjDsmWIczWqRcwK8cy9ogTd/u802U3NI=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=
github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M=
github.com/opensearch-project/opensearch-go/v4 v4.6.0 h1:Ac8aLtDSmLEyOmv0r1qhQLw3b4vcUhE42NE9k+Z4cRc= github.com/opensearch-project/opensearch-go/v4 v4.5.0 h1:26XckmmF6MhlXt91Bu1yY6R51jy1Ns/C3XgIfvyeTRo=
github.com/opensearch-project/opensearch-go/v4 v4.6.0/go.mod h1:3iZtb4SNt3IzaxavKq0dURh1AmtVgYW71E4XqmYnIiQ= github.com/opensearch-project/opensearch-go/v4 v4.5.0/go.mod h1:VmFc7dqOEM3ZtLhrpleOzeq+cqUgNabqQG5gX0xId64=
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
@@ -992,8 +988,6 @@ github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2D
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc=
github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=
github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 h1:Ii+DKncOVM8Cu1Hc+ETb5K+23HdAMvESYE3ZJ5b5cMI= github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 h1:Ii+DKncOVM8Cu1Hc+ETb5K+23HdAMvESYE3ZJ5b5cMI=
github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE=
github.com/philhofer/fwd v1.2.0 h1:e6DnBTl7vGY+Gz322/ASL4Gyp1FspeMvx1RNDoToZuM= github.com/philhofer/fwd v1.2.0 h1:e6DnBTl7vGY+Gz322/ASL4Gyp1FspeMvx1RNDoToZuM=
@@ -1099,8 +1093,6 @@ github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd h1:CmH9+J6ZSsIjUK
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk= github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/sacloud/libsacloud v1.36.2/go.mod h1:P7YAOVmnIn3DKHqCZcUKYUXmSwGBm3yS7IBEjKVSrjg= github.com/sacloud/libsacloud v1.36.2/go.mod h1:P7YAOVmnIn3DKHqCZcUKYUXmSwGBm3yS7IBEjKVSrjg=
github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc=
github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik=
github.com/samber/lo v1.51.0 h1:kysRYLbHy/MB7kQZf5DSN50JHmMsNEdeY24VzJFu7wI= github.com/samber/lo v1.51.0 h1:kysRYLbHy/MB7kQZf5DSN50JHmMsNEdeY24VzJFu7wI=
github.com/samber/lo v1.51.0/go.mod h1:4+MXEGsJzbKGaUEQFKBq2xtfuznW9oz/WrgyzMzRoM0= github.com/samber/lo v1.51.0/go.mod h1:4+MXEGsJzbKGaUEQFKBq2xtfuznW9oz/WrgyzMzRoM0=
github.com/samber/slog-common v0.19.0 h1:fNcZb8B2uOLooeYwFpAlKjkQTUafdjfqKcwcC89G9YI= github.com/samber/slog-common v0.19.0 h1:fNcZb8B2uOLooeYwFpAlKjkQTUafdjfqKcwcC89G9YI=
@@ -1109,8 +1101,8 @@ github.com/samber/slog-zerolog/v2 v2.9.0 h1:6LkOabJmZdNLaUWkTC3IVVA+dq7b/V0FM6lz
github.com/samber/slog-zerolog/v2 v2.9.0/go.mod h1:gnQW9VnCfM34v2pRMUIGMsZOVbYLqY/v0Wxu6atSVGc= github.com/samber/slog-zerolog/v2 v2.9.0/go.mod h1:gnQW9VnCfM34v2pRMUIGMsZOVbYLqY/v0Wxu6atSVGc=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210127161313-bd30bebeac4f/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210127161313-bd30bebeac4f/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8=
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
github.com/segmentio/asm v1.2.1 h1:DTNbBqs57ioxAD4PrArqftgypG4/qNpXoJx8TVXxPR0= github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys=
github.com/segmentio/asm v1.2.1/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs=
github.com/segmentio/kafka-go v0.4.49 h1:GJiNX1d/g+kG6ljyJEoi9++PUMdXGAxb7JGPiDCuNmk= github.com/segmentio/kafka-go v0.4.49 h1:GJiNX1d/g+kG6ljyJEoi9++PUMdXGAxb7JGPiDCuNmk=
github.com/segmentio/kafka-go v0.4.49/go.mod h1:Y1gn60kzLEEaW28YshXyk2+VCUKbJ3Qr6DrnT3i4+9E= github.com/segmentio/kafka-go v0.4.49/go.mod h1:Y1gn60kzLEEaW28YshXyk2+VCUKbJ3Qr6DrnT3i4+9E=
github.com/segmentio/ksuid v1.0.4 h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c= github.com/segmentio/ksuid v1.0.4 h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c=
@@ -1150,8 +1142,6 @@ github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:s
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/smartystreets/gunit v1.0.4/go.mod h1:EH5qMBab2UclzXUcpR8b93eHsIlp9u+pDQIRp5DZNzQ= github.com/smartystreets/gunit v1.0.4/go.mod h1:EH5qMBab2UclzXUcpR8b93eHsIlp9u+pDQIRp5DZNzQ=
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw=
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U=
github.com/spacewander/go-suffix-tree v0.0.0-20191010040751-0865e368c784 h1:0jjO3HdJfOn6gYHD/ZNZh0LLMxEAqkYX7xoDPQReEgs= github.com/spacewander/go-suffix-tree v0.0.0-20191010040751-0865e368c784 h1:0jjO3HdJfOn6gYHD/ZNZh0LLMxEAqkYX7xoDPQReEgs=
github.com/spacewander/go-suffix-tree v0.0.0-20191010040751-0865e368c784/go.mod h1:ff/5myEGgtsAwf26goQCO905GrEm5ugEZSd6OWTsrhM= github.com/spacewander/go-suffix-tree v0.0.0-20191010040751-0865e368c784/go.mod h1:ff/5myEGgtsAwf26goQCO905GrEm5ugEZSd6OWTsrhM=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
@@ -1161,8 +1151,6 @@ github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I=
github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY=
github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo=
github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI=
github.com/spf13/cobra v1.10.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s= github.com/spf13/cobra v1.10.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s=
github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0= github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0=
@@ -1175,8 +1163,6 @@ github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU=
github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
@@ -1198,16 +1184,14 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/tchap/go-patricia/v2 v2.3.3 h1:xfNEsODumaEcCcY3gI0hYPZ/PcpVv5ju6RMAhgwZDDc= github.com/tchap/go-patricia/v2 v2.3.3 h1:xfNEsODumaEcCcY3gI0hYPZ/PcpVv5ju6RMAhgwZDDc=
github.com/tchap/go-patricia/v2 v2.3.3/go.mod h1:VZRHKAb53DLaG+nA9EaYYiaEx6YztwDlLElMsnSHD4k= github.com/tchap/go-patricia/v2 v2.3.3/go.mod h1:VZRHKAb53DLaG+nA9EaYYiaEx6YztwDlLElMsnSHD4k=
github.com/test-go/testify v1.1.4 h1:Tf9lntrKUMHiXQ07qBScBTSA0dhYQlu83hswqelv1iE= github.com/test-go/testify v1.1.4 h1:Tf9lntrKUMHiXQ07qBScBTSA0dhYQlu83hswqelv1iE=
github.com/test-go/testify v1.1.4/go.mod h1:rH7cfJo/47vWGdi4GPj16x3/t1xGOj2YxzmNQzk2ghU= github.com/test-go/testify v1.1.4/go.mod h1:rH7cfJo/47vWGdi4GPj16x3/t1xGOj2YxzmNQzk2ghU=
github.com/testcontainers/testcontainers-go v0.40.0 h1:pSdJYLOVgLE8YdUY2FHQ1Fxu+aMnb6JfVz1mxk7OeMU= github.com/testcontainers/testcontainers-go v0.39.0 h1:uCUJ5tA+fcxbFAB0uP3pIK3EJ2IjjDUHFSZ1H1UxAts=
github.com/testcontainers/testcontainers-go v0.40.0/go.mod h1:FSXV5KQtX2HAMlm7U3APNyLkkap35zNLxukw9oBi/MY= github.com/testcontainers/testcontainers-go v0.39.0/go.mod h1:qmHpkG7H5uPf/EvOORKvS6EuDkBUPE3zpVGaH9NL7f8=
github.com/testcontainers/testcontainers-go/modules/opensearch v0.40.0 h1:3TIrGk0zXyO9CG2N6APo7auwWIwAvhkwE1reISif8LM= github.com/testcontainers/testcontainers-go/modules/opensearch v0.39.0 h1:IkJUhR8AigQxv7qHZho/OtTU6JtiSdBGVh76o175JGo=
github.com/testcontainers/testcontainers-go/modules/opensearch v0.40.0/go.mod h1:VA0UCTPu+Gcs7MzdzBnSl0qDnxquuphv3ngSGdX97Xs= github.com/testcontainers/testcontainers-go/modules/opensearch v0.39.0/go.mod h1:B7AhrDmQ4QbpzA0BeWvqzaJ8vbwcdEQDzybr35sBRfw=
github.com/thanhpk/randstr v1.0.6 h1:psAOktJFD4vV9NEVb3qkhRSMvYh4ORRaj1+w/hn4B+o= github.com/thanhpk/randstr v1.0.6 h1:psAOktJFD4vV9NEVb3qkhRSMvYh4ORRaj1+w/hn4B+o=
github.com/thanhpk/randstr v1.0.6/go.mod h1:M/H2P1eNLZzlDwAzpkkkUvoyNNMbzRGhESZuEQk3r0U= github.com/thanhpk/randstr v1.0.6/go.mod h1:M/H2P1eNLZzlDwAzpkkkUvoyNNMbzRGhESZuEQk3r0U=
github.com/theckman/yacspin v0.13.12 h1:CdZ57+n0U6JMuh2xqjnjRq5Haj6v1ner2djtLQRzJr4= github.com/theckman/yacspin v0.13.12 h1:CdZ57+n0U6JMuh2xqjnjRq5Haj6v1ner2djtLQRzJr4=
@@ -1248,8 +1232,8 @@ github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXV
github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY=
github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
github.com/valyala/fasttemplate v1.1.0/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.1.0/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
github.com/vektah/gqlparser/v2 v2.5.31 h1:YhWGA1mfTjID7qJhd1+Vxhpk5HTgydrGU9IgkWBTJ7k= github.com/vektah/gqlparser/v2 v2.5.30 h1:EqLwGAFLIzt1wpx1IPpY67DwUujF1OfzgEyDsLrN6kE=
github.com/vektah/gqlparser/v2 v2.5.31/go.mod h1:c1I28gSOVNzlfc4WuDlqU7voQnsqI6OG2amkBAFmgts= github.com/vektah/gqlparser/v2 v2.5.30/go.mod h1:D1/VCZtV3LPnQrcPBeR/q5jkSQIPti0uYCP/RI0gIeo=
github.com/vinyldns/go-vinyldns v0.0.0-20200917153823-148a5f6b8f14/go.mod h1:RWc47jtnVuQv6+lY3c768WtXCas/Xi+U5UFc5xULmYg= github.com/vinyldns/go-vinyldns v0.0.0-20200917153823-148a5f6b8f14/go.mod h1:RWc47jtnVuQv6+lY3c768WtXCas/Xi+U5UFc5xULmYg=
github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8=
github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok=
@@ -1291,12 +1275,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.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/bbolt v1.4.3 h1:dEadXpI6G79deX5prL3QRNP6JB8UxVkqo4UPnHaNXJo= go.etcd.io/bbolt v1.4.3 h1:dEadXpI6G79deX5prL3QRNP6JB8UxVkqo4UPnHaNXJo=
go.etcd.io/bbolt v1.4.3/go.mod h1:tKQlpPaYCVFctUIgFKFnAlvbmB3tpy1vkTnDWohtc0E= go.etcd.io/bbolt v1.4.3/go.mod h1:tKQlpPaYCVFctUIgFKFnAlvbmB3tpy1vkTnDWohtc0E=
go.etcd.io/etcd/api/v3 v3.6.6 h1:mcaMp3+7JawWv69p6QShYWS8cIWUOl32bFLb6qf8pOQ= go.etcd.io/etcd/api/v3 v3.6.5 h1:pMMc42276sgR1j1raO/Qv3QI9Af/AuyQUW6CBAWuntA=
go.etcd.io/etcd/api/v3 v3.6.6/go.mod h1:f/om26iXl2wSkcTA1zGQv8reJRSLVdoEBsi4JdfMrx4= go.etcd.io/etcd/api/v3 v3.6.5/go.mod h1:ob0/oWA/UQQlT1BmaEkWQzI0sJ1M0Et0mMpaABxguOQ=
go.etcd.io/etcd/client/pkg/v3 v3.6.6 h1:uoqgzSOv2H9KlIF5O1Lsd8sW+eMLuV6wzE3q5GJGQNs= go.etcd.io/etcd/client/pkg/v3 v3.6.5 h1:Duz9fAzIZFhYWgRjp/FgNq2gO1jId9Yae/rLn3RrBP8=
go.etcd.io/etcd/client/pkg/v3 v3.6.6/go.mod h1:YngfUVmvsvOJ2rRgStIyHsKtOt9SZI2aBJrZiWJhCbI= go.etcd.io/etcd/client/pkg/v3 v3.6.5/go.mod h1:8Wx3eGRPiy0qOFMZT/hfvdos+DjEaPxdIDiCDUv/FQk=
go.etcd.io/etcd/client/v3 v3.6.6 h1:G5z1wMf5B9SNexoxOHUGBaULurOZPIgGPsW6CN492ec= go.etcd.io/etcd/client/v3 v3.6.5 h1:yRwZNFBx/35VKHTcLDeO7XVLbCBFbPi+XV4OC3QJf2U=
go.etcd.io/etcd/client/v3 v3.6.6/go.mod h1:36Qv6baQ07znPR3+n7t+Rk5VHEzVYPvFfGmfF4wBHV8= go.etcd.io/etcd/client/v3 v3.6.5/go.mod h1:ZqwG/7TAFZ0BJ0jXRPoJjKQJtbFo/9NIY8uoFFKcCyo=
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= 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.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
@@ -1315,8 +1299,8 @@ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 h1:RbKq8BG
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0/go.mod h1:h06DGIukJOevXaj/xrNjhi/2098RZzcLTbc0jDAUbsg= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0/go.mod h1:h06DGIukJOevXaj/xrNjhi/2098RZzcLTbc0jDAUbsg=
go.opentelemetry.io/contrib/zpages v0.63.0 h1:TppOKuZGbqXMgsfjqq3i09N5Vbo1JLtLImUqiTPGnX4= go.opentelemetry.io/contrib/zpages v0.63.0 h1:TppOKuZGbqXMgsfjqq3i09N5Vbo1JLtLImUqiTPGnX4=
go.opentelemetry.io/contrib/zpages v0.63.0/go.mod h1:5F8uugz75ay/MMhRRhxAXY33FuaI8dl7jTxefrIy5qk= go.opentelemetry.io/contrib/zpages v0.63.0/go.mod h1:5F8uugz75ay/MMhRRhxAXY33FuaI8dl7jTxefrIy5qk=
go.opentelemetry.io/otel v1.39.0 h1:8yPrr/S0ND9QEfTfdP9V+SiwT4E0G7Y5MO7p85nis48= go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=
go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8= go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 h1:GqRJVj7UmLjCVyVJ3ZFLdPRmhDUp2zFmQe3RHIOsw24= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 h1:GqRJVj7UmLjCVyVJ3ZFLdPRmhDUp2zFmQe3RHIOsw24=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0/go.mod h1:ri3aaHSmCTVYu2AWv44YMauwAQc0aqI9gHKIcSbI1pU= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0/go.mod h1:ri3aaHSmCTVYu2AWv44YMauwAQc0aqI9gHKIcSbI1pU=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0 h1:lwI4Dc5leUqENgGuQImwLo4WnuXFPetmPpkLi2IrX54= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0 h1:lwI4Dc5leUqENgGuQImwLo4WnuXFPetmPpkLi2IrX54=
@@ -1325,14 +1309,14 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0 h1:aTL7F
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0/go.mod h1:kldtb7jDTeol0l3ewcmd8SDvx3EmIE7lyvqbasU3QC4= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0/go.mod h1:kldtb7jDTeol0l3ewcmd8SDvx3EmIE7lyvqbasU3QC4=
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.38.0 h1:kJxSDN4SgWWTjG/hPp3O7LCGLcHXFlvS2/FFOrwL+SE= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.38.0 h1:kJxSDN4SgWWTjG/hPp3O7LCGLcHXFlvS2/FFOrwL+SE=
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.38.0/go.mod h1:mgIOzS7iZeKJdeB8/NYHrJ48fdGc71Llo5bJ1J4DWUE= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.38.0/go.mod h1:mgIOzS7iZeKJdeB8/NYHrJ48fdGc71Llo5bJ1J4DWUE=
go.opentelemetry.io/otel/metric v1.39.0 h1:d1UzonvEZriVfpNKEVmHXbdf909uGTOQjA0HF0Ls5Q0= go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA=
go.opentelemetry.io/otel/metric v1.39.0/go.mod h1:jrZSWL33sD7bBxg1xjrqyDjnuzTUB0x1nBERXd7Ftcs= go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI=
go.opentelemetry.io/otel/sdk v1.39.0 h1:nMLYcjVsvdui1B/4FRkwjzoRVsMK8uL/cj0OyhKzt18= go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E=
go.opentelemetry.io/otel/sdk v1.39.0/go.mod h1:vDojkC4/jsTJsE+kh+LXYQlbL8CgrEcwmt1ENZszdJE= go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg=
go.opentelemetry.io/otel/sdk/metric v1.39.0 h1:cXMVVFVgsIf2YL6QkRF4Urbr/aMInf+2WKg+sEJTtB8= go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM=
go.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew= go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA=
go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6/qCJI= go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE=
go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA= go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs=
go.opentelemetry.io/proto/otlp v1.7.1 h1:gTOMpGDb0WTBOP8JaO72iL3auEZhVmAQg4ipjOVAtj4= go.opentelemetry.io/proto/otlp v1.7.1 h1:gTOMpGDb0WTBOP8JaO72iL3auEZhVmAQg4ipjOVAtj4=
go.opentelemetry.io/proto/otlp v1.7.1/go.mod h1:b2rVh6rfI/s2pHWNlB7ILJcRALpcNDzKhACevjI+ZnE= go.opentelemetry.io/proto/otlp v1.7.1/go.mod h1:b2rVh6rfI/s2pHWNlB7ILJcRALpcNDzKhACevjI+ZnE=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
@@ -1375,8 +1359,8 @@ golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU= golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0= golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -1392,8 +1376,8 @@ golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac/go.mod h1:hH+7mtFmImwwcMvScy
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.18.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E= golang.org/x/image v0.18.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E=
golang.org/x/image v0.34.0 h1:33gCkyw9hmwbZJeZkct8XyR11yH889EQt/QH4VmXMn8= golang.org/x/image v0.33.0 h1:LXRZRnv1+zGd5XBUVRFmYEphyyKJjQjCRiOuAP3sZfQ=
golang.org/x/image v0.34.0/go.mod h1:2RNFBZRB+vnwwFil8GkMdRvrJOFd1AzdZI6vOY+eJVU= golang.org/x/image v0.33.0/go.mod h1:DD3OsTYT9chzuzTQt+zMcOlBHgfoKQb1gry8p76Y1sc=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 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-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
@@ -1418,8 +1402,8 @@ golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.30.0 h1:fDEXFVZ/fmCKProc/yAXXUijritrDzahmwwefnjoPFk= golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA=
golang.org/x/mod v0.30.0/go.mod h1:lAsf5O2EvJeSFMiBxXDki7sCgAxEUcZHXoXMKT4GJKc= golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 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-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -1473,8 +1457,8 @@ golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU= golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY= golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -1501,8 +1485,8 @@ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sys v0.0.0-20180622082034-63fc586f45fe/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180622082034-63fc586f45fe/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -1586,8 +1570,8 @@ 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.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.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.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk= golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= 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-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
@@ -1599,8 +1583,8 @@ golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
golang.org/x/term v0.38.0 h1:PQ5pkm/rLO6HnxFR7N2lJHOZX6Kez5Y1gDSJla6jo7Q= golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU=
golang.org/x/term v0.38.0/go.mod h1:bSEAKrOT1W+VSu9TSCMtoGEOUcKxOKgl3LE5QEF/xVg= golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -1615,8 +1599,8 @@ golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU= golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY= golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -1679,8 +1663,8 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
golang.org/x/tools v0.39.0 h1:ik4ho21kwuQln40uelmciQPp9SipgNDdrafrYA4TmQQ= golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ=
golang.org/x/tools v0.39.0/go.mod h1:JnefbkDPyD8UU2kI5fuf8ZX4/yUeh9W877ZeBONxUqQ= golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs=
golang.org/x/tools/godoc v0.1.0-deprecated h1:o+aZ1BOj6Hsx/GBdJO/s815sqftjSnrZZwyYTHODvtk= golang.org/x/tools/godoc v0.1.0-deprecated h1:o+aZ1BOj6Hsx/GBdJO/s815sqftjSnrZZwyYTHODvtk=
golang.org/x/tools/godoc v0.1.0-deprecated/go.mod h1:qM63CriJ961IHWmnWa9CjZnBndniPt4a3CK0PVB9bIg= golang.org/x/tools/godoc v0.1.0-deprecated/go.mod h1:qM63CriJ961IHWmnWa9CjZnBndniPt4a3CK0PVB9bIg=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -1744,10 +1728,10 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20250303144028-a0af3efb3deb h1:ITgPrl429bc6+2ZraNSzMDk3I95nmQln2fuPstKwFDE= google.golang.org/genproto v0.0.0-20250303144028-a0af3efb3deb h1:ITgPrl429bc6+2ZraNSzMDk3I95nmQln2fuPstKwFDE=
google.golang.org/genproto v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:sAo5UzpjUwgFBCzupwhcLcxHVDK7vG5IqI30YnwX2eE= google.golang.org/genproto v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:sAo5UzpjUwgFBCzupwhcLcxHVDK7vG5IqI30YnwX2eE=
google.golang.org/genproto/googleapis/api v0.0.0-20251029180050-ab9386a59fda h1:+2XxjfsAu6vqFxwGBRcHiMaDCuZiqXGDUDVWVtrFAnE= google.golang.org/genproto/googleapis/api v0.0.0-20251022142026-3a174f9686a8 h1:mepRgnBZa07I4TRuomDE4sTIYieg/osKmzIf4USdWS4=
google.golang.org/genproto/googleapis/api v0.0.0-20251029180050-ab9386a59fda/go.mod h1:fDMmzKV90WSg1NbozdqrE64fkuTv6mlq2zxo9ad+3yo= google.golang.org/genproto/googleapis/api v0.0.0-20251022142026-3a174f9686a8/go.mod h1:fDMmzKV90WSg1NbozdqrE64fkuTv6mlq2zxo9ad+3yo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20251029180050-ab9386a59fda h1:i/Q+bfisr7gq6feoJnS/DlpdwEL4ihp41fvRiM3Ork0= google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8 h1:M1rk8KBnUsBDg1oPGHNCxG4vc1f49epmTO7xscSajMk=
google.golang.org/genproto/googleapis/rpc v0.0.0-20251029180050-ab9386a59fda/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk=
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
@@ -1763,8 +1747,8 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= google.golang.org/grpc v1.77.0 h1:wVVY6/8cGA6vvffn+wWK5ToddbgdU3d8MNENr4evgXM=
google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= google.golang.org/grpc v1.77.0/go.mod h1:z0BY1iVj0q8E1uSQCjL9cppRj+gnZjzDnzV0dHhrNig=
google.golang.org/grpc/examples v0.0.0-20211102180624-670c133e568e h1:m7aQHHqd0q89mRwhwS9Bx2rjyl/hsFAeta+uGrHsQaU= google.golang.org/grpc/examples v0.0.0-20211102180624-670c133e568e h1:m7aQHHqd0q89mRwhwS9Bx2rjyl/hsFAeta+uGrHsQaU=
google.golang.org/grpc/examples v0.0.0-20211102180624-670c133e568e/go.mod h1:gID3PKrg7pWKntu9Ss6zTLJ0ttC0X9IHgREOCZwbCVU= google.golang.org/grpc/examples v0.0.0-20211102180624-670c133e568e/go.mod h1:gID3PKrg7pWKntu9Ss6zTLJ0ttC0X9IHgREOCZwbCVU=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=

View File

@@ -3,7 +3,6 @@ ARG TARGETOS
ARG TARGETARCH ARG TARGETARCH
ARG VERSION ARG VERSION
ARG STRING ARG STRING
ARG EDITION="dev"
RUN apk add bash make git curl gcc musl-dev libc-dev binutils-gold inotify-tools vips-dev RUN apk add bash make git curl gcc musl-dev libc-dev binutils-gold inotify-tools vips-dev

View File

@@ -4,8 +4,6 @@ import (
"errors" "errors"
"fmt" "fmt"
"github.com/spf13/cobra"
"github.com/opencloud-eu/opencloud/opencloud/pkg/backup" "github.com/opencloud-eu/opencloud/opencloud/pkg/backup"
"github.com/opencloud-eu/opencloud/opencloud/pkg/register" "github.com/opencloud-eu/opencloud/opencloud/pkg/register"
"github.com/opencloud-eu/opencloud/pkg/config" "github.com/opencloud-eu/opencloud/pkg/config"
@@ -13,34 +11,62 @@ import (
"github.com/opencloud-eu/opencloud/pkg/config/parser" "github.com/opencloud-eu/opencloud/pkg/config/parser"
decomposedbs "github.com/opencloud-eu/reva/v2/pkg/storage/fs/decomposed/blobstore" decomposedbs "github.com/opencloud-eu/reva/v2/pkg/storage/fs/decomposed/blobstore"
decomposeds3bs "github.com/opencloud-eu/reva/v2/pkg/storage/fs/decomposeds3/blobstore" decomposeds3bs "github.com/opencloud-eu/reva/v2/pkg/storage/fs/decomposeds3/blobstore"
"github.com/urfave/cli/v2"
) )
// BackupCommand is the entrypoint for the backup command // BackupCommand is the entrypoint for the backup command
func BackupCommand(cfg *config.Config) *cobra.Command { func BackupCommand(cfg *config.Config) *cli.Command {
bckCmd := &cobra.Command{ return &cli.Command{
Use: "backup", Name: "backup",
Short: "OpenCloud backup functionality", Usage: "OpenCloud backup functionality",
PersistentPreRunE: func(cmd *cobra.Command, args []string) error { Subcommands: []*cli.Command{
ConsistencyCommand(cfg),
},
Before: func(c *cli.Context) error {
return configlog.ReturnError(parser.ParseConfig(cfg, true)) return configlog.ReturnError(parser.ParseConfig(cfg, true))
}, },
Action: func(_ *cli.Context) error {
fmt.Println("Read the docs")
return nil
},
} }
bckCmd.AddCommand(ConsistencyCommand(cfg))
return bckCmd
} }
// ConsistencyCommand is the entrypoint for the consistency Command // ConsistencyCommand is the entrypoint for the consistency Command
func ConsistencyCommand(cfg *config.Config) *cobra.Command { func ConsistencyCommand(cfg *config.Config) *cli.Command {
consCmd := &cobra.Command{ return &cli.Command{
Use: "consistency", Name: "consistency",
Short: "check backup consistency", Usage: "check backup consistency",
RunE: func(cmd *cobra.Command, args []string) error { Flags: []cli.Flag{
&cli.StringFlag{
Name: "basepath",
Aliases: []string{"p"},
Usage: "the basepath of the decomposedfs (e.g. /var/tmp/opencloud/storage/users)",
Required: true,
},
&cli.StringFlag{
Name: "blobstore",
Aliases: []string{"b"},
Usage: "the blobstore type. Can be (none, decomposed, decomposeds3). Default decomposed",
Value: "decomposed",
},
&cli.BoolFlag{
Name: "fail",
Usage: "exit with non-zero status if consistency check fails",
},
},
Action: func(c *cli.Context) error {
basePath := c.String("basepath")
if basePath == "" {
fmt.Println("basepath is required")
return cli.ShowCommandHelp(c, "consistency")
}
var ( var (
bs backup.ListBlobstore bs backup.ListBlobstore
err error err error
) )
basePath, _ := cmd.Flags().GetString("basepath") switch c.String("blobstore") {
blobstoreFlag, _ := cmd.Flags().GetString("blobstore")
switch blobstoreFlag {
case "decomposeds3": case "decomposeds3":
bs, err = decomposeds3bs.New( bs, err = decomposeds3bs.New(
cfg.StorageUsers.Drivers.DecomposedS3.Endpoint, cfg.StorageUsers.Drivers.DecomposedS3.Endpoint,
@@ -61,8 +87,7 @@ func ConsistencyCommand(cfg *config.Config) *cobra.Command {
fmt.Println(err) fmt.Println(err)
return err return err
} }
fail, _ := cmd.Flags().GetBool("fail") if err := backup.CheckProviderConsistency(basePath, bs, c.Bool("fail")); err != nil {
if err := backup.CheckProviderConsistency(basePath, bs, fail); err != nil {
fmt.Println(err) fmt.Println(err)
return err return err
} }
@@ -70,11 +95,6 @@ func ConsistencyCommand(cfg *config.Config) *cobra.Command {
return nil return nil
}, },
} }
consCmd.Flags().StringP("basepath", "p", "", "the basepath of the decomposedfs (e.g. /var/tmp/opencloud/storage/users)")
_ = consCmd.MarkFlagRequired("basepath")
consCmd.Flags().StringP("blobstore", "b", "decomposed", "the blobstore type. Can be (none, decomposed, decomposeds3). Default decomposed")
consCmd.Flags().Bool("fail", false, "exit with non-zero status if consistency check fails")
return consCmd
} }
func init() { func init() {

View File

@@ -2,7 +2,6 @@ package command
import ( import (
"bytes" "bytes"
"context"
"crypto/tls" "crypto/tls"
"encoding/base64" "encoding/base64"
"errors" "errors"
@@ -11,10 +10,8 @@ import (
"net/http" "net/http"
"os" "os"
"os/exec" "os/exec"
"os/signal"
"strconv" "strconv"
"strings" "strings"
"syscall"
"time" "time"
"github.com/olekukonko/tablewriter" "github.com/olekukonko/tablewriter"
@@ -24,118 +21,105 @@ import (
"github.com/opencloud-eu/opencloud/pkg/version" "github.com/opencloud-eu/opencloud/pkg/version"
"github.com/pkg/xattr" "github.com/pkg/xattr"
"github.com/rogpeppe/go-internal/lockedfile" "github.com/rogpeppe/go-internal/lockedfile"
"github.com/spf13/cobra" "github.com/urfave/cli/v2"
) )
// BenchmarkCommand is the entrypoint for the benchmark commands. // BenchmarkCommand is the entrypoint for the benchmark commands.
func BenchmarkCommand(cfg *config.Config) *cobra.Command { func BenchmarkCommand(cfg *config.Config) *cli.Command {
benchCmd := &cobra.Command{ return &cli.Command{
Use: "benchmark", Name: "benchmark",
Short: "cli tools to test low and high level performance", Usage: "cli tools to test low and high level performance",
Category: "benchmark",
Subcommands: []*cli.Command{BenchmarkClientCommand(cfg), BenchmarkSyscallsCommand(cfg)},
} }
benchCmd.AddCommand(BenchmarkClientCommand(cfg), BenchmarkSyscallsCommand(cfg))
return benchCmd
} }
// BenchmarkClientCommand is the entrypoint for the benchmark client command. // BenchmarkClientCommand is the entrypoint for the benchmark client command.
func BenchmarkClientCommand(cfg *config.Config) *cobra.Command { func BenchmarkClientCommand(cfg *config.Config) *cli.Command {
benchClientCmd := &cobra.Command{ return &cli.Command{
Use: "client", Name: "client",
Short: "Start a client that continuously makes web requests and prints stats. The options mimic curl, but we default to PROPFIND requests.",
RunE: func(cmd *cobra.Command, args []string) error { Usage: "Start a client that continuously makes web requests and prints stats. The options mimic curl, but URL must be at the end.",
jobs, err := cmd.Flags().GetInt("jobs") Flags: []cli.Flag{
if err != nil {
return err // TODO with v3 'flag.Persistent: true' can be set to make the order of flags no longer relevant \o/
} // flags mimicing curl
insecure, _ := cmd.Flags().GetBool("insecure") &cli.StringFlag{
Name: "request",
Aliases: []string{"X"},
Value: "PROPFIND",
Usage: "Specifies a custom request method to use when communicating with the HTTP server.",
},
&cli.StringFlag{
Name: "user",
Aliases: []string{"u"},
Value: "admin:admin",
Usage: "Specify the user name and password to use for server authentication.",
},
&cli.BoolFlag{
Name: "insecure",
Aliases: []string{"k"},
Usage: "Skip the TLS verification step and proceed without checking.",
},
&cli.StringFlag{
Name: "data",
Aliases: []string{"d"},
Usage: "Sends the specified data in a request to the HTTP server.",
// TODE support multiple data flags, support data-binary, data-raw
},
&cli.StringSliceFlag{
Name: "header",
Aliases: []string{"H"},
Usage: "Extra header to include in information sent.",
},
&cli.StringFlag{
Name: "rate",
Usage: `Specify the maximum transfer frequency you allow a client to use - in number of transfer starts per time unit (sometimes called request rate).
The request rate is provided as "N/U" where N is an integer number and U is a time unit. Supported units are 's' (second), 'm' (minute), 'h' (hour) and 'd' /(day, as in a 24 hour unit). The default time unit, if no "/U" is provided, is number of transfers per hour.`,
},
/*
&cli.StringFlag{
Name: "oauth2-bearer",
Usage: "Specify the Bearer Token for OAUTH 2.0 server authentication.",
},
&cli.StringFlag{
Name: "user-agent",
Aliases: []string{"A"},
Value: "admin:admin",
Usage: "Specify the User-Agent string to send to the HTTP server.",
},
*/
// other flags
&cli.StringFlag{
Name: "bearer-token-command",
Usage: "Command to execute for a bearer token, e.g. 'oidc-token opencloud'. When set, disables basic auth.",
},
&cli.IntFlag{
Name: "every",
Usage: "Aggregate stats every time this amount of seconds has passed.",
},
&cli.IntFlag{
Name: "jobs",
Aliases: []string{"j"},
Value: 1,
Usage: "Number of parallel clients to start.",
},
},
Category: "benchmark",
Action: func(c *cli.Context) error {
opt := clientOptions{ opt := clientOptions{
url: args[0], request: c.String("request"),
insecure: insecure, url: c.Args().First(),
jobs: jobs, insecure: c.Bool("insecure"),
jobs: c.Int("jobs"),
headers: make(map[string]string), headers: make(map[string]string),
data: []byte(c.String("data")),
} }
if d, _ := cmd.Flags().GetString("data-raw"); d != "" {
opt.request = "POST"
opt.headers["Content-Type"] = "application/x-www-form-urlencoded"
opt.data = []byte(d)
}
if d, _ := cmd.Flags().GetString("data"); d != "" {
opt.request = "POST"
opt.headers["Content-Type"] = "application/x-www-form-urlencoded"
if strings.HasPrefix(d, "@") {
filePath := strings.TrimPrefix(d, "@")
var data []byte
var err error
// read from file or stdin and trim trailing newlines
if filePath == "-" {
data, err = os.ReadFile("/dev/stdin")
} else {
data, err = os.ReadFile(filePath)
}
if err != nil {
log.Fatal(errors.New("could not read data from file '" + filePath + "': " + err.Error()))
}
// clean byte array similar to curl's --data parameter
// It removes leading/trailing whitespace and converts line breaks to spaces
// Trim leading and trailing whitespace
data = bytes.TrimSpace(data)
// Replace newlines and carriage returns with spaces
data = bytes.ReplaceAll(data, []byte("\r\n"), []byte(" "))
data = bytes.ReplaceAll(data, []byte("\n"), []byte(" "))
data = bytes.ReplaceAll(data, []byte("\r"), []byte(" "))
// Replace multiple spaces with single space
for bytes.Contains(data, []byte(" ")) {
data = bytes.ReplaceAll(data, []byte(" "), []byte(" "))
}
opt.data = data
} else {
opt.data = []byte(d)
}
}
if d, _ := cmd.Flags().GetString("data-binary"); d != "" {
opt.request = "POST"
opt.headers["Content-Type"] = "application/x-www-form-urlencoded"
if strings.HasPrefix(d, "@") {
filePath := strings.TrimPrefix(d, "@")
var data []byte
var err error
if filePath == "-" {
data, err = os.ReadFile("/dev/stdin")
} else {
data, err = os.ReadFile(filePath)
}
if err != nil {
log.Fatal(errors.New("could not read data from file '" + filePath + "': " + err.Error()))
}
opt.data = data
} else {
opt.data = []byte(d)
}
}
// override method if specified
if request, _ := cmd.Flags().GetString("request"); request != "" {
opt.request = request
}
if opt.url == "" { if opt.url == "" {
log.Fatal(errors.New("no URL specified")) log.Fatal(errors.New("no URL specified"))
} }
headersSlice, err := cmd.Flags().GetStringSlice("header") for _, h := range c.StringSlice("headers") {
if err != nil {
return err
}
for _, h := range headersSlice {
parts := strings.SplitN(h, ":", 2) parts := strings.SplitN(h, ":", 2)
if len(parts) != 2 { if len(parts) != 2 {
log.Fatal(errors.New("invalid header '" + h + "'")) log.Fatal(errors.New("invalid header '" + h + "'"))
@@ -143,7 +127,7 @@ func BenchmarkClientCommand(cfg *config.Config) *cobra.Command {
opt.headers[parts[0]] = strings.TrimSpace(parts[1]) opt.headers[parts[0]] = strings.TrimSpace(parts[1])
} }
rate, _ := cmd.Flags().GetString("rate") rate := c.String("rate")
if rate != "" { if rate != "" {
parts := strings.SplitN(rate, "/", 2) parts := strings.SplitN(rate, "/", 2)
num, err := strconv.Atoi(parts[0]) num, err := strconv.Atoi(parts[0])
@@ -166,12 +150,12 @@ func BenchmarkClientCommand(cfg *config.Config) *cobra.Command {
opt.rateDelay = unit / time.Duration(num) opt.rateDelay = unit / time.Duration(num)
} }
user, _ := cmd.Flags().GetString("user") user := c.String("user")
opt.auth = func() string { opt.auth = func() string {
return "Basic " + base64.StdEncoding.EncodeToString([]byte(user)) return "Basic " + base64.StdEncoding.EncodeToString([]byte(user))
} }
btc, _ := cmd.Flags().GetString("bearer-token-command") btc := c.String("bearer-token-command")
if btc != "" { if btc != "" {
parts := strings.SplitN(btc, " ", 2) parts := strings.SplitN(btc, " ", 2)
var cmd *exec.Cmd var cmd *exec.Cmd
@@ -189,47 +173,16 @@ func BenchmarkClientCommand(cfg *config.Config) *cobra.Command {
} }
} }
every, err := cmd.Flags().GetInt("every") every := c.Int("every")
if err != nil {
return err
}
if every != 0 { if every != 0 {
opt.ticker = time.NewTicker(time.Second * time.Duration(every)) opt.ticker = time.NewTicker(time.Second * time.Duration(every))
defer opt.ticker.Stop() defer opt.ticker.Stop()
} }
// Set up signal handling for Ctrl+C return client(opt)
ctx, cancel := context.WithCancel(cmd.Context())
defer cancel()
sigChan := make(chan os.Signal, 1)
signal.Notify(sigChan, os.Interrupt, syscall.SIGTERM)
go func() {
<-sigChan
fmt.Println("\nReceived interrupt signal, shutting down...")
cancel()
}()
return client(ctx, opt)
}, },
} }
// flags mimicing curl
benchClientCmd.Flags().StringP("request", "X", "PROPFIND", "Specifies a custom request method to use when communicating with the HTTP server.")
benchClientCmd.Flags().StringP("user", "u", "admin:admin", "Specify the user name and password to use for server authentication.")
benchClientCmd.Flags().BoolP("insecure", "k", false, "Skip the TLS verification step and proceed without checking.")
benchClientCmd.Flags().StringP("data", "d", "", "Sends the specified data in a POST request to the HTTP server, in the same way that a browser does when a user has filled in an HTML form and presses the submit button. If you start the data with the letter @, the rest should be a file name to read the data from, or - if you want to read the data from stdin. When -d, --data is told to read from a file like that, carriage returns and newlines are stripped out. If you do not want the @ character to have a special interpretation use --data-raw instead.")
benchClientCmd.Flags().StringP("data-raw", "", "", "Sends the specified data in a request to the HTTP server.")
benchClientCmd.Flags().StringP("data-binary", "", "", "This posts data exactly as specified with no extra processing whatsoever. If you start the data with the letter @, the rest should be a file name to read the data from, or - if you want to read the data from stdin.")
benchClientCmd.Flags().StringSliceP("headers", "H", []string{}, "Extra header to include in information sent.")
benchClientCmd.Flags().String("rate", "", "Specify the maximum transfer frequency you allow a client to use - in number of transfer starts per time unit (sometimes called request rate). The request rate is provided as \"N/U\" where N is an integer number and U is a time unit. Supported units are 's' (second), 'm' (minute), 'h' (hour) and 'd' /(day, as in a 24 hour unit). The default time unit, if no \"/U\" is provided, is number of transfers per hour.")
// other flags
benchClientCmd.Flags().IntP("jobs", "j", 1, "Number of parallel clients to start. Defaults to 1.")
benchClientCmd.Flags().Int("every", 0, "Aggregate stats every time this amount of seconds has passed.")
benchClientCmd.Flags().String("bearer-token-command", "", "Command to execute for a bearer token, e.g. 'oidc-token opencloud'. When set, disables basic auth.")
return benchClientCmd
} }
type clientOptions struct { type clientOptions struct {
@@ -244,7 +197,8 @@ type clientOptions struct {
jobs int jobs int
} }
func client(ctx context.Context, o clientOptions) error { func client(o clientOptions) error {
type stat struct { type stat struct {
job int job int
duration time.Duration duration time.Duration
@@ -263,13 +217,6 @@ func client(ctx context.Context, o clientOptions) error {
cookies := map[string]*http.Cookie{} cookies := map[string]*http.Cookie{}
for { for {
// Check if context is cancelled
select {
case <-ctx.Done():
return
default:
}
req, err := http.NewRequest(o.request, o.url, bytes.NewReader(o.data)) req, err := http.NewRequest(o.request, o.url, bytes.NewReader(o.data))
if err != nil { if err != nil {
log.Printf("client %d: could not create request: %s\n", i, err) log.Printf("client %d: could not create request: %s\n", i, err)
@@ -287,35 +234,20 @@ func client(ctx context.Context, o clientOptions) error {
res, err := client.Do(req) res, err := client.Do(req)
duration := -time.Until(start) duration := -time.Until(start)
if err != nil { if err != nil {
// Check if error is due to context cancellation
if ctx.Err() != nil {
return
}
log.Printf("client %d: could not create request: %s\n", i, err) log.Printf("client %d: could not create request: %s\n", i, err)
time.Sleep(time.Second) time.Sleep(time.Second)
} else { } else {
res.Body.Close() res.Body.Close()
select { stats <- stat{
case stats <- stat{
job: i, job: i,
duration: duration, duration: duration,
status: res.StatusCode, status: res.StatusCode,
}:
case <-ctx.Done():
return
} }
for _, c := range res.Cookies() { for _, c := range res.Cookies() {
cookies[c.Name] = c cookies[c.Name] = c
} }
} }
// Sleep with context awareness time.Sleep(o.rateDelay - duration)
if o.rateDelay > duration {
select {
case <-time.After(o.rateDelay - duration):
case <-ctx.Done():
return
}
}
} }
}(i) }(i)
} }
@@ -324,14 +256,9 @@ func client(ctx context.Context, o clientOptions) error {
if o.ticker == nil { if o.ticker == nil {
// no ticker, just write every request // no ticker, just write every request
for { for {
select { stat := <-stats
case stat := <-stats: numRequests++
numRequests++ fmt.Printf("req %d took %v and returned status %d\n", numRequests, stat.duration, stat.status)
fmt.Printf("req %d took %v and returned status %d\n", numRequests, stat.duration, stat.status)
case <-ctx.Done():
fmt.Println("\nShutting down...")
return nil
}
} }
} }
@@ -347,25 +274,31 @@ func client(ctx context.Context, o clientOptions) error {
numRequests = 0 numRequests = 0
duration = 0 duration = 0
} }
case <-ctx.Done():
if numRequests > 0 {
fmt.Printf("\n%d req at %v/req\n", numRequests, duration/time.Duration(numRequests))
}
fmt.Println("Shutting down...")
return nil
} }
} }
} }
// BenchmarkSyscallsCommand is the entrypoint for the benchmark syscalls command. // BenchmarkSyscallsCommand is the entrypoint for the benchmark syscalls command.
func BenchmarkSyscallsCommand(cfg *config.Config) *cobra.Command { func BenchmarkSyscallsCommand(cfg *config.Config) *cli.Command {
benchSysCallCmd := &cobra.Command{ return &cli.Command{
Use: "syscalls", Name: "syscalls",
Short: "test the performance of syscalls", Usage: "test the performance of syscalls",
RunE: func(cmd *cobra.Command, args []string) error { Flags: []cli.Flag{
&cli.StringFlag{
Name: "path",
Usage: "Path to test",
},
&cli.StringFlag{
Name: "iterations",
Value: "100",
Usage: "Number of iterations to execute",
},
},
Category: "benchmark",
Action: func(c *cli.Context) error {
path, _ := cmd.Flags().GetString("path") path := c.String("path")
if path == "" { if path == "" {
f, err := os.CreateTemp("", "opencloud-bench-temp-") f, err := os.CreateTemp("", "opencloud-bench-temp-")
if err != nil { if err != nil {
@@ -376,16 +309,11 @@ func BenchmarkSyscallsCommand(cfg *config.Config) *cobra.Command {
defer os.Remove(path) defer os.Remove(path)
} }
iterations, err := cmd.Flags().GetInt("iterations") iterations := c.Int("iterations")
if err != nil {
return err
}
return benchmark(iterations, path) return benchmark(iterations, path)
}, },
} }
benchSysCallCmd.Flags().String("path", "", "Path to test")
benchSysCallCmd.Flags().Int("iterations", 100, "Number of iterations to execute")
return benchSysCallCmd
} }
func benchmark(iterations int, path string) error { func benchmark(iterations int, path string) error {

View File

@@ -1,7 +0,0 @@
package command
const (
CommandGroupServer = "Server"
CommandGroupServices = "Service"
CommandGroupStorage = "Storage"
)

View File

@@ -9,6 +9,8 @@ import (
"sort" "sort"
"strings" "strings"
userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
"github.com/opencloud-eu/opencloud/opencloud/pkg/register" "github.com/opencloud-eu/opencloud/opencloud/pkg/register"
"github.com/opencloud-eu/opencloud/pkg/config" "github.com/opencloud-eu/opencloud/pkg/config"
revactx "github.com/opencloud-eu/reva/v2/pkg/ctx" revactx "github.com/opencloud-eu/reva/v2/pkg/ctx"
@@ -23,57 +25,69 @@ import (
"github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/tree" "github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/tree"
"github.com/opencloud-eu/reva/v2/pkg/storagespace" "github.com/opencloud-eu/reva/v2/pkg/storagespace"
"github.com/opencloud-eu/reva/v2/pkg/store" "github.com/opencloud-eu/reva/v2/pkg/store"
userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
"github.com/rs/zerolog" "github.com/rs/zerolog"
"github.com/spf13/cobra" "github.com/urfave/cli/v2"
) )
// DecomposedfsCommand is the entrypoint for the groups command. // DecomposedfsCommand is the entrypoint for the groups command.
func DecomposedfsCommand(cfg *config.Config) *cobra.Command { func DecomposedfsCommand(cfg *config.Config) *cli.Command {
decomposedCmd := &cobra.Command{ return &cli.Command{
Use: "decomposedfs", Name: "decomposedfs",
Short: `cli tools to inspect and manipulate a decomposedfs storage.`, Usage: `cli tools to inspect and manipulate a decomposedfs storage.`,
GroupID: CommandGroupStorage, Category: "maintenance",
Subcommands: []*cli.Command{
metadataCmd(cfg),
checkCmd(cfg),
},
} }
decomposedCmd.AddCommand(metadataCmd(cfg), checkCmd(cfg))
return decomposedCmd
} }
func init() { func init() {
register.AddCommand(DecomposedfsCommand) register.AddCommand(DecomposedfsCommand)
} }
func checkCmd(_ *config.Config) *cobra.Command { func checkCmd(cfg *config.Config) *cli.Command {
cCmd := &cobra.Command{ return &cli.Command{
Use: "check-treesize", Name: "check-treesize",
Short: `cli tool to check the treesize metadata of a Space`, Usage: `cli tool to check the treesize metadata of a Space`,
RunE: check, Flags: []cli.Flag{
&cli.StringFlag{
Name: "root",
Aliases: []string{"r"},
Required: true,
Usage: "Path to the root directory of the decomposedfs",
},
&cli.StringFlag{
Name: "node",
Required: true,
Aliases: []string{"n"},
Usage: "Space ID of the Space to inspect",
},
&cli.BoolFlag{
Name: "repair",
Usage: "Try to repair nodes with incorrect treesize metadata. IMPORTANT: Only use this while OpenCloud is not running.",
},
&cli.BoolFlag{
Name: "force",
Usage: "Do not prompt for confirmation when running in repair mode.",
},
},
Action: check,
} }
cCmd.Flags().StringP("root", "r", "", "Path to the root directory of the decomposedfs")
_ = cCmd.MarkFlagRequired("root")
cCmd.Flags().StringP("node", "n", "", "Space ID of the Space to inspect")
_ = cCmd.MarkFlagRequired("node")
cCmd.Flags().Bool("repair", false, "Try to repair nodes with incorrect treesize metadata. IMPORTANT: Only use this while OpenCloud is not running.")
cCmd.Flags().Bool("force", false, "Do not prompt for confirmation when running in repair mode.")
return cCmd
} }
func check(cmd *cobra.Command, args []string) error { func check(c *cli.Context) error {
rootFlag, _ := cmd.Flags().GetString("root") rootFlag := c.String("root")
repairFlag, _ := cmd.Flags().GetBool("repair") repairFlag := c.Bool("repair")
forceFlag, _ := cmd.Flags().GetBool("force")
if repairFlag && !forceFlag { if repairFlag && !c.Bool("force") {
answer := strings.ToLower(stringPrompt("IMPORTANT: Only use '--repair' when OpenCloud is not running. Do you want to continue? [yes | no = default]")) answer := strings.ToLower(stringPrompt("IMPORTANT: Only use '--repair' when OpenCloud is not running. Do you want to continue? [yes | no = default]"))
if answer != "yes" && answer != "y" { if answer != "yes" && answer != "y" {
return nil return nil
} }
} }
lu, backend := getBackend(cmd) lu, backend := getBackend(c)
o := &options.Options{ o := &options.Options{
MetadataBackend: backend.Name(), MetadataBackend: backend.Name(),
MaxConcurrency: 100, MaxConcurrency: 100,
@@ -86,7 +100,7 @@ func check(cmd *cobra.Command, args []string) error {
tree := tree.New(lu, bs, o, permissions.Permissions{}, store.Create(), &zerolog.Logger{}) tree := tree.New(lu, bs, o, permissions.Permissions{}, store.Create(), &zerolog.Logger{})
nId, _ := cmd.Flags().GetString("node") nId := c.String("node")
n, err := lu.NodeFromSpaceID(context.Background(), nId) n, err := lu.NodeFromSpaceID(context.Background(), nId)
if err != nil || !n.Exists { if err != nil || !n.Exists {
fmt.Println("Can not find node '" + nId + "'") fmt.Println("Can not find node '" + nId + "'")
@@ -102,10 +116,7 @@ func check(cmd *cobra.Command, args []string) error {
}) })
treeSize, err := walkTree(ctx, tree, lu, n, repairFlag) treeSize, err := walkTree(ctx, tree, lu, n, repairFlag)
if err != nil { treesizeFromMetadata, err := n.GetTreeSize(c.Context)
fmt.Printf("failed to walk tree of node %s: %s\n", n.ID, err)
}
treesizeFromMetadata, err := n.GetTreeSize(cmd.Context())
if err != nil { if err != nil {
fmt.Printf("failed to read treesize of node: %s: %s\n", n.ID, err) fmt.Printf("failed to read treesize of node: %s: %s\n", n.ID, err)
} }
@@ -115,7 +126,7 @@ func check(cmd *cobra.Command, args []string) error {
if repairFlag { if repairFlag {
fmt.Printf("Fixing tree size for node: %s. Calculated treesize: %d\n", fmt.Printf("Fixing tree size for node: %s. Calculated treesize: %d\n",
n.ID, treeSize) n.ID, treeSize)
n.SetTreeSize(cmd.Context(), treeSize) n.SetTreeSize(c.Context, treeSize)
} }
} }
return nil return nil
@@ -174,79 +185,105 @@ func walkTree(ctx context.Context, tree *tree.Tree, lu *lookup.Lookup, root *nod
return treesize, nil return treesize, nil
} }
func metadataCmd(cfg *config.Config) *cobra.Command { func metadataCmd(cfg *config.Config) *cli.Command {
metaCmd := &cobra.Command{ return &cli.Command{
Use: "metadata", Name: "metadata",
Short: `cli tools to inspect and manipulate node metadata`, Usage: `cli tools to inspect and manipulate node metadata`,
Flags: []cli.Flag{
&cli.StringFlag{
Name: "root",
Aliases: []string{"r"},
Required: true,
Usage: "Path to the decomposedfs",
},
&cli.StringFlag{
Name: "node",
Required: true,
Aliases: []string{"n"},
Usage: "Path to or ID of the node to inspect",
},
},
Subcommands: []*cli.Command{dumpCmd(cfg), getCmd(cfg), setCmd(cfg)},
} }
metaCmd.AddCommand(dumpCmd(cfg), getCmd(cfg), setCmd(cfg))
metaCmd.Flags().StringP("root", "r", "", "Path to the root directory of the decomposedfs")
_ = metaCmd.MarkFlagRequired("root")
metaCmd.Flags().StringP("node", "n", "", "Path to or ID of the node to inspect")
_ = metaCmd.MarkFlagRequired("node")
return metaCmd
} }
func dumpCmd(_ *config.Config) *cobra.Command { func dumpCmd(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "dump", Name: "dump",
Short: `print the metadata of the given node. String attributes will be enclosed in quotes. Binary attributes will be returned encoded as base64 with their value being prefixed with '0s'.`, Usage: `print the metadata of the given node. String attributes will be enclosed in quotes. Binary attributes will be returned encoded as base64 with their value being prefixed with '0s'.`,
RunE: func(cmd *cobra.Command, args []string) error { Action: func(c *cli.Context) error {
lu, backend := getBackend(cmd) lu, backend := getBackend(c)
path, err := getNode(cmd, lu) path, err := getNode(c, lu)
if err != nil { if err != nil {
return err return err
} }
attribs, err := backend.All(cmd.Context(), path) attribs, err := backend.All(c.Context, path)
if err != nil { if err != nil {
fmt.Println("Error reading attributes") fmt.Println("Error reading attributes")
return err return err
} }
attributeFlag, _ := cmd.Flags().GetString("attribute") printAttribs(attribs, c.String("attribute"))
printAttribs(attribs, attributeFlag)
return nil return nil
}, },
} }
} }
func getCmd(_ *config.Config) *cobra.Command { func getCmd(cfg *config.Config) *cli.Command {
gCmd := &cobra.Command{ return &cli.Command{
Use: "get", Name: "get",
Short: `print a specific attribute of the given node. String attributes will be enclosed in quotes. Binary attributes will be returned encoded as base64 with their value being prefixed with '0s'.`, Usage: `print a specific attribute of the given node. String attributes will be enclosed in quotes. Binary attributes will be returned encoded as base64 with their value being prefixed with '0s'.`,
RunE: func(cmd *cobra.Command, args []string) error { Flags: []cli.Flag{
lu, backend := getBackend(cmd) &cli.StringFlag{
path, err := getNode(cmd, lu) Name: "attribute",
Aliases: []string{"a"},
Usage: "attribute to inspect",
},
},
Action: func(c *cli.Context) error {
lu, backend := getBackend(c)
path, err := getNode(c, lu)
if err != nil { if err != nil {
return err return err
} }
attribs, err := backend.All(cmd.Context(), path) attribs, err := backend.All(c.Context, path)
if err != nil { if err != nil {
fmt.Println("Error reading attributes") fmt.Println("Error reading attributes")
return err return err
} }
attributeFlag, _ := cmd.Flags().GetString("attribute") printAttribs(attribs, c.String("attribute"))
printAttribs(attribs, attributeFlag)
return nil return nil
}, },
} }
gCmd.Flags().StringP("attribute", "a", "", "attribute to inspect, can be a glob pattern (e.g. 'user.*' will match all attributes starting with 'user.').")
return gCmd
} }
func setCmd(_ *config.Config) *cobra.Command { func setCmd(cfg *config.Config) *cli.Command {
sCmd := &cobra.Command{ return &cli.Command{
Use: "set", Name: "set",
Short: `manipulate metadata of the given node. Binary attributes can be given hex encoded (prefix by '0x') or base64 encoded (prefix by '0s').`, Usage: `manipulate metadata of the given node. Binary attributes can be given hex encoded (prefix by '0x') or base64 encoded (prefix by '0s').`,
RunE: func(cmd *cobra.Command, args []string) error { Flags: []cli.Flag{
lu, backend := getBackend(cmd) &cli.StringFlag{
n, err := getNode(cmd, lu) Name: "attribute",
Required: true,
Aliases: []string{"a"},
Usage: "attribute to inspect",
},
&cli.StringFlag{
Name: "value",
Required: true,
Aliases: []string{"v"},
Usage: "value to set",
},
},
Action: func(c *cli.Context) error {
lu, backend := getBackend(c)
n, err := getNode(c, lu)
if err != nil { if err != nil {
return err return err
} }
v, _ := cmd.Flags().GetString("value") v := c.String("value")
if strings.HasPrefix(v, "0s") { if strings.HasPrefix(v, "0s") {
b64, err := base64.StdEncoding.DecodeString(v[2:]) b64, err := base64.StdEncoding.DecodeString(v[2:])
if err == nil { if err == nil {
@@ -263,8 +300,7 @@ func setCmd(_ *config.Config) *cobra.Command {
} }
} }
attributeFlag, _ := cmd.Flags().GetString("attribute") err = backend.Set(c.Context, n, c.String("attribute"), []byte(v))
err = backend.Set(cmd.Context(), n, attributeFlag, []byte(v))
if err != nil { if err != nil {
fmt.Println("Error setting attribute") fmt.Println("Error setting attribute")
return err return err
@@ -272,16 +308,9 @@ func setCmd(_ *config.Config) *cobra.Command {
return nil return nil
}, },
} }
sCmd.Flags().StringP("attribute", "a", "", "attribute to inspect, can be a glob pattern (e.g. 'user.*' will match all attributes starting with 'user.').")
_ = sCmd.MarkFlagRequired("attribute")
sCmd.Flags().StringP("value", "v", "", "value to set")
_ = sCmd.MarkFlagRequired("value")
return sCmd
} }
func backend(backend string) metadata.Backend { func backend(root, backend string) metadata.Backend {
switch backend { switch backend {
case "xattrs": case "xattrs":
return metadata.NewXattrsBackend(cache.Config{}) return metadata.NewXattrsBackend(cache.Config{})
@@ -291,11 +320,11 @@ func backend(backend string) metadata.Backend {
return metadata.NullBackend{} return metadata.NullBackend{}
} }
func getBackend(cmd *cobra.Command) (*lookup.Lookup, metadata.Backend) { func getBackend(c *cli.Context) (*lookup.Lookup, metadata.Backend) {
rootFlag, _ := cmd.Flags().GetString("root") rootFlag := c.String("root")
bod := lookup.DetectBackendOnDisk(rootFlag) bod := lookup.DetectBackendOnDisk(rootFlag)
backend := backend(bod) backend := backend(rootFlag, bod)
lu := lookup.New(backend, &options.Options{ lu := lookup.New(backend, &options.Options{
Root: rootFlag, Root: rootFlag,
MetadataBackend: bod, MetadataBackend: bod,
@@ -303,8 +332,8 @@ func getBackend(cmd *cobra.Command) (*lookup.Lookup, metadata.Backend) {
return lu, backend return lu, backend
} }
func getNode(cmd *cobra.Command, lu *lookup.Lookup) (*node.Node, error) { func getNode(c *cli.Context, lu *lookup.Lookup) (*node.Node, error) {
nodeFlag, _ := cmd.Flags().GetString("node") nodeFlag := c.String("node")
id, err := storagespace.ParseID(nodeFlag) id, err := storagespace.ParseID(nodeFlag)
if err != nil { if err != nil {

View File

@@ -0,0 +1,9 @@
package helper
import (
"fmt"
)
func SubcommandDescription(serviceName string) string {
return fmt.Sprintf("%s service commands", serviceName)
}

View File

@@ -11,19 +11,49 @@ import (
"github.com/opencloud-eu/opencloud/opencloud/pkg/register" "github.com/opencloud-eu/opencloud/opencloud/pkg/register"
"github.com/opencloud-eu/opencloud/pkg/config" "github.com/opencloud-eu/opencloud/pkg/config"
"github.com/opencloud-eu/opencloud/pkg/config/defaults" "github.com/opencloud-eu/opencloud/pkg/config/defaults"
cli "github.com/urfave/cli/v2"
"github.com/spf13/cobra"
"github.com/spf13/viper"
) )
// InitCommand is the entrypoint for the init command // InitCommand is the entrypoint for the init command
func InitCommand(_ *config.Config) *cobra.Command { func InitCommand(cfg *config.Config) *cli.Command {
initCmd := &cobra.Command{ return &cli.Command{
Use: "init", Name: "init",
Short: "initialise an OpenCloud config", Usage: "initialise an OpenCloud config",
GroupID: CommandGroupServer, Flags: []cli.Flag{
RunE: func(cmd *cobra.Command, args []string) error { &cli.StringFlag{
insecureFlag := viper.GetString("insecure") Name: "insecure",
EnvVars: []string{"OC_INSECURE"},
Value: "ask",
Usage: "Allow insecure OpenCloud config",
},
&cli.BoolFlag{
Name: "diff",
Aliases: []string{"d"},
Usage: "Show the difference between the current config and the new one",
Value: false,
},
&cli.BoolFlag{
Name: "force-overwrite",
Aliases: []string{"f"},
EnvVars: []string{"OC_FORCE_CONFIG_OVERWRITE"},
Value: false,
Usage: "Force overwrite existing config file",
},
&cli.StringFlag{
Name: "config-path",
Value: defaults.BaseConfigPath(),
Usage: "Config path for the OpenCloud runtime",
EnvVars: []string{"OC_CONFIG_DIR", "OC_BASE_DATA_PATH"},
},
&cli.StringFlag{
Name: "admin-password",
Aliases: []string{"ap"},
EnvVars: []string{"ADMIN_PASSWORD", "IDM_ADMIN_PASSWORD"},
Usage: "Set admin password instead of using a random generated one",
},
},
Action: func(c *cli.Context) error {
insecureFlag := c.String("insecure")
insecure := false insecure := false
if insecureFlag == "ask" { if insecureFlag == "ask" {
answer := strings.ToLower(stringPrompt("Do you want to configure OpenCloud with certificate checking disabled?\n This is not recommended for public instances! [yes | no = default]")) answer := strings.ToLower(stringPrompt("Do you want to configure OpenCloud with certificate checking disabled?\n This is not recommended for public instances! [yes | no = default]"))
@@ -33,37 +63,13 @@ func InitCommand(_ *config.Config) *cobra.Command {
} else if insecureFlag == strings.ToLower("true") || insecureFlag == strings.ToLower("yes") || insecureFlag == strings.ToLower("y") { } else if insecureFlag == strings.ToLower("true") || insecureFlag == strings.ToLower("yes") || insecureFlag == strings.ToLower("y") {
insecure = true insecure = true
} }
forceOverwriteFlag := viper.GetBool("force-overwrite") err := ocinit.CreateConfig(insecure, c.Bool("force-overwrite"), c.Bool("diff"), c.String("config-path"), c.String("admin-password"))
diffFlag, _ := cmd.Flags().GetBool("diff")
configPathFlag := viper.GetString("config-path")
adminPasswordFlag := viper.GetString("admin-password")
err := ocinit.CreateConfig(insecure, forceOverwriteFlag, diffFlag, configPathFlag, adminPasswordFlag)
if err != nil { if err != nil {
log.Fatalf("Could not create config: %s", err) log.Fatalf("Could not create config: %s", err)
} }
return nil return nil
}, },
} }
initCmd.Flags().String("insecure", "ask", "Allow insecure OpenCloud config")
_ = viper.BindEnv("insecure", "OC_INSECURE")
_ = viper.BindPFlag("insecure", initCmd.Flags().Lookup("insecure"))
initCmd.Flags().BoolP("diff", "d", false, "Show the difference between the current config and the new one")
initCmd.Flags().BoolP("force-overwrite", "f", false, "Force overwrite existing config file")
_ = viper.BindEnv("force-overwrite", "OC_FORCE_CONFIG_OVERWRITE")
_ = viper.BindPFlag("force-overwrite", initCmd.Flags().Lookup("force-overwrite"))
initCmd.Flags().String("config-path", defaults.BaseConfigPath(), "Config path for the OpenCloud runtime")
_ = viper.BindEnv("config-path", "OC_CONFIG_DIR")
_ = viper.BindEnv("config-path", "OC_BASE_DATA_PATH")
_ = viper.BindPFlag("config-path", initCmd.Flags().Lookup("config-path"))
initCmd.Flags().String("admin-password", "", "Set admin password instead of using a random generated one")
_ = viper.BindEnv("admin-password", "ADMIN_PASSWORD")
_ = viper.BindEnv("admin-password", "IDM_ADMIN_PASSWORD")
_ = viper.BindPFlag("admin-password", initCmd.Flags().Lookup("admin-password"))
return initCmd
} }
func init() { func init() {
@@ -74,7 +80,7 @@ func stringPrompt(label string) string {
input := "" input := ""
reader := bufio.NewReader(os.Stdin) reader := bufio.NewReader(os.Stdin)
for { for {
_, _ = fmt.Fprint(os.Stderr, label+" ") fmt.Fprint(os.Stderr, label+" ")
input, _ = reader.ReadString('\n') input, _ = reader.ReadString('\n')
if input != "" { if input != "" {
break break

View File

@@ -8,26 +8,31 @@ import (
"github.com/opencloud-eu/opencloud/opencloud/pkg/register" "github.com/opencloud-eu/opencloud/opencloud/pkg/register"
"github.com/opencloud-eu/opencloud/pkg/config" "github.com/opencloud-eu/opencloud/pkg/config"
"github.com/opencloud-eu/opencloud/pkg/config/configlog" "github.com/urfave/cli/v2"
"github.com/opencloud-eu/opencloud/pkg/config/parser"
"github.com/spf13/cobra"
"github.com/spf13/viper"
) )
// ListCommand is the entrypoint for the list command. // ListCommand is the entrypoint for the list command.
func ListCommand(cfg *config.Config) *cobra.Command { func ListCommand(cfg *config.Config) *cli.Command {
listCmd := &cobra.Command{ return &cli.Command{
Use: "list", Name: "list",
Short: "list OpenCloud services running in the runtime (supervised mode)", Usage: "list OpenCloud services running in the runtime (supervised mode)",
PersistentPreRunE: func(cmd *cobra.Command, args []string) error { Category: "runtime",
return configlog.ReturnError(parser.ParseConfig(cfg, true)) Flags: []cli.Flag{
&cli.StringFlag{
Name: "hostname",
Value: "localhost",
EnvVars: []string{"OC_RUNTIME_HOST"},
Destination: &cfg.Runtime.Host,
},
&cli.StringFlag{
Name: "port",
Value: "9250",
EnvVars: []string{"OC_RUNTIME_PORT"},
Destination: &cfg.Runtime.Port,
},
}, },
RunE: func(cmd *cobra.Command, args []string) error { Action: func(c *cli.Context) error {
host := viper.GetString("hostname") client, err := rpc.DialHTTP("tcp", net.JoinHostPort(cfg.Runtime.Host, cfg.Runtime.Port))
port := viper.GetString("port")
client, err := rpc.DialHTTP("tcp", net.JoinHostPort(host, port))
if err != nil { if err != nil {
log.Fatalf("Failed to connect to the runtime. Has the runtime been started and did you configure the right runtime address (\"%s\")", cfg.Runtime.Host+":"+cfg.Runtime.Port) log.Fatalf("Failed to connect to the runtime. Has the runtime been started and did you configure the right runtime address (\"%s\")", cfg.Runtime.Host+":"+cfg.Runtime.Port)
} }
@@ -43,15 +48,6 @@ func ListCommand(cfg *config.Config) *cobra.Command {
return nil return nil
}, },
} }
listCmd.Flags().String("hostname", "localhost", "hostname of the runtime")
_ = viper.BindEnv("hostname", "OC_RUNTIME_HOST")
_ = viper.BindPFlag("hostname", listCmd.Flags().Lookup("hostname"))
listCmd.Flags().String("port", "9250", "port of the runtime")
_ = viper.BindEnv("port", "OC_RUNTIME_PORT")
_ = viper.BindPFlag("port", listCmd.Flags().Lookup("port"))
return listCmd
} }
func init() { func init() {

View File

@@ -10,10 +10,9 @@ import (
"github.com/opencloud-eu/opencloud/opencloud/pkg/register" "github.com/opencloud-eu/opencloud/opencloud/pkg/register"
"github.com/opencloud-eu/opencloud/pkg/config" "github.com/opencloud-eu/opencloud/pkg/config"
"github.com/pkg/xattr" "github.com/pkg/xattr"
"github.com/spf13/cobra"
"github.com/theckman/yacspin" "github.com/theckman/yacspin"
"github.com/urfave/cli/v2"
"github.com/vmihailenco/msgpack/v5" "github.com/vmihailenco/msgpack/v5"
) )
@@ -38,16 +37,15 @@ type EntryInfo struct {
} }
// PosixfsCommand is the entrypoint for the posixfs command. // PosixfsCommand is the entrypoint for the posixfs command.
func PosixfsCommand(cfg *config.Config) *cobra.Command { func PosixfsCommand(cfg *config.Config) *cli.Command {
posixCmd := &cobra.Command{ return &cli.Command{
Use: "posixfs", Name: "posixfs",
Short: `cli tools to inspect and manipulate a posixfs storage.`, Usage: `cli tools to inspect and manipulate a posixfs storage.`,
GroupID: CommandGroupStorage, Category: "maintenance",
Subcommands: []*cli.Command{
consistencyCmd(cfg),
},
} }
posixCmd.AddCommand(consistencyCmd(cfg))
return posixCmd
} }
func init() { func init() {
@@ -55,23 +53,27 @@ func init() {
} }
// consistencyCmd returns a command to check the consistency of the posixfs storage. // consistencyCmd returns a command to check the consistency of the posixfs storage.
func consistencyCmd(cfg *config.Config) *cobra.Command { func consistencyCmd(cfg *config.Config) *cli.Command {
consCmd := &cobra.Command{ return &cli.Command{
Use: "consistency", Name: "consistency",
Short: "check the consistency of the posixfs storage", Usage: "check the consistency of the posixfs storage",
RunE: func(cmd *cobra.Command, args []string) error { Action: func(c *cli.Context) error {
return checkPosixfsConsistency(cmd, cfg) return checkPosixfsConsistency(c, cfg)
},
Flags: []cli.Flag{
&cli.StringFlag{
Name: "root",
Aliases: []string{"r"},
Required: true,
Usage: "Path to the root directory of the posixfs storage",
},
}, },
} }
consCmd.Flags().StringP("root", "r", "", "Path to the root directory of the posixfs storage")
_ = consCmd.MarkFlagRequired("root")
return consCmd
} }
// checkPosixfsConsistency checks the consistency of the posixfs storage. // checkPosixfsConsistency checks the consistency of the posixfs storage.
func checkPosixfsConsistency(cmd *cobra.Command, cfg *config.Config) error { func checkPosixfsConsistency(c *cli.Context, cfg *config.Config) error {
rootPath, _ := cmd.Flags().GetString("root") rootPath := c.String("root")
indexesPath := filepath.Join(rootPath, "indexes") indexesPath := filepath.Join(rootPath, "indexes")
_, err := os.Stat(indexesPath) _, err := os.Stat(indexesPath)

View File

@@ -6,7 +6,6 @@ import (
"path/filepath" "path/filepath"
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
"github.com/opencloud-eu/opencloud/opencloud/pkg/register" "github.com/opencloud-eu/opencloud/opencloud/pkg/register"
"github.com/opencloud-eu/opencloud/opencloud/pkg/revisions" "github.com/opencloud-eu/opencloud/opencloud/pkg/revisions"
"github.com/opencloud-eu/opencloud/pkg/config" "github.com/opencloud-eu/opencloud/pkg/config"
@@ -16,8 +15,7 @@ import (
decomposeds3bs "github.com/opencloud-eu/reva/v2/pkg/storage/fs/decomposeds3/blobstore" decomposeds3bs "github.com/opencloud-eu/reva/v2/pkg/storage/fs/decomposeds3/blobstore"
"github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/lookup" "github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/lookup"
"github.com/opencloud-eu/reva/v2/pkg/storagespace" "github.com/opencloud-eu/reva/v2/pkg/storagespace"
"github.com/urfave/cli/v2"
"github.com/spf13/cobra"
) )
var ( var (
@@ -26,33 +24,75 @@ var (
) )
// RevisionsCommand is the entrypoint for the revisions command. // RevisionsCommand is the entrypoint for the revisions command.
func RevisionsCommand(cfg *config.Config) *cobra.Command { func RevisionsCommand(cfg *config.Config) *cli.Command {
revCmd := &cobra.Command{ return &cli.Command{
Use: "revisions", Name: "revisions",
Short: "OpenCloud revisions functionality", Usage: "OpenCloud revisions functionality",
PersistentPreRunE: func(cmd *cobra.Command, args []string) error { Subcommands: []*cli.Command{
PurgeRevisionsCommand(cfg),
},
Before: func(_ *cli.Context) error {
return configlog.ReturnError(parser.ParseConfig(cfg, true)) return configlog.ReturnError(parser.ParseConfig(cfg, true))
}, },
Action: func(_ *cli.Context) error {
fmt.Println("Read the docs")
return nil
},
} }
revCmd.AddCommand(PurgeRevisionsCommand(cfg))
return revCmd
} }
// PurgeRevisionsCommand allows removing all revisions from a storage provider. // PurgeRevisionsCommand allows removing all revisions from a storage provider.
func PurgeRevisionsCommand(cfg *config.Config) *cobra.Command { func PurgeRevisionsCommand(cfg *config.Config) *cli.Command {
revCmd := &cobra.Command{ return &cli.Command{
Use: "purge", Name: "purge",
Short: "purge revisions", Usage: "purge revisions",
RunE: func(cmd *cobra.Command, args []string) error { Flags: []cli.Flag{
basePath, _ := cmd.Flags().GetString("basepath") &cli.StringFlag{
Name: "basepath",
Aliases: []string{"p"},
Usage: "the basepath of the decomposedfs (e.g. /var/tmp/opencloud/storage/metadata)",
Required: true,
},
&cli.StringFlag{
Name: "blobstore",
Aliases: []string{"b"},
Usage: "the blobstore type. Can be (none, decomposed, decomposeds3). Default decomposed. Note: When using decomposeds3 this needs same configuration as the storage-users service",
Value: "decomposed",
},
&cli.BoolFlag{
Name: "dry-run",
Usage: "do not delete anything, just print what would be deleted",
Value: true,
},
&cli.BoolFlag{
Name: "verbose",
Aliases: []string{"v"},
Usage: "print verbose output",
Value: false,
},
&cli.StringFlag{
Name: "resource-id",
Aliases: []string{"r"},
Usage: "purge all revisions of this file/space. If not set, all revisions will be purged",
},
&cli.StringFlag{
Name: "glob-mechanism",
Usage: "the glob mechanism to find all nodes. Can be 'glob', 'list' or 'workers'. 'glob' uses globbing with a single worker. 'workers' spawns multiple go routines, accelatering the command drastically but causing high cpu and ram usage. 'list' looks for references by listing directories with multiple workers. Default is 'glob'",
Value: "glob",
},
},
Action: func(c *cli.Context) error {
basePath := c.String("basepath")
if basePath == "" {
fmt.Println("basepath is required")
return cli.ShowCommandHelp(c, "revisions")
}
var ( var (
bs revisions.DelBlobstore bs revisions.DelBlobstore
err error err error
) )
blobstoreFlag, _ := cmd.Flags().GetString("blobstore") switch c.String("blobstore") {
switch blobstoreFlag {
case "decomposeds3": case "decomposeds3":
bs, err = decomposeds3bs.New( bs, err = decomposeds3bs.New(
cfg.StorageUsers.Drivers.DecomposedS3.Endpoint, cfg.StorageUsers.Drivers.DecomposedS3.Endpoint,
@@ -75,13 +115,12 @@ func PurgeRevisionsCommand(cfg *config.Config) *cobra.Command {
} }
var rid *provider.ResourceId var rid *provider.ResourceId
resourceIDFlag, _ := cmd.Flags().GetString("resource-id") resid, err := storagespace.ParseID(c.String("resource-id"))
resid, err := storagespace.ParseID(resourceIDFlag)
if err == nil { if err == nil {
rid = &resid rid = &resid
} }
mechanism, _ := cmd.Flags().GetString("glob-mechanism") mechanism := c.String("glob-mechanism")
if rid.GetOpaqueId() != "" { if rid.GetOpaqueId() != "" {
mechanism = "glob" mechanism = "glob"
} }
@@ -107,30 +146,11 @@ func PurgeRevisionsCommand(cfg *config.Config) *cobra.Command {
ch = revisions.List(p, 10) ch = revisions.List(p, 10)
} }
flagDryRun, err := cmd.Flags().GetBool("dry-run") files, blobs, revisions := revisions.PurgeRevisions(ch, bs, c.Bool("dry-run"), c.Bool("verbose"))
if err != nil { printResults(files, blobs, revisions, c.Bool("dry-run"))
return err
}
flagVerbose, err := cmd.Flags().GetBool("verbose")
if err != nil {
return err
}
files, blobs, revisionResults := revisions.PurgeRevisions(ch, bs, flagDryRun, flagVerbose)
printResults(files, blobs, revisionResults, flagDryRun)
return nil return nil
}, },
} }
revCmd.Flags().StringP("basepath", "p", "", "the basepath of the decomposedfs (e.g. /var/tmp/opencloud/storage/metadata)")
_ = revCmd.MarkFlagRequired("basepath")
revCmd.Flags().StringP("blobstore", "b", "decomposed", "the blobstore type. Can be (none, decomposed, decomposeds3). Default decomposed")
revCmd.Flags().Bool("dry-run", true, "do not delete anything, just print what would be deleted")
revCmd.Flags().BoolP("verbose", "v", false, "print verbose output")
revCmd.Flags().StringP("resource-id", "r", "", "purge all revisions of this file/space. If not set, all revisions will be purged")
revCmd.Flags().String("glob-mechanism", "glob", "the glob mechanism to find all nodes. Can be 'glob', 'list' or 'workers'. 'glob' uses globbing with a single worker. 'workers' spawns multiple go routines, accelatering the command drastically but causing high cpu and ram usage. 'list' looks for references by listing directories with multiple workers. Default is 'glob'")
return revCmd
} }
func printResults(countFiles, countBlobs, countRevisions int, dryRun bool) { func printResults(countFiles, countBlobs, countRevisions int, dryRun bool) {

View File

@@ -9,32 +9,25 @@ import (
"github.com/opencloud-eu/opencloud/opencloud/pkg/register" "github.com/opencloud-eu/opencloud/opencloud/pkg/register"
"github.com/opencloud-eu/opencloud/pkg/clihelper" "github.com/opencloud-eu/opencloud/pkg/clihelper"
"github.com/opencloud-eu/opencloud/pkg/config" "github.com/opencloud-eu/opencloud/pkg/config"
"github.com/urfave/cli/v2"
"github.com/spf13/cobra"
) )
// Execute is the entry point for the opencloud command. // Execute is the entry point for the opencloud command.
func Execute() error { func Execute() error {
cfg := config.DefaultConfig() cfg := config.DefaultConfig()
app := clihelper.DefaultApp(&cobra.Command{ app := clihelper.DefaultApp(&cli.App{
Use: "opencloud", Name: "opencloud",
Short: "opencloud", Usage: "opencloud",
}) })
for _, commandFactory := range register.Commands { for _, fn := range register.Commands {
command := commandFactory(cfg) app.Commands = append(
app.Commands,
if command.GroupID != "" && !app.ContainsGroup(command.GroupID) { fn(cfg),
app.AddGroup(&cobra.Group{ )
ID: command.GroupID,
Title: command.GroupID,
})
}
app.AddCommand(command)
} }
app.SetArgs(os.Args[1:])
ctx, _ := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP) ctx, _ := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
return app.ExecuteContext(ctx) return app.RunContext(ctx, os.Args)
} }

View File

@@ -6,23 +6,22 @@ import (
"github.com/opencloud-eu/opencloud/pkg/config" "github.com/opencloud-eu/opencloud/pkg/config"
"github.com/opencloud-eu/opencloud/pkg/config/configlog" "github.com/opencloud-eu/opencloud/pkg/config/configlog"
"github.com/opencloud-eu/opencloud/pkg/config/parser" "github.com/opencloud-eu/opencloud/pkg/config/parser"
"github.com/urfave/cli/v2"
"github.com/spf13/cobra"
) )
// Server is the entrypoint for the server command. // Server is the entrypoint for the server command.
func Server(cfg *config.Config) *cobra.Command { func Server(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "server", Name: "server",
Short: "start a fullstack server (runtime and all services in supervised mode)", Usage: "start a fullstack server (runtime and all services in supervised mode)",
PreRunE: func(cmd *cobra.Command, args []string) error { Category: "fullstack",
Before: func(c *cli.Context) error {
return configlog.ReturnError(parser.ParseConfig(cfg, false)) return configlog.ReturnError(parser.ParseConfig(cfg, false))
}, },
GroupID: CommandGroupServer, Action: func(c *cli.Context) error {
RunE: func(cmd *cobra.Command, args []string) error {
// Prefer the in-memory registry as the default when running in single-binary mode // Prefer the in-memory registry as the default when running in single-binary mode
r := runtime.New(cfg) r := runtime.New(cfg)
return r.Start(cmd.Context()) return r.Start(c.Context)
}, },
} }
} }

View File

@@ -1,8 +1,9 @@
package command package command
import ( import (
"fmt" "github.com/urfave/cli/v2"
"github.com/opencloud-eu/opencloud/opencloud/pkg/command/helper"
"github.com/opencloud-eu/opencloud/opencloud/pkg/register" "github.com/opencloud-eu/opencloud/opencloud/pkg/register"
"github.com/opencloud-eu/opencloud/pkg/config" "github.com/opencloud-eu/opencloud/pkg/config"
"github.com/opencloud-eu/opencloud/pkg/config/configlog" "github.com/opencloud-eu/opencloud/pkg/config/configlog"
@@ -49,243 +50,238 @@ import (
web "github.com/opencloud-eu/opencloud/services/web/pkg/command" web "github.com/opencloud-eu/opencloud/services/web/pkg/command"
webdav "github.com/opencloud-eu/opencloud/services/webdav/pkg/command" webdav "github.com/opencloud-eu/opencloud/services/webdav/pkg/command"
webfinger "github.com/opencloud-eu/opencloud/services/webfinger/pkg/command" webfinger "github.com/opencloud-eu/opencloud/services/webfinger/pkg/command"
"github.com/spf13/cobra"
) )
var serviceCommands = []register.Command{ var svccmds = []register.Command{
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.Activitylog.Service.Name, activitylog.GetCommands(cfg.Activitylog), func(c *config.Config) { return ServiceCommand(cfg, cfg.Activitylog.Service.Name, activitylog.GetCommands(cfg.Activitylog), func(c *config.Config) {
cfg.Activitylog.Commons = cfg.Commons cfg.Activitylog.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.Antivirus.Service.Name, antivirus.GetCommands(cfg.Antivirus), func(c *config.Config) { return ServiceCommand(cfg, cfg.Antivirus.Service.Name, antivirus.GetCommands(cfg.Antivirus), func(c *config.Config) {
cfg.Antivirus.Commons = cfg.Commons // cfg.Antivirus.Commons = cfg.Commons // antivirus needs no commons atm
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.AppProvider.Service.Name, appprovider.GetCommands(cfg.AppProvider), func(c *config.Config) { return ServiceCommand(cfg, cfg.AppProvider.Service.Name, appprovider.GetCommands(cfg.AppProvider), func(c *config.Config) {
cfg.AppProvider.Commons = cfg.Commons cfg.AppProvider.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.AppRegistry.Service.Name, appregistry.GetCommands(cfg.AppRegistry), func(c *config.Config) { return ServiceCommand(cfg, cfg.AppRegistry.Service.Name, appregistry.GetCommands(cfg.AppRegistry), func(c *config.Config) {
cfg.AppRegistry.Commons = cfg.Commons cfg.AppRegistry.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.Audit.Service.Name, audit.GetCommands(cfg.Audit), func(c *config.Config) { return ServiceCommand(cfg, cfg.Audit.Service.Name, audit.GetCommands(cfg.Audit), func(c *config.Config) {
cfg.Audit.Commons = cfg.Commons cfg.Audit.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.AuthApp.Service.Name, authapp.GetCommands(cfg.AuthApp), func(_ *config.Config) { return ServiceCommand(cfg, cfg.AuthApp.Service.Name, authapp.GetCommands(cfg.AuthApp), func(_ *config.Config) {
cfg.AuthApp.Commons = cfg.Commons cfg.AuthApp.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.AuthBasic.Service.Name, authbasic.GetCommands(cfg.AuthBasic), func(c *config.Config) { return ServiceCommand(cfg, cfg.AuthBasic.Service.Name, authbasic.GetCommands(cfg.AuthBasic), func(c *config.Config) {
cfg.AuthBasic.Commons = cfg.Commons cfg.AuthBasic.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.AuthBearer.Service.Name, authbearer.GetCommands(cfg.AuthBearer), func(c *config.Config) { return ServiceCommand(cfg, cfg.AuthBearer.Service.Name, authbearer.GetCommands(cfg.AuthBearer), func(c *config.Config) {
cfg.AuthBearer.Commons = cfg.Commons cfg.AuthBearer.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.AuthMachine.Service.Name, authmachine.GetCommands(cfg.AuthMachine), func(c *config.Config) { return ServiceCommand(cfg, cfg.AuthMachine.Service.Name, authmachine.GetCommands(cfg.AuthMachine), func(c *config.Config) {
cfg.AuthMachine.Commons = cfg.Commons cfg.AuthMachine.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.AuthService.Service.Name, authservice.GetCommands(cfg.AuthService), func(c *config.Config) { return ServiceCommand(cfg, cfg.AuthService.Service.Name, authservice.GetCommands(cfg.AuthService), func(c *config.Config) {
cfg.AuthService.Commons = cfg.Commons cfg.AuthService.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.Clientlog.Service.Name, clientlog.GetCommands(cfg.Clientlog), func(c *config.Config) { return ServiceCommand(cfg, cfg.Clientlog.Service.Name, clientlog.GetCommands(cfg.Clientlog), func(c *config.Config) {
cfg.Clientlog.Commons = cfg.Commons cfg.Clientlog.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.Collaboration.Service.Name, collaboration.GetCommands(cfg.Collaboration), func(c *config.Config) { return ServiceCommand(cfg, cfg.Collaboration.Service.Name, collaboration.GetCommands(cfg.Collaboration), func(c *config.Config) {
cfg.Collaboration.Commons = cfg.Commons cfg.Collaboration.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.EventHistory.Service.Name, eventhistory.GetCommands(cfg.EventHistory), func(c *config.Config) { return ServiceCommand(cfg, cfg.EventHistory.Service.Name, eventhistory.GetCommands(cfg.EventHistory), func(c *config.Config) {
cfg.EventHistory.Commons = cfg.Commons cfg.EventHistory.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.Frontend.Service.Name, frontend.GetCommands(cfg.Frontend), func(c *config.Config) { return ServiceCommand(cfg, cfg.Frontend.Service.Name, frontend.GetCommands(cfg.Frontend), func(c *config.Config) {
cfg.Frontend.Commons = cfg.Commons cfg.Frontend.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.Gateway.Service.Name, gateway.GetCommands(cfg.Gateway), func(c *config.Config) { return ServiceCommand(cfg, cfg.Gateway.Service.Name, gateway.GetCommands(cfg.Gateway), func(c *config.Config) {
cfg.Gateway.Commons = cfg.Commons cfg.Gateway.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.Graph.Service.Name, graph.GetCommands(cfg.Graph), func(c *config.Config) { return ServiceCommand(cfg, cfg.Graph.Service.Name, graph.GetCommands(cfg.Graph), func(c *config.Config) {
cfg.Graph.Commons = cfg.Commons cfg.Graph.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.Groups.Service.Name, groups.GetCommands(cfg.Groups), func(c *config.Config) { return ServiceCommand(cfg, cfg.Groups.Service.Name, groups.GetCommands(cfg.Groups), func(c *config.Config) {
cfg.Groups.Commons = cfg.Commons cfg.Groups.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.IDM.Service.Name, idm.GetCommands(cfg.IDM), func(c *config.Config) { return ServiceCommand(cfg, cfg.IDM.Service.Name, idm.GetCommands(cfg.IDM), func(c *config.Config) {
cfg.IDM.Commons = cfg.Commons cfg.IDM.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.IDP.Service.Name, idp.GetCommands(cfg.IDP), func(c *config.Config) { return ServiceCommand(cfg, cfg.IDP.Service.Name, idp.GetCommands(cfg.IDP), func(c *config.Config) {
cfg.IDP.Commons = cfg.Commons cfg.IDP.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.Invitations.Service.Name, invitations.GetCommands(cfg.Invitations), func(c *config.Config) { return ServiceCommand(cfg, cfg.Invitations.Service.Name, invitations.GetCommands(cfg.Invitations), func(c *config.Config) {
cfg.Invitations.Commons = cfg.Commons cfg.Invitations.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.Nats.Service.Name, nats.GetCommands(cfg.Nats), func(c *config.Config) { return ServiceCommand(cfg, cfg.Nats.Service.Name, nats.GetCommands(cfg.Nats), func(c *config.Config) {
cfg.Nats.Commons = cfg.Commons cfg.Nats.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.Notifications.Service.Name, notifications.GetCommands(cfg.Notifications), func(c *config.Config) { return ServiceCommand(cfg, cfg.Notifications.Service.Name, notifications.GetCommands(cfg.Notifications), func(c *config.Config) {
cfg.Notifications.Commons = cfg.Commons cfg.Notifications.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.OCDav.Service.Name, ocdav.GetCommands(cfg.OCDav), func(c *config.Config) { return ServiceCommand(cfg, cfg.OCDav.Service.Name, ocdav.GetCommands(cfg.OCDav), func(c *config.Config) {
cfg.OCDav.Commons = cfg.Commons cfg.OCDav.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.OCM.Service.Name, ocm.GetCommands(cfg.OCM), func(c *config.Config) { return ServiceCommand(cfg, cfg.OCM.Service.Name, ocm.GetCommands(cfg.OCM), func(c *config.Config) {
cfg.OCM.Commons = cfg.Commons cfg.OCM.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.OCS.Service.Name, ocs.GetCommands(cfg.OCS), func(c *config.Config) { return ServiceCommand(cfg, cfg.OCS.Service.Name, ocs.GetCommands(cfg.OCS), func(c *config.Config) {
cfg.OCS.Commons = cfg.Commons cfg.OCS.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.Policies.Service.Name, policies.GetCommands(cfg.Policies), func(c *config.Config) { return ServiceCommand(cfg, cfg.Policies.Service.Name, policies.GetCommands(cfg.Policies), func(c *config.Config) {
cfg.Policies.Commons = cfg.Commons cfg.Policies.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.Postprocessing.Service.Name, postprocessing.GetCommands(cfg.Postprocessing), func(c *config.Config) { return ServiceCommand(cfg, cfg.Postprocessing.Service.Name, postprocessing.GetCommands(cfg.Postprocessing), func(c *config.Config) {
cfg.Postprocessing.Commons = cfg.Commons cfg.Postprocessing.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.Proxy.Service.Name, proxy.GetCommands(cfg.Proxy), func(c *config.Config) { return ServiceCommand(cfg, cfg.Proxy.Service.Name, proxy.GetCommands(cfg.Proxy), func(c *config.Config) {
cfg.Proxy.Commons = cfg.Commons cfg.Proxy.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.Search.Service.Name, search.GetCommands(cfg.Search), func(c *config.Config) { return ServiceCommand(cfg, cfg.Search.Service.Name, search.GetCommands(cfg.Search), func(c *config.Config) {
cfg.Search.Commons = cfg.Commons cfg.Search.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.Settings.Service.Name, settings.GetCommands(cfg.Settings), func(c *config.Config) { return ServiceCommand(cfg, cfg.Settings.Service.Name, settings.GetCommands(cfg.Settings), func(c *config.Config) {
cfg.Settings.Commons = cfg.Commons cfg.Settings.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.Sharing.Service.Name, sharing.GetCommands(cfg.Sharing), func(c *config.Config) { return ServiceCommand(cfg, cfg.Sharing.Service.Name, sharing.GetCommands(cfg.Sharing), func(c *config.Config) {
cfg.Sharing.Commons = cfg.Commons cfg.Sharing.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.SSE.Service.Name, sse.GetCommands(cfg.SSE), func(c *config.Config) { return ServiceCommand(cfg, cfg.SSE.Service.Name, sse.GetCommands(cfg.SSE), func(c *config.Config) {
cfg.SSE.Commons = cfg.Commons cfg.SSE.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.StoragePublicLink.Service.Name, storagepubliclink.GetCommands(cfg.StoragePublicLink), func(c *config.Config) { return ServiceCommand(cfg, cfg.StoragePublicLink.Service.Name, storagepubliclink.GetCommands(cfg.StoragePublicLink), func(c *config.Config) {
cfg.StoragePublicLink.Commons = cfg.Commons cfg.StoragePublicLink.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.StorageShares.Service.Name, storageshares.GetCommands(cfg.StorageShares), func(c *config.Config) { return ServiceCommand(cfg, cfg.StorageShares.Service.Name, storageshares.GetCommands(cfg.StorageShares), func(c *config.Config) {
cfg.StorageShares.Commons = cfg.Commons cfg.StorageShares.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.StorageSystem.Service.Name, storagesystem.GetCommands(cfg.StorageSystem), func(c *config.Config) { return ServiceCommand(cfg, cfg.StorageSystem.Service.Name, storagesystem.GetCommands(cfg.StorageSystem), func(c *config.Config) {
cfg.StorageSystem.Commons = cfg.Commons cfg.StorageSystem.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.StorageUsers.Service.Name, storageusers.GetCommands(cfg.StorageUsers), func(c *config.Config) { return ServiceCommand(cfg, cfg.StorageUsers.Service.Name, storageusers.GetCommands(cfg.StorageUsers), func(c *config.Config) {
cfg.StorageUsers.Commons = cfg.Commons cfg.StorageUsers.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.Thumbnails.Service.Name, thumbnails.GetCommands(cfg.Thumbnails), func(c *config.Config) { return ServiceCommand(cfg, cfg.Thumbnails.Service.Name, thumbnails.GetCommands(cfg.Thumbnails), func(c *config.Config) {
cfg.Thumbnails.Commons = cfg.Commons cfg.Thumbnails.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.Userlog.Service.Name, userlog.GetCommands(cfg.Userlog), func(c *config.Config) { return ServiceCommand(cfg, cfg.Userlog.Service.Name, userlog.GetCommands(cfg.Userlog), func(c *config.Config) {
cfg.Userlog.Commons = cfg.Commons cfg.Userlog.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.Users.Service.Name, users.GetCommands(cfg.Users), func(c *config.Config) { return ServiceCommand(cfg, cfg.Users.Service.Name, users.GetCommands(cfg.Users), func(c *config.Config) {
cfg.Users.Commons = cfg.Commons cfg.Users.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.Web.Service.Name, web.GetCommands(cfg.Web), func(c *config.Config) { return ServiceCommand(cfg, cfg.Web.Service.Name, web.GetCommands(cfg.Web), func(c *config.Config) {
cfg.Web.Commons = cfg.Commons cfg.Web.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.WebDAV.Service.Name, webdav.GetCommands(cfg.WebDAV), func(c *config.Config) { return ServiceCommand(cfg, cfg.WebDAV.Service.Name, webdav.GetCommands(cfg.WebDAV), func(c *config.Config) {
cfg.WebDAV.Commons = cfg.Commons cfg.WebDAV.Commons = cfg.Commons
}) })
}, },
func(cfg *config.Config) *cobra.Command { func(cfg *config.Config) *cli.Command {
return ServiceCommand(cfg, cfg.Webfinger.Service.Name, webfinger.GetCommands(cfg.Webfinger), func(c *config.Config) { return ServiceCommand(cfg, cfg.Webfinger.Service.Name, webfinger.GetCommands(cfg.Webfinger), func(c *config.Config) {
cfg.Webfinger.Commons = cfg.Commons cfg.Webfinger.Commons = cfg.Commons
}) })
}, },
} }
// ServiceCommand composes a cobra command from the given inputs. // ServiceCommand is the entry point for the all service commands.
func ServiceCommand(cfg *config.Config, serviceName string, subCommands []*cobra.Command, f func(*config.Config)) *cobra.Command { func ServiceCommand(cfg *config.Config, serviceName string, subcommands []*cli.Command, f func(*config.Config)) *cli.Command {
command := &cobra.Command{ return &cli.Command{
Use: serviceName, Name: serviceName,
Short: fmt.Sprintf("%s service commands", serviceName), Usage: helper.SubcommandDescription(serviceName),
GroupID: CommandGroupServices, Category: "services",
PersistentPreRunE: func(cmd *cobra.Command, args []string) error { Before: func(c *cli.Context) error {
configlog.Error(parser.ParseConfig(cfg, true)) configlog.Error(parser.ParseConfig(cfg, true))
f(cfg) f(cfg)
return nil return nil
}, },
Subcommands: subcommands,
} }
command.AddCommand(subCommands...)
return command
} }
func init() { func init() {
for _, c := range serviceCommands { for _, c := range svccmds {
register.AddCommand(c) register.AddCommand(c)
} }
} }

View File

@@ -3,7 +3,13 @@ package command
import ( import (
"errors" "errors"
"github.com/spf13/viper" "github.com/rs/zerolog"
"github.com/urfave/cli/v2"
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"
"github.com/opencloud-eu/reva/v2/pkg/share/manager/jsoncs3"
"github.com/opencloud-eu/reva/v2/pkg/share/manager/registry"
"github.com/opencloud-eu/reva/v2/pkg/utils"
"github.com/opencloud-eu/opencloud/opencloud/pkg/register" "github.com/opencloud-eu/opencloud/opencloud/pkg/register"
"github.com/opencloud-eu/opencloud/pkg/config" "github.com/opencloud-eu/opencloud/pkg/config"
@@ -13,21 +19,15 @@ import (
mregistry "github.com/opencloud-eu/opencloud/pkg/registry" mregistry "github.com/opencloud-eu/opencloud/pkg/registry"
sharing "github.com/opencloud-eu/opencloud/services/sharing/pkg/config" sharing "github.com/opencloud-eu/opencloud/services/sharing/pkg/config"
sharingparser "github.com/opencloud-eu/opencloud/services/sharing/pkg/config/parser" sharingparser "github.com/opencloud-eu/opencloud/services/sharing/pkg/config/parser"
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"
"github.com/opencloud-eu/reva/v2/pkg/share/manager/jsoncs3"
"github.com/opencloud-eu/reva/v2/pkg/share/manager/registry"
"github.com/opencloud-eu/reva/v2/pkg/utils"
"github.com/rs/zerolog"
"github.com/spf13/cobra"
) )
// SharesCommand is the entrypoint for the groups command. // SharesCommand is the entrypoint for the groups command.
func SharesCommand(cfg *config.Config) *cobra.Command { func SharesCommand(cfg *config.Config) *cli.Command {
sharesCmd := &cobra.Command{ return &cli.Command{
Use: "shares", Name: "shares",
Short: `cli tools to manage entries in the share manager.`, Usage: `cli tools to manage entries in the share manager.`,
PreRunE: func(cmd *cobra.Command, args []string) error { Category: "maintenance",
Before: func(c *cli.Context) error {
// Parse base config // Parse base config
if err := parser.ParseConfig(cfg, true); err != nil { if err := parser.ParseConfig(cfg, true); err != nil {
return configlog.ReturnError(err) return configlog.ReturnError(err)
@@ -37,21 +37,37 @@ func SharesCommand(cfg *config.Config) *cobra.Command {
cfg.Sharing.Commons = cfg.Commons cfg.Sharing.Commons = cfg.Commons
return configlog.ReturnError(sharingparser.ParseConfig(cfg.Sharing)) return configlog.ReturnError(sharingparser.ParseConfig(cfg.Sharing))
}, },
Subcommands: []*cli.Command{
cleanupCmd(cfg),
},
} }
sharesCmd.AddCommand(cleanupCmd(cfg))
return sharesCmd
} }
func init() { func init() {
register.AddCommand(SharesCommand) register.AddCommand(SharesCommand)
} }
func cleanupCmd(cfg *config.Config) *cobra.Command { func cleanupCmd(cfg *config.Config) *cli.Command {
cleanCmd := &cobra.Command{ return &cli.Command{
Use: "cleanup", Name: "cleanup",
Short: `clean up stale entries in the share manager.`, Usage: `clean up stale entries in the share manager.`,
PreRunE: func(cmd *cobra.Command, args []string) error { Flags: []cli.Flag{
&cli.StringFlag{
Name: "service-account-id",
Value: "",
Usage: "Name of the service account to use for the cleanup",
EnvVars: []string{"OC_SERVICE_ACCOUNT_ID"},
Required: true,
},
&cli.StringFlag{
Name: "service-account-secret",
Value: "",
Usage: "Secret for the service account",
EnvVars: []string{"OC_SERVICE_ACCOUNT_SECRET"},
Required: true,
},
},
Before: func(c *cli.Context) error {
// Parse base config // Parse base config
if err := parser.ParseConfig(cfg, true); err != nil { if err := parser.ParseConfig(cfg, true); err != nil {
return configlog.ReturnError(err) return configlog.ReturnError(err)
@@ -61,24 +77,13 @@ func cleanupCmd(cfg *config.Config) *cobra.Command {
cfg.Sharing.Commons = cfg.Commons cfg.Sharing.Commons = cfg.Commons
return configlog.ReturnError(sharingparser.ParseConfig(cfg.Sharing)) return configlog.ReturnError(sharingparser.ParseConfig(cfg.Sharing))
}, },
RunE: func(cmd *cobra.Command, args []string) error { Action: func(c *cli.Context) error {
return cleanup(cmd, cfg) return cleanup(c, cfg)
}, },
} }
cleanCmd.Flags().String("service-account-id", "", "Name of the service account to use for the cleanup")
_ = cleanCmd.MarkFlagRequired("service-account-id")
_ = viper.BindEnv("service-account-id", "OC_SERVICE_ACCOUNT_ID")
_ = viper.BindPFlag("service-account-id", cleanCmd.Flags().Lookup("service-account-id"))
cleanCmd.Flags().String("service-account-secret", "", "Secret for the service account")
_ = cleanCmd.MarkFlagRequired("service-account-secret")
_ = viper.BindEnv("service-account-secret", "OC_SERVICE_ACCOUNT_SECRET")
_ = viper.BindPFlag("service-account-secret", cleanCmd.Flags().Lookup("service-account-secret"))
return cleanCmd
} }
func cleanup(_ *cobra.Command, cfg *config.Config) error { func cleanup(c *cli.Context, cfg *config.Config) error {
driver := cfg.Sharing.UserSharingDriver driver := cfg.Sharing.UserSharingDriver
// cleanup is only implemented for the jsoncs3 share manager // cleanup is only implemented for the jsoncs3 share manager
if driver != "jsoncs3" { if driver != "jsoncs3" {
@@ -109,9 +114,7 @@ func cleanup(_ *cobra.Command, cfg *config.Config) error {
return configlog.ReturnError(err) return configlog.ReturnError(err)
} }
serviceAccountIDFlag := viper.GetString("service-account-id") serviceUserCtx, err := utils.GetServiceUserContext(c.String("service-account-id"), client, c.String("service-account-secret"))
serviceAccountSecretFlag := viper.GetString("service-account-secret")
serviceUserCtx, err := utils.GetServiceUserContext(serviceAccountIDFlag, client, serviceAccountSecretFlag)
if err != nil { if err != nil {
return configlog.ReturnError(err) return configlog.ReturnError(err)
} }
@@ -168,6 +171,39 @@ func revaShareConfig(cfg *sharing.Config) map[string]interface{} {
} }
} }
func revaPublicShareConfig(cfg *sharing.Config) map[string]interface{} {
return map[string]interface{}{
"json": map[string]interface{}{
"file": cfg.PublicSharingDrivers.JSON.File,
"gateway_addr": cfg.Reva.Address,
},
"jsoncs3": map[string]interface{}{
"gateway_addr": cfg.Reva.Address,
"provider_addr": cfg.PublicSharingDrivers.JSONCS3.ProviderAddr,
"service_user_id": cfg.PublicSharingDrivers.JSONCS3.SystemUserID,
"service_user_idp": cfg.PublicSharingDrivers.JSONCS3.SystemUserIDP,
"machine_auth_apikey": cfg.PublicSharingDrivers.JSONCS3.SystemUserAPIKey,
},
"sql": map[string]interface{}{
"db_username": cfg.PublicSharingDrivers.SQL.DBUsername,
"db_password": cfg.PublicSharingDrivers.SQL.DBPassword,
"db_host": cfg.PublicSharingDrivers.SQL.DBHost,
"db_port": cfg.PublicSharingDrivers.SQL.DBPort,
"db_name": cfg.PublicSharingDrivers.SQL.DBName,
"password_hash_cost": cfg.PublicSharingDrivers.SQL.PasswordHashCost,
"enable_expired_shares_cleanup": cfg.PublicSharingDrivers.SQL.EnableExpiredSharesCleanup,
"janitor_run_interval": cfg.PublicSharingDrivers.SQL.JanitorRunInterval,
},
"cs3": map[string]interface{}{
"gateway_addr": cfg.PublicSharingDrivers.CS3.ProviderAddr,
"provider_addr": cfg.PublicSharingDrivers.CS3.ProviderAddr,
"service_user_id": cfg.PublicSharingDrivers.CS3.SystemUserID,
"service_user_idp": cfg.PublicSharingDrivers.CS3.SystemUserIDP,
"machine_auth_apikey": cfg.PublicSharingDrivers.CS3.SystemUserAPIKey,
},
}
}
func logger() *zerolog.Logger { func logger() *zerolog.Logger {
log := oclog.NewLogger( log := oclog.NewLogger(
oclog.Name("migrate"), oclog.Name("migrate"),

View File

@@ -3,40 +3,57 @@ package command
import ( import (
"fmt" "fmt"
"github.com/opencloud-eu/opencloud/opencloud/pkg/register"
"github.com/opencloud-eu/opencloud/opencloud/pkg/trash" "github.com/opencloud-eu/opencloud/opencloud/pkg/trash"
"github.com/opencloud-eu/opencloud/opencloud/pkg/register"
"github.com/opencloud-eu/opencloud/pkg/config" "github.com/opencloud-eu/opencloud/pkg/config"
"github.com/opencloud-eu/opencloud/pkg/config/configlog" "github.com/opencloud-eu/opencloud/pkg/config/configlog"
"github.com/opencloud-eu/opencloud/pkg/config/parser" "github.com/opencloud-eu/opencloud/pkg/config/parser"
"github.com/urfave/cli/v2"
"github.com/spf13/cobra"
) )
func TrashCommand(cfg *config.Config) *cobra.Command { func TrashCommand(cfg *config.Config) *cli.Command {
trashCmd := &cobra.Command{ return &cli.Command{
Use: "trash", Name: "trash",
Short: "OpenCloud trash functionality", Usage: "OpenCloud trash functionality",
PreRunE: func(cmd *cobra.Command, args []string) error { Subcommands: []*cli.Command{
TrashPurgeEmptyDirsCommand(cfg),
},
Before: func(c *cli.Context) error {
return configlog.ReturnError(parser.ParseConfig(cfg, true)) return configlog.ReturnError(parser.ParseConfig(cfg, true))
}, },
RunE: func(cmd *cobra.Command, args []string) error { Action: func(_ *cli.Context) error {
fmt.Println("Read the docs") fmt.Println("Read the docs")
return nil return nil
}, },
} }
trashCmd.AddCommand(TrashPurgeEmptyDirsCommand(cfg))
return trashCmd
} }
func TrashPurgeEmptyDirsCommand(cfg *config.Config) *cobra.Command { func TrashPurgeEmptyDirsCommand(cfg *config.Config) *cli.Command {
trashPurgeCmd := &cobra.Command{ return &cli.Command{
Use: "purge-empty-dirs", Name: "purge-empty-dirs",
Short: "purge empty directories", Usage: "purge empty directories",
RunE: func(cmd *cobra.Command, args []string) error { Flags: []cli.Flag{
basePath, _ := cmd.Flags().GetString("basepath") &cli.StringFlag{
dryRun, _ := cmd.Flags().GetBool("dry-run") Name: "basepath",
if err := trash.PurgeTrashEmptyPaths(basePath, dryRun); err != nil { Aliases: []string{"p"},
Usage: "the basepath of the decomposedfs (e.g. /var/tmp/opencloud/storage/users)",
Required: true,
},
&cli.BoolFlag{
Name: "dry-run",
Usage: "do not delete anything, just print what would be deleted",
Value: true,
},
},
Action: func(c *cli.Context) error {
basePath := c.String("basepath")
if basePath == "" {
fmt.Println("basepath is required")
return cli.ShowCommandHelp(c, "trash")
}
if err := trash.PurgeTrashEmptyPaths(basePath, c.Bool("dry-run")); err != nil {
fmt.Println(err) fmt.Println(err)
return err return err
} }
@@ -44,12 +61,6 @@ func TrashPurgeEmptyDirsCommand(cfg *config.Config) *cobra.Command {
return nil return nil
}, },
} }
trashPurgeCmd.Flags().StringP("basepath", "p", "", "the basepath of the decomposedfs (e.g. /var/tmp/opencloud/storage/users)")
_ = trashPurgeCmd.MarkFlagRequired("basepath")
trashPurgeCmd.Flags().Bool("dry-run", true, "do not delete anything, just print what would be deleted")
return trashPurgeCmd
} }
func init() { func init() {

View File

@@ -4,16 +4,15 @@ import (
"fmt" "fmt"
"os" "os"
"github.com/spf13/cobra" "github.com/olekukonko/tablewriter"
"github.com/olekukonko/tablewriter/tw"
"github.com/urfave/cli/v2"
mreg "go-micro.dev/v4/registry"
"github.com/opencloud-eu/opencloud/opencloud/pkg/register" "github.com/opencloud-eu/opencloud/opencloud/pkg/register"
"github.com/opencloud-eu/opencloud/pkg/config" "github.com/opencloud-eu/opencloud/pkg/config"
"github.com/opencloud-eu/opencloud/pkg/registry" "github.com/opencloud-eu/opencloud/pkg/registry"
"github.com/opencloud-eu/opencloud/pkg/version" "github.com/opencloud-eu/opencloud/pkg/version"
"github.com/olekukonko/tablewriter"
"github.com/olekukonko/tablewriter/tw"
mreg "go-micro.dev/v4/registry"
) )
const ( const (
@@ -21,18 +20,22 @@ const (
) )
// VersionCommand is the entrypoint for the version command. // VersionCommand is the entrypoint for the version command.
func VersionCommand(cfg *config.Config) *cobra.Command { func VersionCommand(cfg *config.Config) *cli.Command {
versionCmd := &cobra.Command{ return &cli.Command{
Use: "version", Name: "version",
Short: "print the version of this binary and all running service instances", Usage: "print the version of this binary and all running service instances",
GroupID: CommandGroupServer, Flags: []cli.Flag{
RunE: func(cmd *cobra.Command, args []string) error { &cli.BoolFlag{
Name: _skipServiceListingFlagName,
Usage: "skip service listing",
},
},
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString()) fmt.Println("Version: " + version.GetString())
fmt.Printf("Edition: %s\n", version.Edition)
fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Printf("Compiled: %s\n", version.Compiled())
skipServiceListing, _ := cmd.Flags().GetBool(_skipServiceListingFlagName) if c.Bool(_skipServiceListingFlagName) {
if skipServiceListing {
return nil return nil
} }
@@ -71,8 +74,6 @@ func VersionCommand(cfg *config.Config) *cobra.Command {
return nil return nil
}, },
} }
versionCmd.Flags().Bool(_skipServiceListingFlagName, false, "skip service listing")
return versionCmd
} }
func init() { func init() {

View File

@@ -1,18 +1,17 @@
package register package register
import ( import (
"github.com/spf13/cobra"
"github.com/opencloud-eu/opencloud/pkg/config" "github.com/opencloud-eu/opencloud/pkg/config"
"github.com/urfave/cli/v2"
) )
var ( var (
// Commands define the slice of commands. // Commands defines the slice of commands.
Commands []Command Commands = []Command{}
) )
// Command defines the register command. // Command defines the register command.
type Command func(*config.Config) *cobra.Command type Command func(*config.Config) *cli.Command
// AddCommand appends a command to Commands. // AddCommand appends a command to Commands.
func AddCommand(cmd Command) { func AddCommand(cmd Command) {

View File

@@ -2,12 +2,14 @@ package runtime
import ( import (
"github.com/opencloud-eu/opencloud/pkg/log" "github.com/opencloud-eu/opencloud/pkg/log"
"github.com/urfave/cli/v2"
) )
// Options is a runtime option // Options is a runtime option
type Options struct { type Options struct {
Services []string Services []string
Logger log.Logger Logger log.Logger
Context *cli.Context
} }
// Option undocumented // Option undocumented
@@ -19,3 +21,10 @@ func Services(s []string) Option {
o.Services = append(o.Services, s...) o.Services = append(o.Services, s...)
} }
} }
// Context option
func Context(c *cli.Context) Option {
return func(o *Options) {
o.Context = c
}
}

View File

@@ -124,7 +124,7 @@ func NewService(ctx context.Context, options ...Option) (*Service, error) {
if s.Services[priority] == nil { if s.Services[priority] == nil {
s.Services[priority] = make(serviceFuncMap) s.Services[priority] = make(serviceFuncMap)
} }
s.Services[priority][name] = NewSutureServiceBuilder(name, exec) s.Services[priority][name] = NewSutureServiceBuilder(exec)
} }
// nats is in priority group 0. It needs to start before all other services // nats is in priority group 0. It needs to start before all other services
@@ -316,7 +316,7 @@ func NewService(ctx context.Context, options ...Option) (*Service, error) {
// populate optional services // populate optional services
areg := func(name string, exec func(context.Context, *occfg.Config) error) { areg := func(name string, exec func(context.Context, *occfg.Config) error) {
s.Additional[name] = NewSutureServiceBuilder(name, exec) s.Additional[name] = NewSutureServiceBuilder(exec)
} }
areg(opts.Config.Antivirus.Service.Name, func(ctx context.Context, cfg *occfg.Config) error { areg(opts.Config.Antivirus.Service.Name, func(ctx context.Context, cfg *occfg.Config) error {
cfg.Antivirus.Context = ctx cfg.Antivirus.Context = ctx

View File

@@ -10,17 +10,15 @@ import (
// SutureService allows for the settings command to be embedded and supervised by a suture supervisor tree. // SutureService allows for the settings command to be embedded and supervised by a suture supervisor tree.
type SutureService struct { type SutureService struct {
exec func(ctx context.Context) error exec func(ctx context.Context) error
name string
} }
// NewSutureServiceBuilder creates a new suture service // NewSutureServiceBuilder creates a new suture service
func NewSutureServiceBuilder(name string, f func(context.Context, *occfg.Config) error) func(*occfg.Config) suture.Service { func NewSutureServiceBuilder(f func(context.Context, *occfg.Config) error) func(*occfg.Config) suture.Service {
return func(cfg *occfg.Config) suture.Service { return func(cfg *occfg.Config) suture.Service {
return SutureService{ return SutureService{
exec: func(ctx context.Context) error { exec: func(ctx context.Context) error {
return f(ctx, cfg) return f(ctx, cfg)
}, },
name: name,
} }
} }
} }
@@ -29,8 +27,3 @@ func NewSutureServiceBuilder(name string, f func(context.Context, *occfg.Config)
func (s SutureService) Serve(ctx context.Context) error { func (s SutureService) Serve(ctx context.Context) error {
return s.exec(ctx) return s.exec(ctx)
} }
// String to fullfil fmt.Stringer interface, used to log the service name
func (s SutureService) String() string {
return s.name
}

View File

@@ -1,18 +1,26 @@
package clihelper package clihelper
import ( import (
"fmt"
"github.com/opencloud-eu/opencloud/pkg/version" "github.com/opencloud-eu/opencloud/pkg/version"
"github.com/urfave/cli/v2"
"github.com/spf13/cobra"
) )
// DefaultApp is a wrapper for DefaultApp that adds Cobra specific settings func DefaultApp(app *cli.App) *cli.App {
func DefaultApp(app *cobra.Command) *cobra.Command {
// TODO: when migration is done this has to become DefaultApp
// version info // version info
app.Version = fmt.Sprintf("%s (%s <%s>) (%s)", version.String, "OpenCloud GmbH", "support@opencloud.eu", version.Compiled()) app.Version = version.String
app.Compiled = version.Compiled()
// author info
app.Authors = []*cli.Author{
{
Name: "OpenCloud GmbH",
Email: "support@opencloud.eu",
},
}
// disable global version flag
// instead we provide the version command
app.HideVersion = true
return app return app
} }

View File

@@ -6,8 +6,7 @@ import (
"github.com/opencloud-eu/opencloud/pkg/log" "github.com/opencloud-eu/opencloud/pkg/log"
"github.com/opencloud-eu/opencloud/pkg/shared" "github.com/opencloud-eu/opencloud/pkg/shared"
"github.com/urfave/cli/v2"
"github.com/spf13/pflag"
"go.opentelemetry.io/otel/trace" "go.opentelemetry.io/otel/trace"
) )
@@ -24,7 +23,7 @@ type Options struct {
Address string Address string
Handler http.Handler Handler http.Handler
Context context.Context Context context.Context
Flags []pflag.Flag Flags []cli.Flag
TraceProvider trace.TracerProvider TraceProvider trace.TracerProvider
} }
@@ -84,7 +83,7 @@ func Context(ctx context.Context) Option {
} }
// Flags provides a function to set the flags option. // Flags provides a function to set the flags option.
func Flags(flags ...pflag.Flag) Option { func Flags(flags ...cli.Flag) Option {
return func(o *Options) { return func(o *Options) {
o.Flags = append(o.Flags, flags...) o.Flags = append(o.Flags, flags...)
} }

View File

@@ -49,8 +49,6 @@ func NewService(opts ...Option) (Service, error) {
} }
tlsConfig := &tls.Config{ tlsConfig := &tls.Config{
Certificates: []tls.Certificate{cert}, Certificates: []tls.Certificate{cert},
MinVersion: tls.VersionTLS12,
NextProtos: []string{"h2", "http/1.1"},
} }
mServer = mhttps.NewServer(server.TLSConfig(tlsConfig)) mServer = mhttps.NewServer(server.TLSConfig(tlsConfig))
} else { } else {
@@ -64,8 +62,7 @@ func NewService(opts ...Option) (Service, error) {
micro.Name(strings.Join([]string{sopts.Namespace, sopts.Name}, ".")), micro.Name(strings.Join([]string{sopts.Namespace, sopts.Name}, ".")),
micro.Version(sopts.Version), micro.Version(sopts.Version),
micro.Context(sopts.Context), micro.Context(sopts.Context),
// TODO: clarify if this is actually used on the go-micro side micro.Flags(sopts.Flags...),
//micro.Flags(sopts.Flags...),
micro.Registry(registry.GetRegistry()), micro.Registry(registry.GetRegistry()),
micro.RegisterTTL(registry.GetRegisterTTL()), micro.RegisterTTL(registry.GetRegisterTTL()),
micro.RegisterInterval(registry.GetRegisterInterval()), micro.RegisterInterval(registry.GetRegisterInterval()),

View File

@@ -105,19 +105,9 @@ func createResource(ctx context.Context, serviceName string) (*resource.Resource
return resource.New(ctx, return resource.New(ctx,
// Reads OTEL_RESOURCE_ATTRIBUTES and OTEL_SERVICE_NAME // Reads OTEL_RESOURCE_ATTRIBUTES and OTEL_SERVICE_NAME
resource.WithFromEnv(), resource.WithFromEnv(),
// Host Information // Host and process information
resource.WithHost(), resource.WithHost(),
// Process Information resource.WithProcess(),
// Resource WithProcessOwner is deliberately omitted because
// inside containers where process might run as an arbitrary
// uid without a username associated this would fail.
resource.WithProcessPID(),
resource.WithProcessCommandArgs(),
resource.WithProcessExecutableName(),
resource.WithProcessExecutablePath(),
resource.WithProcessRuntimeDescription(),
resource.WithProcessRuntimeName(),
resource.WithProcessRuntimeVersion(),
// Service attributes // Service attributes
resource.WithAttributes( resource.WithAttributes(
semconv.ServiceName(serviceName), semconv.ServiceName(serviceName),

View File

@@ -1,4 +0,0 @@
package version
// InitEdition exports the private edition initialization func for testing
var InitEdition = initEdition

View File

@@ -1,27 +1,9 @@
package version package version
import ( import (
"fmt"
"slices"
"strings"
"time" "time"
"github.com/Masterminds/semver" "github.com/Masterminds/semver"
"github.com/opencloud-eu/reva/v2/pkg/logger"
)
const (
// Dev is used as a placeholder.
Dev = "dev"
// EditionDev indicates the development build channel was used to build the binary.
EditionDev = Dev
// EditionRolling indicates the rolling release build channel was used to build the binary.
EditionRolling = "rolling"
// EditionStable indicates the stable release build channel was used to build the binary.
EditionStable = "stable"
// EditionLTS indicates the lts release build channel was used to build the binary.
EditionLTS = "lts"
) )
var ( var (
@@ -34,64 +16,22 @@ var (
// LatestTag is the latest released version plus the dev meta version. // LatestTag is the latest released version plus the dev meta version.
// Will be overwritten by the release pipeline // Will be overwritten by the release pipeline
// Needs a manual change for every tagged release // Needs a manual change for every tagged release
LatestTag = "4.1.0+dev" LatestTag = "4.0.0-rc.2+dev"
// Date indicates the build date. // Date indicates the build date.
// This has been removed, it looks like you can only replace static strings with recent go versions // This has been removed, it looks like you can only replace static strings with recent go versions
//Date = time.Now().Format("20060102") //Date = time.Now().Format("20060102")
Date = Dev Date = "dev"
// Legacy defines the old long 4 number OpenCloud version needed for some clients // Legacy defines the old long 4 number OpenCloud version needed for some clients
Legacy = "0.1.0.0" Legacy = "0.1.0.0"
// LegacyString defines the old OpenCloud version needed for some clients // LegacyString defines the old OpenCloud version needed for some clients
LegacyString = "0.1.0" LegacyString = "0.1.0"
// Edition describes the build channel (stable, rolling, nightly, daily, dev)
Edition = Dev // default for self-compiled builds
) )
func init() { //nolint:gochecknoinits
if err := initEdition(); err != nil {
logger.New().Error().Err(err).Msg("falling back to dev")
}
}
func initEdition() error {
regularEditions := []string{EditionDev, EditionRolling, EditionStable}
versionedEditions := []string{EditionLTS}
if !slices.ContainsFunc(slices.Concat(regularEditions, versionedEditions), func(s string) bool {
isRegularEdition := slices.Contains(regularEditions, Edition)
if isRegularEdition && s == Edition {
return true
}
// handle editions with a version
editionParts := strings.Split(Edition, "-")
if len(editionParts) != 2 { // a versioned edition channel must consist of exactly 2 parts.
return false
}
isVersionedEdition := slices.Contains(versionedEditions, editionParts[0])
if !isVersionedEdition { // not all channels can contain version information
return false
}
_, err := semver.NewVersion(editionParts[1])
return err == nil
}) {
defer func() {
Edition = Dev
}()
return fmt.Errorf(`unknown edition channel '%s'`, Edition)
}
return nil
}
// Compiled returns the compile time of this service. // Compiled returns the compile time of this service.
func Compiled() time.Time { func Compiled() time.Time {
if Date == Dev { if Date == "dev" {
return time.Now() return time.Now()
} }
t, _ := time.Parse("20060102", Date) t, _ := time.Parse("20060102", Date)

View File

@@ -1,68 +0,0 @@
package version_test
import (
"fmt"
"strings"
"testing"
"github.com/opencloud-eu/opencloud/pkg/version"
)
func TestChannel(t *testing.T) {
tests := map[string]struct {
got string
valid bool
}{
"no channel, defaults to dev": {
got: "",
valid: false,
},
"dev channel": {
got: version.EditionDev,
valid: true,
},
"rolling channel": {
got: version.EditionRolling,
valid: true,
},
"stable channel": {
got: version.EditionStable,
valid: true,
},
"lts channel without version": {
got: version.EditionLTS,
valid: false,
},
"lts-1.0.0 channel": {
got: fmt.Sprintf("%s-1", version.EditionLTS),
valid: true,
},
"lts-one invalid version": {
got: fmt.Sprintf("%s-one", version.EditionLTS),
valid: false,
},
"known channel with version": {
got: fmt.Sprintf("%s-1", version.EditionStable),
valid: false,
},
"unknown channel": {
got: "foo",
valid: false,
},
}
for name, test := range tests {
t.Run(name, func(t *testing.T) {
version.Edition = test.got
switch err := version.InitEdition(); {
case err != nil && !test.valid && version.Edition != version.Dev: // if a given edition is unknown, the value is always dev
fallthrough
case test.valid != (err == nil):
t.Fatalf("invalid edition: %s", version.Edition)
case !test.valid && !strings.Contains(err.Error(), "'"+test.got+"'"):
t.Fatalf("no mention of invalid edition '%s' in error: %s", test.got, err.Error())
}
})
}
}

View File

@@ -0,0 +1,19 @@
package main
import (
"context"
"os"
"os/signal"
"syscall"
"github.com/opencloud-eu/opencloud/services/activitylog/pkg/command"
"github.com/opencloud-eu/opencloud/services/activitylog/pkg/config/defaults"
)
func main() {
cfg := defaults.DefaultConfig()
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
if err := command.Execute(cfg); err != nil {
os.Exit(1)
}
}

View File

@@ -2,16 +2,16 @@ package command
import ( import (
"github.com/opencloud-eu/opencloud/services/activitylog/pkg/config" "github.com/opencloud-eu/opencloud/services/activitylog/pkg/config"
"github.com/spf13/cobra" "github.com/urfave/cli/v2"
) )
// Health is the entrypoint for the health command. // Health is the entrypoint for the health command.
func Health(cfg *config.Config) *cobra.Command { func Health(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "health", Name: "health",
Short: "Check health status", Usage: "Check health status",
RunE: func(cmd *cobra.Command, args []string) error { Action: func(c *cli.Context) error {
// not implemented // Not implemented
return nil return nil
}, },
} }

View File

@@ -5,12 +5,12 @@ import (
"github.com/opencloud-eu/opencloud/pkg/clihelper" "github.com/opencloud-eu/opencloud/pkg/clihelper"
"github.com/opencloud-eu/opencloud/services/activitylog/pkg/config" "github.com/opencloud-eu/opencloud/services/activitylog/pkg/config"
"github.com/spf13/cobra" "github.com/urfave/cli/v2"
) )
// GetCommands provides all commands for this service // GetCommands provides all commands for this service
func GetCommands(cfg *config.Config) []*cobra.Command { func GetCommands(cfg *config.Config) cli.Commands {
return []*cobra.Command{ return []*cli.Command{
// start this service // start this service
Server(cfg), Server(cfg),
@@ -24,11 +24,11 @@ func GetCommands(cfg *config.Config) []*cobra.Command {
// Execute is the entry point for the activitylog command. // Execute is the entry point for the activitylog command.
func Execute(cfg *config.Config) error { func Execute(cfg *config.Config) error {
app := clihelper.DefaultApp(&cobra.Command{ app := clihelper.DefaultApp(&cli.App{
Use: "activitylog", Name: "activitylog",
Short: "starts activitylog service", Usage: "starts activitylog service",
Commands: GetCommands(cfg),
}) })
app.AddCommand(GetCommands(cfg)...)
app.SetArgs(os.Args[1:]) return app.RunContext(cfg.Context, os.Args)
return app.ExecuteContext(cfg.Context)
} }

View File

@@ -9,7 +9,7 @@ import (
"github.com/opencloud-eu/reva/v2/pkg/events/stream" "github.com/opencloud-eu/reva/v2/pkg/events/stream"
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool" "github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"
"github.com/opencloud-eu/reva/v2/pkg/store" "github.com/opencloud-eu/reva/v2/pkg/store"
"github.com/spf13/cobra" "github.com/urfave/cli/v2"
microstore "go-micro.dev/v4/store" microstore "go-micro.dev/v4/store"
"github.com/opencloud-eu/opencloud/pkg/config/configlog" "github.com/opencloud-eu/opencloud/pkg/config/configlog"
@@ -47,23 +47,24 @@ var _registeredEvents = []events.Unmarshaller{
} }
// Server is the entrypoint for the server command. // Server is the entrypoint for the server command.
func Server(cfg *config.Config) *cobra.Command { func Server(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "server", Name: "server",
Short: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name), Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
PreRunE: func(cmd *cobra.Command, args []string) error { Category: "server",
Before: func(c *cli.Context) error {
return configlog.ReturnFatal(parser.ParseConfig(cfg)) return configlog.ReturnFatal(parser.ParseConfig(cfg))
}, },
RunE: func(cmd *cobra.Command, args []string) error { Action: func(c *cli.Context) error {
logger := logging.Configure(cfg.Service.Name, cfg.Log) logger := logging.Configure(cfg.Service.Name, cfg.Log)
tracerProvider, err := tracing.GetTraceProvider(cmd.Context(), cfg.Commons.TracesExporter, cfg.Service.Name) tracerProvider, err := tracing.GetTraceProvider(c.Context, cfg.Commons.TracesExporter, cfg.Service.Name)
if err != nil { if err != nil {
logger.Error().Err(err).Msg("Failed to initialize tracer") logger.Error().Err(err).Msg("Failed to initialize tracer")
return err return err
} }
gr := run.Group{} gr := run.Group{}
ctx, cancel := context.WithCancel(cmd.Context()) ctx, cancel := context.WithCancel(c.Context)
mtrcs := metrics.New() mtrcs := metrics.New()
mtrcs.BuildInfo.WithLabelValues(version.GetString()).Set(1) mtrcs.BuildInfo.WithLabelValues(version.GetString()).Set(1)

View File

@@ -2,15 +2,16 @@ package command
import ( import (
"github.com/opencloud-eu/opencloud/services/activitylog/pkg/config" "github.com/opencloud-eu/opencloud/services/activitylog/pkg/config"
"github.com/spf13/cobra" "github.com/urfave/cli/v2"
) )
// Version prints the service versions of all running instances. // Version prints the service versions of all running instances.
func Version(cfg *config.Config) *cobra.Command { func Version(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "version", Name: "version",
Short: "Print the version of this binary and the running service instances", Usage: "print the version of this binary and the running service instances",
RunE: func(cmd *cobra.Command, args []string) error { Category: "info",
Action: func(c *cli.Context) error {
// not implemented // not implemented
return nil return nil
}, },

View File

@@ -40,7 +40,7 @@ type Config struct {
type Events struct { type Events struct {
Endpoint string `yaml:"endpoint" env:"OC_EVENTS_ENDPOINT" desc:"The address of the event system. The event system is the message queuing service. It is used as message broker for the microservice architecture." introductionVersion:"1.0.0"` Endpoint string `yaml:"endpoint" env:"OC_EVENTS_ENDPOINT" desc:"The address of the event system. The event system is the message queuing service. It is used as message broker for the microservice architecture." introductionVersion:"1.0.0"`
Cluster string `yaml:"cluster" env:"OC_EVENTS_CLUSTER" desc:"The clusterID of the event system. The event system is the message queuing service. It is used as message broker for the microservice architecture. Mandatory when using NATS as event system." introductionVersion:"1.0.0"` Cluster string `yaml:"cluster" env:"OC_EVENTS_CLUSTER" desc:"The clusterID of the event system. The event system is the message queuing service. It is used as message broker for the microservice architecture. Mandatory when using NATS as event system." introductionVersion:"1.0.0"`
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_EVENTS_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"1.0.0"` TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"1.0.0"`
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_EVENTS_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided NOTIFICATIONS_EVENTS_TLS_INSECURE will be seen as false." introductionVersion:"1.0.0"` TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_EVENTS_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided NOTIFICATIONS_EVENTS_TLS_INSECURE will be seen as false." introductionVersion:"1.0.0"`
EnableTLS bool `yaml:"enable_tls" env:"OC_EVENTS_ENABLE_TLS" desc:"Enable TLS for the connection to the events broker. The events broker is the OpenCloud service which receives and delivers events between the services." introductionVersion:"1.0.0"` EnableTLS bool `yaml:"enable_tls" env:"OC_EVENTS_ENABLE_TLS" desc:"Enable TLS for the connection to the events broker. The events broker is the OpenCloud service which receives and delivers events between the services." introductionVersion:"1.0.0"`
AuthUsername string `yaml:"username" env:"OC_EVENTS_AUTH_USERNAME" desc:"The username to authenticate with the events broker. The events broker is the OpenCloud service which receives and delivers events between the services." introductionVersion:"1.0.0"` AuthUsername string `yaml:"username" env:"OC_EVENTS_AUTH_USERNAME" desc:"The username to authenticate with the events broker. The events broker is the OpenCloud service which receives and delivers events between the services." introductionVersion:"1.0.0"`

View File

@@ -11,8 +11,7 @@ import (
"github.com/opencloud-eu/opencloud/services/activitylog/pkg/metrics" "github.com/opencloud-eu/opencloud/services/activitylog/pkg/metrics"
"github.com/opencloud-eu/reva/v2/pkg/events" "github.com/opencloud-eu/reva/v2/pkg/events"
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool" "github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"
"github.com/urfave/cli/v2"
"github.com/spf13/pflag"
"go-micro.dev/v4/store" "go-micro.dev/v4/store"
"go.opentelemetry.io/otel/trace" "go.opentelemetry.io/otel/trace"
) )
@@ -26,7 +25,7 @@ type Options struct {
Context context.Context Context context.Context
Config *config.Config Config *config.Config
Metrics *metrics.Metrics Metrics *metrics.Metrics
Flags []pflag.Flag Flags []cli.Flag
Namespace string Namespace string
Store store.Store Store store.Store
Stream events.Stream Stream events.Stream
@@ -77,9 +76,9 @@ func Metrics(val *metrics.Metrics) Option {
} }
// Flags provides a function to set the flags option. // Flags provides a function to set the flags option.
func Flags(flags ...pflag.Flag) Option { func Flags(val []cli.Flag) Option {
return func(o *Options) { return func(o *Options) {
o.Flags = append(o.Flags, flags...) o.Flags = append(o.Flags, val...)
} }
} }

View File

@@ -11,7 +11,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: EMAIL\n" "Report-Msgid-Bugs-To: EMAIL\n"
"POT-Creation-Date: 2025-12-20 00:05+0000\n" "POT-Creation-Date: 2025-11-09 00:02+0000\n"
"PO-Revision-Date: 2025-01-27 10:17+0000\n" "PO-Revision-Date: 2025-01-27 10:17+0000\n"
"Last-Translator: Ivan Fustero, 2025\n" "Last-Translator: Ivan Fustero, 2025\n"
"Language-Team: Catalan (https://app.transifex.com/opencloud-eu/teams/204053/ca/)\n" "Language-Team: Catalan (https://app.transifex.com/opencloud-eu/teams/204053/ca/)\n"

View File

@@ -11,7 +11,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: EMAIL\n" "Report-Msgid-Bugs-To: EMAIL\n"
"POT-Creation-Date: 2025-12-20 00:05+0000\n" "POT-Creation-Date: 2025-11-09 00:02+0000\n"
"PO-Revision-Date: 2025-01-27 10:17+0000\n" "PO-Revision-Date: 2025-01-27 10:17+0000\n"
"Last-Translator: Jörn Friedrich Dreyer <jfd@butonic.de>, 2025\n" "Last-Translator: Jörn Friedrich Dreyer <jfd@butonic.de>, 2025\n"
"Language-Team: German (https://app.transifex.com/opencloud-eu/teams/204053/de/)\n" "Language-Team: German (https://app.transifex.com/opencloud-eu/teams/204053/de/)\n"

View File

@@ -11,7 +11,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: EMAIL\n" "Report-Msgid-Bugs-To: EMAIL\n"
"POT-Creation-Date: 2025-12-20 00:05+0000\n" "POT-Creation-Date: 2025-11-09 00:02+0000\n"
"PO-Revision-Date: 2025-01-27 10:17+0000\n" "PO-Revision-Date: 2025-01-27 10:17+0000\n"
"Last-Translator: Elías Martín, 2025\n" "Last-Translator: Elías Martín, 2025\n"
"Language-Team: Spanish (https://app.transifex.com/opencloud-eu/teams/204053/es/)\n" "Language-Team: Spanish (https://app.transifex.com/opencloud-eu/teams/204053/es/)\n"

View File

@@ -11,7 +11,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: EMAIL\n" "Report-Msgid-Bugs-To: EMAIL\n"
"POT-Creation-Date: 2026-01-05 00:06+0000\n" "POT-Creation-Date: 2025-11-26 00:02+0000\n"
"PO-Revision-Date: 2025-01-27 10:17+0000\n" "PO-Revision-Date: 2025-01-27 10:17+0000\n"
"Last-Translator: Jiri Grönroos <jiri.gronroos@iki.fi>, 2025\n" "Last-Translator: Jiri Grönroos <jiri.gronroos@iki.fi>, 2025\n"
"Language-Team: Finnish (https://app.transifex.com/opencloud-eu/teams/204053/fi/)\n" "Language-Team: Finnish (https://app.transifex.com/opencloud-eu/teams/204053/fi/)\n"

View File

@@ -11,7 +11,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: EMAIL\n" "Report-Msgid-Bugs-To: EMAIL\n"
"POT-Creation-Date: 2025-12-20 00:05+0000\n" "POT-Creation-Date: 2025-11-09 00:02+0000\n"
"PO-Revision-Date: 2025-01-27 10:17+0000\n" "PO-Revision-Date: 2025-01-27 10:17+0000\n"
"Last-Translator: eric_G <junk.eg@free.fr>, 2025\n" "Last-Translator: eric_G <junk.eg@free.fr>, 2025\n"
"Language-Team: French (https://app.transifex.com/opencloud-eu/teams/204053/fr/)\n" "Language-Team: French (https://app.transifex.com/opencloud-eu/teams/204053/fr/)\n"

View File

@@ -11,7 +11,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: EMAIL\n" "Report-Msgid-Bugs-To: EMAIL\n"
"POT-Creation-Date: 2025-12-20 00:05+0000\n" "POT-Creation-Date: 2025-11-09 00:02+0000\n"
"PO-Revision-Date: 2025-01-27 10:17+0000\n" "PO-Revision-Date: 2025-01-27 10:17+0000\n"
"Last-Translator: Simone Broglia, 2025\n" "Last-Translator: Simone Broglia, 2025\n"
"Language-Team: Italian (https://app.transifex.com/opencloud-eu/teams/204053/it/)\n" "Language-Team: Italian (https://app.transifex.com/opencloud-eu/teams/204053/it/)\n"

View File

@@ -1,102 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# ii kaka, 2025
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: EMAIL\n"
"POT-Creation-Date: 2026-01-07 00:07+0000\n"
"PO-Revision-Date: 2025-01-27 10:17+0000\n"
"Last-Translator: ii kaka, 2025\n"
"Language-Team: Japanese (https://app.transifex.com/opencloud-eu/teams/204053/ja/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ja\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: pkg/service/response.go:44
msgid "description"
msgstr "詳細"
#: pkg/service/response.go:43
msgid "display name"
msgstr "表示名"
#: pkg/service/response.go:42
msgid "expiration date"
msgstr "有効期限"
#: pkg/service/response.go:41
msgid "password"
msgstr "パスワード"
#: pkg/service/response.go:40
msgid "permission"
msgstr "権限"
#: pkg/service/response.go:39
msgid "some field"
msgstr "特定の項目"
#: pkg/service/response.go:26
msgid "{resource} was downloaded via public link {token}"
msgstr "{resource} が公開リンク {token} 経由でダウンロードされました"
#: pkg/service/response.go:24
msgid "{user} added {resource} to {folder}"
msgstr "{user} が %{resource} を {folder} に追加しました"
#: pkg/service/response.go:36
msgid "{user} added {sharee} as member of {space}"
msgstr "{user} が {sharee} を {space} のメンバーに追加しました"
#: pkg/service/response.go:27
msgid "{user} deleted {resource} from {folder}"
msgstr "{user} が {folder} から {resource} を削除しました"
#: pkg/service/response.go:28
msgid "{user} moved {resource} to {folder}"
msgstr "{user} が {resource} を {folder} に移動しました"
#: pkg/service/response.go:35
msgid "{user} removed link to {resource}"
msgstr "{user} が {resource} へのリンクを解除しました"
#: pkg/service/response.go:32
msgid "{user} removed {sharee} from {resource}"
msgstr "{user} が {resource} の共有から {sharee} を削除しました"
#: pkg/service/response.go:37
msgid "{user} removed {sharee} from {space}"
msgstr "{user} が {space} の共有から {sharee} を削除しました"
#: pkg/service/response.go:29
msgid "{user} renamed {oldResource} to {resource}"
msgstr "{user} が {oldResource} の名前を {resource} に変更しました"
#: pkg/service/response.go:33
msgid "{user} shared {resource} via link"
msgstr "{user} がリンク経由で {resource} を共有しました"
#: pkg/service/response.go:30
msgid "{user} shared {resource} with {sharee}"
msgstr "{user} が {resource} を {sharee} と共有しました"
#: pkg/service/response.go:34
msgid "{user} updated {field} for a link {token} on {resource}"
msgstr "{user} が {resource} のリンク {token}の {field} を更新しました"
#: pkg/service/response.go:31
msgid "{user} updated {field} for the {resource}"
msgstr "{user} が {resource} の {field} を更新しました"
#: pkg/service/response.go:25
msgid "{user} updated {resource} in {folder}"
msgstr "{user} が {folder} 内の {resource} を更新しました"

View File

@@ -12,7 +12,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: EMAIL\n" "Report-Msgid-Bugs-To: EMAIL\n"
"POT-Creation-Date: 2025-12-20 00:05+0000\n" "POT-Creation-Date: 2025-11-09 00:02+0000\n"
"PO-Revision-Date: 2025-01-27 10:17+0000\n" "PO-Revision-Date: 2025-01-27 10:17+0000\n"
"Last-Translator: Junghyuk Kwon <kwon@junghy.uk>, 2025\n" "Last-Translator: Junghyuk Kwon <kwon@junghy.uk>, 2025\n"
"Language-Team: Korean (https://app.transifex.com/opencloud-eu/teams/204053/ko/)\n" "Language-Team: Korean (https://app.transifex.com/opencloud-eu/teams/204053/ko/)\n"

View File

@@ -11,7 +11,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: EMAIL\n" "Report-Msgid-Bugs-To: EMAIL\n"
"POT-Creation-Date: 2025-12-23 00:05+0000\n" "POT-Creation-Date: 2025-11-12 00:01+0000\n"
"PO-Revision-Date: 2025-01-27 10:17+0000\n" "PO-Revision-Date: 2025-01-27 10:17+0000\n"
"Last-Translator: Stephan Paternotte <stephan@paternottes.net>, 2025\n" "Last-Translator: Stephan Paternotte <stephan@paternottes.net>, 2025\n"
"Language-Team: Dutch (https://app.transifex.com/opencloud-eu/teams/204053/nl/)\n" "Language-Team: Dutch (https://app.transifex.com/opencloud-eu/teams/204053/nl/)\n"

View File

@@ -11,7 +11,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: EMAIL\n" "Report-Msgid-Bugs-To: EMAIL\n"
"POT-Creation-Date: 2026-01-02 00:06+0000\n" "POT-Creation-Date: 2025-11-17 00:02+0000\n"
"PO-Revision-Date: 2025-01-27 10:17+0000\n" "PO-Revision-Date: 2025-01-27 10:17+0000\n"
"Last-Translator: Mário Machado, 2025\n" "Last-Translator: Mário Machado, 2025\n"
"Language-Team: Portuguese (https://app.transifex.com/opencloud-eu/teams/204053/pt/)\n" "Language-Team: Portuguese (https://app.transifex.com/opencloud-eu/teams/204053/pt/)\n"

View File

@@ -12,7 +12,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: EMAIL\n" "Report-Msgid-Bugs-To: EMAIL\n"
"POT-Creation-Date: 2025-12-23 00:05+0000\n" "POT-Creation-Date: 2025-11-12 00:01+0000\n"
"PO-Revision-Date: 2025-01-27 10:17+0000\n" "PO-Revision-Date: 2025-01-27 10:17+0000\n"
"Last-Translator: Lulufox, 2025\n" "Last-Translator: Lulufox, 2025\n"
"Language-Team: Russian (https://app.transifex.com/opencloud-eu/teams/204053/ru/)\n" "Language-Team: Russian (https://app.transifex.com/opencloud-eu/teams/204053/ru/)\n"

View File

@@ -11,7 +11,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: EMAIL\n" "Report-Msgid-Bugs-To: EMAIL\n"
"POT-Creation-Date: 2025-12-19 00:05+0000\n" "POT-Creation-Date: 2025-11-08 00:02+0000\n"
"PO-Revision-Date: 2025-01-27 10:17+0000\n" "PO-Revision-Date: 2025-01-27 10:17+0000\n"
"Last-Translator: Daniel Nylander <po@danielnylander.se>, 2025\n" "Last-Translator: Daniel Nylander <po@danielnylander.se>, 2025\n"
"Language-Team: Swedish (https://app.transifex.com/opencloud-eu/teams/204053/sv/)\n" "Language-Team: Swedish (https://app.transifex.com/opencloud-eu/teams/204053/sv/)\n"

View File

@@ -1,102 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Quan Tran, 2025
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: EMAIL\n"
"POT-Creation-Date: 2026-01-06 00:06+0000\n"
"PO-Revision-Date: 2025-01-27 10:17+0000\n"
"Last-Translator: Quan Tran, 2025\n"
"Language-Team: Vietnamese (https://app.transifex.com/opencloud-eu/teams/204053/vi/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: vi\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: pkg/service/response.go:44
msgid "description"
msgstr "mô tả"
#: pkg/service/response.go:43
msgid "display name"
msgstr "tên hiển thị"
#: pkg/service/response.go:42
msgid "expiration date"
msgstr "ngày hết hạn"
#: pkg/service/response.go:41
msgid "password"
msgstr "mật khẩu"
#: pkg/service/response.go:40
msgid "permission"
msgstr "quyền"
#: pkg/service/response.go:39
msgid "some field"
msgstr "một số trường"
#: pkg/service/response.go:26
msgid "{resource} was downloaded via public link {token}"
msgstr "{resource} được tải xuống qua đường dẫn công khai {token}"
#: pkg/service/response.go:24
msgid "{user} added {resource} to {folder}"
msgstr "{user} thêm {resource} vào {folder}"
#: pkg/service/response.go:36
msgid "{user} added {sharee} as member of {space}"
msgstr "{user} thêm {sharee} vào {space}"
#: pkg/service/response.go:27
msgid "{user} deleted {resource} from {folder}"
msgstr "{user} xóa {resource} khỏi {folder}"
#: pkg/service/response.go:28
msgid "{user} moved {resource} to {folder}"
msgstr "{user} chuyển{resource} đến {folder}"
#: pkg/service/response.go:35
msgid "{user} removed link to {resource}"
msgstr "{user} xóa đường liên kết tới {resource}"
#: pkg/service/response.go:32
msgid "{user} removed {sharee} from {resource}"
msgstr "{user} xóa {sharee} khỏi {resource}"
#: pkg/service/response.go:37
msgid "{user} removed {sharee} from {space}"
msgstr "{user} xóa {sharee} khỏi {space}"
#: pkg/service/response.go:29
msgid "{user} renamed {oldResource} to {resource}"
msgstr "{user} đổi tên {oldResource} thành {resource}"
#: pkg/service/response.go:33
msgid "{user} shared {resource} via link"
msgstr "{user} chia sẻ {resource} qua đường liên kết"
#: pkg/service/response.go:30
msgid "{user} shared {resource} with {sharee}"
msgstr "{user} chia sẻ {resource} với {sharee}"
#: pkg/service/response.go:34
msgid "{user} updated {field} for a link {token} on {resource}"
msgstr "{user} cập nhật {field} của đường liên kết {token} đến {resource}"
#: pkg/service/response.go:31
msgid "{user} updated {field} for the {resource}"
msgstr "{user} cập nhật {field} của {resource}"
#: pkg/service/response.go:25
msgid "{user} updated {resource} in {folder}"
msgstr "{user} cập nhật {resource} trong {folder}"

View File

@@ -11,7 +11,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: EMAIL\n" "Report-Msgid-Bugs-To: EMAIL\n"
"POT-Creation-Date: 2025-12-20 00:05+0000\n" "POT-Creation-Date: 2025-11-09 00:02+0000\n"
"PO-Revision-Date: 2025-01-27 10:17+0000\n" "PO-Revision-Date: 2025-01-27 10:17+0000\n"
"Last-Translator: YQS Yang, 2025\n" "Last-Translator: YQS Yang, 2025\n"
"Language-Team: Chinese (https://app.transifex.com/opencloud-eu/teams/204053/zh/)\n" "Language-Team: Chinese (https://app.transifex.com/opencloud-eu/teams/204053/zh/)\n"

View File

@@ -36,13 +36,13 @@ Several factors can make it necessary to limit the maximum filesize the antiviru
Use the `ANTIVIRUS_MAX_SCAN_SIZE` environment variable to scan only a given number of bytes, Use the `ANTIVIRUS_MAX_SCAN_SIZE` environment variable to scan only a given number of bytes,
or to skip the whole resource. or to skip the whole resource.
Even if it is recommended to scan the whole file, several factors like scanner type and version, Even if it's recommended to scan the whole file, several factors like scanner type and version,
bandwidth, performance issues, etc. might make a limit necessary. bandwidth, performance issues, etc. might make a limit necessary.
In such cases, the antivirus max scan size mode can be handy, the following modes are available: In such cases, the antivirus the max scan size mode can be handy, the following modes are available:
- `partial`: The file is scanned up to the given size. The rest of the file is not scanned. This is the default mode `ANTIVIRUS_MAX_SCAN_SIZE_MODE=partial` - `partial`: The file is scanned up to the given size. The rest of the file is not scanned. This is the default mode `ANTIVIRUS_MAX_SCAN_SIZE=partial`
- `skip`: The file is skipped and not scanned. `ANTIVIRUS_MAX_SCAN_SIZE_MODE=skip` - `skip`: The file is skipped and not scanned. `ANTIVIRUS_MAX_SCAN_SIZE=skip`
**IMPORTANT** **IMPORTANT**
> Streaming of files to the virus scan service still [needs to be implemented](https://github.com/owncloud/ocis/issues/6803). > Streaming of files to the virus scan service still [needs to be implemented](https://github.com/owncloud/ocis/issues/6803).

View File

@@ -0,0 +1,19 @@
package main
import (
"context"
"os"
"os/signal"
"syscall"
"github.com/opencloud-eu/opencloud/services/antivirus/pkg/command"
"github.com/opencloud-eu/opencloud/services/antivirus/pkg/config/defaults"
)
func main() {
cfg := defaults.DefaultConfig()
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
if err := command.Execute(cfg); err != nil {
os.Exit(1)
}
}

View File

@@ -5,22 +5,23 @@ import (
"net/http" "net/http"
"github.com/opencloud-eu/opencloud/pkg/log" "github.com/opencloud-eu/opencloud/pkg/log"
"github.com/spf13/cobra"
"github.com/opencloud-eu/opencloud/pkg/config/configlog" "github.com/opencloud-eu/opencloud/pkg/config/configlog"
"github.com/opencloud-eu/opencloud/services/antivirus/pkg/config" "github.com/opencloud-eu/opencloud/services/antivirus/pkg/config"
"github.com/opencloud-eu/opencloud/services/antivirus/pkg/config/parser" "github.com/opencloud-eu/opencloud/services/antivirus/pkg/config/parser"
"github.com/urfave/cli/v2"
) )
// Health is the entrypoint for the health command. // Health is the entrypoint for the health command.
func Health(cfg *config.Config) *cobra.Command { func Health(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "health", Name: "health",
Short: "check health status", Usage: "check health status",
PreRunE: func(cmd *cobra.Command, args []string) error { Category: "info",
Before: func(c *cli.Context) error {
return configlog.ReturnError(parser.ParseConfig(cfg)) return configlog.ReturnError(parser.ParseConfig(cfg))
}, },
RunE: func(cmd *cobra.Command, args []string) error { Action: func(c *cli.Context) error {
logger := log.NewLogger( logger := log.NewLogger(
log.Name(cfg.Service.Name), log.Name(cfg.Service.Name),
log.Level(cfg.Log.Level), log.Level(cfg.Log.Level),

View File

@@ -5,12 +5,12 @@ import (
"github.com/opencloud-eu/opencloud/pkg/clihelper" "github.com/opencloud-eu/opencloud/pkg/clihelper"
"github.com/opencloud-eu/opencloud/services/antivirus/pkg/config" "github.com/opencloud-eu/opencloud/services/antivirus/pkg/config"
"github.com/spf13/cobra" "github.com/urfave/cli/v2"
) )
// GetCommands provides all commands for this service // GetCommands provides all commands for this service
func GetCommands(cfg *config.Config) []*cobra.Command { func GetCommands(cfg *config.Config) cli.Commands {
return []*cobra.Command{ return []*cli.Command{
Server(cfg), Server(cfg),
Health(cfg), Health(cfg),
Version(cfg), Version(cfg),
@@ -19,11 +19,11 @@ func GetCommands(cfg *config.Config) []*cobra.Command {
// Execute is the entry point for the antivirus command. // Execute is the entry point for the antivirus command.
func Execute(cfg *config.Config) error { func Execute(cfg *config.Config) error {
app := clihelper.DefaultApp(&cobra.Command{ app := clihelper.DefaultApp(&cli.App{
Use: "antivirus", Name: "antivirus",
Short: "Antivirus service for OpenCloud", Usage: "Antivirus service for OpenCloud",
Commands: GetCommands(cfg),
}) })
app.AddCommand(GetCommands(cfg)...)
app.SetArgs(os.Args[1:]) return app.RunContext(cfg.Context, os.Args)
return app.ExecuteContext(cfg.Context)
} }

View File

@@ -3,9 +3,10 @@ package command
import ( import (
"context" "context"
"fmt" "fmt"
"os"
"os/signal" "os/signal"
"github.com/urfave/cli/v2"
"github.com/opencloud-eu/opencloud/pkg/config/configlog" "github.com/opencloud-eu/opencloud/pkg/config/configlog"
"github.com/opencloud-eu/opencloud/pkg/log" "github.com/opencloud-eu/opencloud/pkg/log"
"github.com/opencloud-eu/opencloud/pkg/runner" "github.com/opencloud-eu/opencloud/pkg/runner"
@@ -14,18 +15,18 @@ import (
"github.com/opencloud-eu/opencloud/services/antivirus/pkg/config/parser" "github.com/opencloud-eu/opencloud/services/antivirus/pkg/config/parser"
"github.com/opencloud-eu/opencloud/services/antivirus/pkg/server/debug" "github.com/opencloud-eu/opencloud/services/antivirus/pkg/server/debug"
"github.com/opencloud-eu/opencloud/services/antivirus/pkg/service" "github.com/opencloud-eu/opencloud/services/antivirus/pkg/service"
"github.com/spf13/cobra"
) )
// Server is the entrypoint for the server command. // Server is the entrypoint for the server command.
func Server(cfg *config.Config) *cobra.Command { func Server(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "server", Name: "server",
Short: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name), Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
PreRunE: func(cmd *cobra.Command, args []string) error { Category: "server",
Before: func(c *cli.Context) error {
return configlog.ReturnFatal(parser.ParseConfig(cfg)) return configlog.ReturnFatal(parser.ParseConfig(cfg))
}, },
RunE: func(cmd *cobra.Command, args []string) error { Action: func(c *cli.Context) error {
var cancel context.CancelFunc var cancel context.CancelFunc
if cfg.Context == nil { if cfg.Context == nil {
cfg.Context, cancel = signal.NotifyContext(context.Background(), runner.StopSignals...) cfg.Context, cancel = signal.NotifyContext(context.Background(), runner.StopSignals...)
@@ -41,7 +42,7 @@ func Server(cfg *config.Config) *cobra.Command {
log.File(cfg.Log.File), log.File(cfg.Log.File),
) )
traceProvider, err := tracing.GetTraceProvider(cmd.Context(), cfg.Commons.TracesExporter, cfg.Service.Name) traceProvider, err := tracing.GetTraceProvider(c.Context, cfg.Commons.TracesExporter, cfg.Service.Name)
if err != nil { if err != nil {
return err return err
} }
@@ -50,8 +51,7 @@ func Server(cfg *config.Config) *cobra.Command {
{ {
svc, err := service.NewAntivirus(cfg, logger, traceProvider) svc, err := service.NewAntivirus(cfg, logger, traceProvider)
if err != nil { if err != nil {
fmt.Errorf("failed to initialize antivirus service: %v", err) return cli.Exit(err.Error(), 1)
os.Exit(1)
} }
gr.Add(runner.New(cfg.Service.Name+".svc", func() error { gr.Add(runner.New(cfg.Service.Name+".svc", func() error {

View File

@@ -4,17 +4,18 @@ import (
"fmt" "fmt"
"github.com/opencloud-eu/opencloud/pkg/version" "github.com/opencloud-eu/opencloud/pkg/version"
"github.com/spf13/cobra"
"github.com/opencloud-eu/opencloud/services/antivirus/pkg/config" "github.com/opencloud-eu/opencloud/services/antivirus/pkg/config"
"github.com/urfave/cli/v2"
) )
// Version prints the service versions of all running instances. // Version prints the service versions of all running instances.
func Version(cfg *config.Config) *cobra.Command { func Version(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "version", Name: "version",
Short: "print the version of this binary and the running service instances", Usage: "print the version of this binary and the running service instances",
RunE: func(cmd *cobra.Command, args []string) error { Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString()) fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("") fmt.Println("")

View File

@@ -75,7 +75,7 @@ type Debug struct {
type Events struct { type Events struct {
Endpoint string `yaml:"endpoint" env:"OC_EVENTS_ENDPOINT;ANTIVIRUS_EVENTS_ENDPOINT" desc:"The address of the event system. The event system is the message queuing service. It is used as message broker for the microservice architecture." introductionVersion:"1.0.0"` Endpoint string `yaml:"endpoint" env:"OC_EVENTS_ENDPOINT;ANTIVIRUS_EVENTS_ENDPOINT" desc:"The address of the event system. The event system is the message queuing service. It is used as message broker for the microservice architecture." introductionVersion:"1.0.0"`
Cluster string `yaml:"cluster" env:"OC_EVENTS_CLUSTER;ANTIVIRUS_EVENTS_CLUSTER" desc:"The clusterID of the event system. The event system is the message queuing service. It is used as message broker for the microservice architecture. Mandatory when using NATS as event system." introductionVersion:"1.0.0"` Cluster string `yaml:"cluster" env:"OC_EVENTS_CLUSTER;ANTIVIRUS_EVENTS_CLUSTER" desc:"The clusterID of the event system. The event system is the message queuing service. It is used as message broker for the microservice architecture. Mandatory when using NATS as event system." introductionVersion:"1.0.0"`
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_EVENTS_TLS_INSECURE;ANTIVIRUS_EVENTS_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"1.0.0"` TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;ANTIVIRUS_EVENTS_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"1.0.0"`
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_EVENTS_TLS_ROOT_CA_CERTIFICATE;ANTIVIRUS_EVENTS_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided ANTIVIRUS_EVENTS_TLS_INSECURE will be seen as false." introductionVersion:"1.0.0"` TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_EVENTS_TLS_ROOT_CA_CERTIFICATE;ANTIVIRUS_EVENTS_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided ANTIVIRUS_EVENTS_TLS_INSECURE will be seen as false." introductionVersion:"1.0.0"`
EnableTLS bool `yaml:"enable_tls" env:"OC_EVENTS_ENABLE_TLS;ANTIVIRUS_EVENTS_ENABLE_TLS" desc:"Enable TLS for the connection to the events broker. The events broker is the OpenCloud service which receives and delivers events between the services." introductionVersion:"1.0.0"` EnableTLS bool `yaml:"enable_tls" env:"OC_EVENTS_ENABLE_TLS;ANTIVIRUS_EVENTS_ENABLE_TLS" desc:"Enable TLS for the connection to the events broker. The events broker is the OpenCloud service which receives and delivers events between the services." introductionVersion:"1.0.0"`
AuthUsername string `yaml:"username" env:"OC_EVENTS_AUTH_USERNAME;ANTIVIRUS_EVENTS_AUTH_USERNAME" desc:"The username to authenticate with the events broker. The events broker is the OpenCloud service which receives and delivers events between the services." introductionVersion:"1.0.0"` AuthUsername string `yaml:"username" env:"OC_EVENTS_AUTH_USERNAME;ANTIVIRUS_EVENTS_AUTH_USERNAME" desc:"The username to authenticate with the events broker. The events broker is the OpenCloud service which receives and delivers events between the services." introductionVersion:"1.0.0"`

View File

@@ -0,0 +1,19 @@
package main
import (
"context"
"os"
"os/signal"
"syscall"
"github.com/opencloud-eu/opencloud/services/app-provider/pkg/command"
"github.com/opencloud-eu/opencloud/services/app-provider/pkg/config/defaults"
)
func main() {
cfg := defaults.DefaultConfig()
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
if err := command.Execute(cfg); err != nil {
os.Exit(1)
}
}

View File

@@ -8,18 +8,19 @@ import (
"github.com/opencloud-eu/opencloud/services/app-provider/pkg/config" "github.com/opencloud-eu/opencloud/services/app-provider/pkg/config"
"github.com/opencloud-eu/opencloud/services/app-provider/pkg/config/parser" "github.com/opencloud-eu/opencloud/services/app-provider/pkg/config/parser"
"github.com/opencloud-eu/opencloud/services/app-provider/pkg/logging" "github.com/opencloud-eu/opencloud/services/app-provider/pkg/logging"
"github.com/spf13/cobra" "github.com/urfave/cli/v2"
) )
// Health is the entrypoint for the health command. // Health is the entrypoint for the health command.
func Health(cfg *config.Config) *cobra.Command { func Health(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "health", Name: "health",
Short: "check health status", Usage: "check health status",
PreRunE: func(cmd *cobra.Command, args []string) error { Category: "info",
Before: func(c *cli.Context) error {
return configlog.ReturnError(parser.ParseConfig(cfg)) return configlog.ReturnError(parser.ParseConfig(cfg))
}, },
RunE: func(cmd *cobra.Command, args []string) error { Action: func(c *cli.Context) error {
logger := logging.Configure(cfg.Service.Name, cfg.Log) logger := logging.Configure(cfg.Service.Name, cfg.Log)
resp, err := http.Get( resp, err := http.Get(

View File

@@ -5,12 +5,12 @@ import (
"github.com/opencloud-eu/opencloud/pkg/clihelper" "github.com/opencloud-eu/opencloud/pkg/clihelper"
"github.com/opencloud-eu/opencloud/services/app-provider/pkg/config" "github.com/opencloud-eu/opencloud/services/app-provider/pkg/config"
"github.com/spf13/cobra" "github.com/urfave/cli/v2"
) )
// GetCommands provides all commands for this service // GetCommands provides all commands for this service
func GetCommands(cfg *config.Config) []*cobra.Command { func GetCommands(cfg *config.Config) cli.Commands {
return []*cobra.Command{ return []*cli.Command{
// start this service // start this service
Server(cfg), Server(cfg),
@@ -24,12 +24,11 @@ func GetCommands(cfg *config.Config) []*cobra.Command {
// Execute is the entry point for the opencloud app-provider command. // Execute is the entry point for the opencloud app-provider command.
func Execute(cfg *config.Config) error { func Execute(cfg *config.Config) error {
app := clihelper.DefaultApp(&cobra.Command{ app := clihelper.DefaultApp(&cli.App{
Use: "app-provider", Name: "app-provider",
Short: "Provide apps for OpenCloud", Usage: "Provide apps for OpenCloud",
Commands: GetCommands(cfg),
}) })
app.AddCommand(GetCommands(cfg)...)
app.SetArgs(os.Args[1:])
return app.ExecuteContext(cfg.Context) return app.RunContext(cfg.Context, os.Args)
} }

View File

@@ -6,7 +6,7 @@ import (
"os/signal" "os/signal"
"github.com/opencloud-eu/reva/v2/cmd/revad/runtime" "github.com/opencloud-eu/reva/v2/cmd/revad/runtime"
"github.com/spf13/cobra" "github.com/urfave/cli/v2"
"github.com/opencloud-eu/opencloud/pkg/config/configlog" "github.com/opencloud-eu/opencloud/pkg/config/configlog"
"github.com/opencloud-eu/opencloud/pkg/registry" "github.com/opencloud-eu/opencloud/pkg/registry"
@@ -21,16 +21,17 @@ import (
) )
// Server is the entry point for the server command. // Server is the entry point for the server command.
func Server(cfg *config.Config) *cobra.Command { func Server(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "server", Name: "server",
Short: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name), Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
PreRunE: func(cmd *cobra.Command, args []string) error { Category: "server",
Before: func(c *cli.Context) error {
return configlog.ReturnFatal(parser.ParseConfig(cfg)) return configlog.ReturnFatal(parser.ParseConfig(cfg))
}, },
RunE: func(cmd *cobra.Command, args []string) error { Action: func(c *cli.Context) error {
logger := logging.Configure(cfg.Service.Name, cfg.Log) logger := logging.Configure(cfg.Service.Name, cfg.Log)
traceProvider, err := tracing.GetTraceProvider(cmd.Context(), cfg.Commons.TracesExporter, cfg.Service.Name) traceProvider, err := tracing.GetTraceProvider(c.Context, cfg.Commons.TracesExporter, cfg.Service.Name)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -6,19 +6,20 @@ import (
"github.com/opencloud-eu/opencloud/pkg/registry" "github.com/opencloud-eu/opencloud/pkg/registry"
"github.com/opencloud-eu/opencloud/pkg/version" "github.com/opencloud-eu/opencloud/pkg/version"
"github.com/opencloud-eu/opencloud/services/app-provider/pkg/config"
"github.com/olekukonko/tablewriter" "github.com/olekukonko/tablewriter"
"github.com/olekukonko/tablewriter/tw" "github.com/olekukonko/tablewriter/tw"
"github.com/spf13/cobra" "github.com/opencloud-eu/opencloud/services/app-provider/pkg/config"
"github.com/urfave/cli/v2"
) )
// Version prints the service versions of all running instances. // Version prints the service versions of all running instances.
func Version(cfg *config.Config) *cobra.Command { func Version(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "version", Name: "version",
Short: "print the version of this binary and the running service instances", Usage: "print the version of this binary and the running service instances",
RunE: func(cmd *cobra.Command, args []string) error { Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString()) fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("") fmt.Println("")

View File

@@ -0,0 +1,19 @@
package main
import (
"context"
"os"
"os/signal"
"syscall"
"github.com/opencloud-eu/opencloud/services/app-registry/pkg/command"
"github.com/opencloud-eu/opencloud/services/app-registry/pkg/config/defaults"
)
func main() {
cfg := defaults.DefaultConfig()
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
if err := command.Execute(cfg); err != nil {
os.Exit(1)
}
}

View File

@@ -8,18 +8,19 @@ import (
"github.com/opencloud-eu/opencloud/services/app-registry/pkg/config" "github.com/opencloud-eu/opencloud/services/app-registry/pkg/config"
"github.com/opencloud-eu/opencloud/services/app-registry/pkg/config/parser" "github.com/opencloud-eu/opencloud/services/app-registry/pkg/config/parser"
"github.com/opencloud-eu/opencloud/services/app-registry/pkg/logging" "github.com/opencloud-eu/opencloud/services/app-registry/pkg/logging"
"github.com/spf13/cobra" "github.com/urfave/cli/v2"
) )
// Health is the entrypoint for the health command. // Health is the entrypoint for the health command.
func Health(cfg *config.Config) *cobra.Command { func Health(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "health", Name: "health",
Short: "check health status", Usage: "check health status",
PreRunE: func(cmd *cobra.Command, args []string) error { Category: "info",
Before: func(c *cli.Context) error {
return configlog.ReturnError(parser.ParseConfig(cfg)) return configlog.ReturnError(parser.ParseConfig(cfg))
}, },
RunE: func(cmd *cobra.Command, args []string) error { Action: func(c *cli.Context) error {
logger := logging.Configure(cfg.Service.Name, cfg.Log) logger := logging.Configure(cfg.Service.Name, cfg.Log)
resp, err := http.Get( resp, err := http.Get(

View File

@@ -5,12 +5,12 @@ import (
"github.com/opencloud-eu/opencloud/pkg/clihelper" "github.com/opencloud-eu/opencloud/pkg/clihelper"
"github.com/opencloud-eu/opencloud/services/app-registry/pkg/config" "github.com/opencloud-eu/opencloud/services/app-registry/pkg/config"
"github.com/spf13/cobra" "github.com/urfave/cli/v2"
) )
// GetCommands provides all commands for this service // GetCommands provides all commands for this service
func GetCommands(cfg *config.Config) []*cobra.Command { func GetCommands(cfg *config.Config) cli.Commands {
return []*cobra.Command{ return []*cli.Command{
// start this service // start this service
Server(cfg), Server(cfg),
@@ -24,12 +24,11 @@ func GetCommands(cfg *config.Config) []*cobra.Command {
// Execute is the entry point for the opencloud app-registry command. // Execute is the entry point for the opencloud app-registry command.
func Execute(cfg *config.Config) error { func Execute(cfg *config.Config) error {
app := clihelper.DefaultApp(&cobra.Command{ app := clihelper.DefaultApp(&cli.App{
Use: "app-registry", Name: "app-registry",
Short: "Provide an app registry for OpenCloud", Usage: "Provide an app registry for OpenCloud",
Commands: GetCommands(cfg),
}) })
app.AddCommand(GetCommands(cfg)...)
app.SetArgs(os.Args[1:])
return app.ExecuteContext(cfg.Context) return app.RunContext(cfg.Context, os.Args)
} }

View File

@@ -16,20 +16,21 @@ import (
"github.com/opencloud-eu/opencloud/services/app-registry/pkg/revaconfig" "github.com/opencloud-eu/opencloud/services/app-registry/pkg/revaconfig"
"github.com/opencloud-eu/opencloud/services/app-registry/pkg/server/debug" "github.com/opencloud-eu/opencloud/services/app-registry/pkg/server/debug"
"github.com/opencloud-eu/reva/v2/cmd/revad/runtime" "github.com/opencloud-eu/reva/v2/cmd/revad/runtime"
"github.com/spf13/cobra" "github.com/urfave/cli/v2"
) )
// Server is the entry point for the server command. // Server is the entry point for the server command.
func Server(cfg *config.Config) *cobra.Command { func Server(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "server", Name: "server",
Short: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name), Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
PreRunE: func(cmd *cobra.Command, args []string) error { Category: "server",
Before: func(c *cli.Context) error {
return configlog.ReturnFatal(parser.ParseConfig(cfg)) return configlog.ReturnFatal(parser.ParseConfig(cfg))
}, },
RunE: func(cmd *cobra.Command, args []string) error { Action: func(c *cli.Context) error {
logger := logging.Configure(cfg.Service.Name, cfg.Log) logger := logging.Configure(cfg.Service.Name, cfg.Log)
traceProvider, err := tracing.GetTraceProvider(cmd.Context(), cfg.Commons.TracesExporter, cfg.Service.Name) traceProvider, err := tracing.GetTraceProvider(c.Context, cfg.Commons.TracesExporter, cfg.Service.Name)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -6,19 +6,20 @@ import (
"github.com/opencloud-eu/opencloud/pkg/registry" "github.com/opencloud-eu/opencloud/pkg/registry"
"github.com/opencloud-eu/opencloud/pkg/version" "github.com/opencloud-eu/opencloud/pkg/version"
"github.com/opencloud-eu/opencloud/services/app-registry/pkg/config"
"github.com/olekukonko/tablewriter" "github.com/olekukonko/tablewriter"
"github.com/olekukonko/tablewriter/tw" "github.com/olekukonko/tablewriter/tw"
"github.com/spf13/cobra" "github.com/opencloud-eu/opencloud/services/app-registry/pkg/config"
"github.com/urfave/cli/v2"
) )
// Version prints the service versions of all running instances. // Version prints the service versions of all running instances.
func Version(cfg *config.Config) *cobra.Command { func Version(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "version", Name: "version",
Short: "print the version of this binary and the running service instances", Usage: "print the version of this binary and the running service instances",
RunE: func(cmd *cobra.Command, args []string) error { Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString()) fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("") fmt.Println("")

View File

@@ -0,0 +1,19 @@
package main
import (
"context"
"os"
"os/signal"
"syscall"
"github.com/opencloud-eu/opencloud/services/audit/pkg/command"
"github.com/opencloud-eu/opencloud/services/audit/pkg/config/defaults"
)
func main() {
cfg := defaults.DefaultConfig()
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
if err := command.Execute(cfg); err != nil {
os.Exit(1)
}
}

View File

@@ -2,15 +2,15 @@ package command
import ( import (
"github.com/opencloud-eu/opencloud/services/audit/pkg/config" "github.com/opencloud-eu/opencloud/services/audit/pkg/config"
"github.com/spf13/cobra" "github.com/urfave/cli/v2"
) )
// Health is the entrypoint for the health command. // Health is the entrypoint for the health command.
func Health(cfg *config.Config) *cobra.Command { func Health(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "health", Name: "health",
Short: "Check health status", Usage: "Check health status",
RunE: func(cmd *cobra.Command, args []string) error { Action: func(c *cli.Context) error {
// Not implemented // Not implemented
return nil return nil
}, },

View File

@@ -5,12 +5,12 @@ import (
"github.com/opencloud-eu/opencloud/pkg/clihelper" "github.com/opencloud-eu/opencloud/pkg/clihelper"
"github.com/opencloud-eu/opencloud/services/audit/pkg/config" "github.com/opencloud-eu/opencloud/services/audit/pkg/config"
"github.com/spf13/cobra" "github.com/urfave/cli/v2"
) )
// GetCommands provides all commands for this service // GetCommands provides all commands for this service
func GetCommands(cfg *config.Config) []*cobra.Command { func GetCommands(cfg *config.Config) cli.Commands {
return []*cobra.Command{ return []*cli.Command{
// start this service // start this service
Server(cfg), Server(cfg),
@@ -24,12 +24,11 @@ func GetCommands(cfg *config.Config) []*cobra.Command {
// Execute is the entry point for the audit command. // Execute is the entry point for the audit command.
func Execute(cfg *config.Config) error { func Execute(cfg *config.Config) error {
app := clihelper.DefaultApp(&cobra.Command{ app := clihelper.DefaultApp(&cli.App{
Use: "audit", Name: "audit",
Short: "starts audit service", Usage: "starts audit service",
Commands: GetCommands(cfg),
}) })
app.AddCommand(GetCommands(cfg)...)
app.SetArgs(os.Args[1:])
return app.ExecuteContext(cfg.Context) return app.RunContext(cfg.Context, os.Args)
} }

View File

@@ -5,6 +5,10 @@ import (
"fmt" "fmt"
"os/signal" "os/signal"
"github.com/opencloud-eu/reva/v2/pkg/events"
"github.com/opencloud-eu/reva/v2/pkg/events/stream"
"github.com/urfave/cli/v2"
"github.com/opencloud-eu/opencloud/pkg/config/configlog" "github.com/opencloud-eu/opencloud/pkg/config/configlog"
"github.com/opencloud-eu/opencloud/pkg/generators" "github.com/opencloud-eu/opencloud/pkg/generators"
"github.com/opencloud-eu/opencloud/pkg/runner" "github.com/opencloud-eu/opencloud/pkg/runner"
@@ -14,21 +18,18 @@ import (
"github.com/opencloud-eu/opencloud/services/audit/pkg/server/debug" "github.com/opencloud-eu/opencloud/services/audit/pkg/server/debug"
svc "github.com/opencloud-eu/opencloud/services/audit/pkg/service" svc "github.com/opencloud-eu/opencloud/services/audit/pkg/service"
"github.com/opencloud-eu/opencloud/services/audit/pkg/types" "github.com/opencloud-eu/opencloud/services/audit/pkg/types"
"github.com/opencloud-eu/reva/v2/pkg/events"
"github.com/opencloud-eu/reva/v2/pkg/events/stream"
"github.com/spf13/cobra"
) )
// Server is the entrypoint for the server command. // Server is the entrypoint for the server command.
func Server(cfg *config.Config) *cobra.Command { func Server(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "server", Name: "server",
Short: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name), Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
PreRunE: func(cmd *cobra.Command, args []string) error { Category: "server",
Before: func(c *cli.Context) error {
return configlog.ReturnFatal(parser.ParseConfig(cfg)) return configlog.ReturnFatal(parser.ParseConfig(cfg))
}, },
RunE: func(cmd *cobra.Command, args []string) error { Action: func(c *cli.Context) error {
var cancel context.CancelFunc var cancel context.CancelFunc
if cfg.Context == nil { if cfg.Context == nil {
cfg.Context, cancel = signal.NotifyContext(context.Background(), runner.StopSignals...) cfg.Context, cancel = signal.NotifyContext(context.Background(), runner.StopSignals...)

View File

@@ -2,15 +2,16 @@ package command
import ( import (
"github.com/opencloud-eu/opencloud/services/audit/pkg/config" "github.com/opencloud-eu/opencloud/services/audit/pkg/config"
"github.com/spf13/cobra" "github.com/urfave/cli/v2"
) )
// Version prints the service versions of all running instances. // Version prints the service versions of all running instances.
func Version(cfg *config.Config) *cobra.Command { func Version(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "version", Name: "version",
Short: "print the version of this binary and the running service instances", Usage: "print the version of this binary and the running service instances",
RunE: func(cmd *cobra.Command, args []string) error { Category: "info",
Action: func(c *cli.Context) error {
// not implemented // not implemented
return nil return nil
}, },

View File

@@ -25,7 +25,7 @@ type Config struct {
type Events struct { type Events struct {
Endpoint string `yaml:"endpoint" env:"OC_EVENTS_ENDPOINT;AUDIT_EVENTS_ENDPOINT" desc:"The address of the event system. The event system is the message queuing service. It is used as message broker for the microservice architecture." introductionVersion:"1.0.0"` Endpoint string `yaml:"endpoint" env:"OC_EVENTS_ENDPOINT;AUDIT_EVENTS_ENDPOINT" desc:"The address of the event system. The event system is the message queuing service. It is used as message broker for the microservice architecture." introductionVersion:"1.0.0"`
Cluster string `yaml:"cluster" env:"OC_EVENTS_CLUSTER;AUDIT_EVENTS_CLUSTER" desc:"The clusterID of the event system. The event system is the message queuing service. It is used as message broker for the microservice architecture. Mandatory when using NATS as event system." introductionVersion:"1.0.0"` Cluster string `yaml:"cluster" env:"OC_EVENTS_CLUSTER;AUDIT_EVENTS_CLUSTER" desc:"The clusterID of the event system. The event system is the message queuing service. It is used as message broker for the microservice architecture. Mandatory when using NATS as event system." introductionVersion:"1.0.0"`
TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;OC_EVENTS_TLS_INSECURE;AUDIT_EVENTS_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"1.0.0"` TLSInsecure bool `yaml:"tls_insecure" env:"OC_INSECURE;AUDIT_EVENTS_TLS_INSECURE" desc:"Whether to verify the server TLS certificates." introductionVersion:"1.0.0"`
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_EVENTS_TLS_ROOT_CA_CERTIFICATE;AUDIT_EVENTS_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided AUDIT_EVENTS_TLS_INSECURE will be seen as false." introductionVersion:"1.0.0"` TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OC_EVENTS_TLS_ROOT_CA_CERTIFICATE;AUDIT_EVENTS_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided AUDIT_EVENTS_TLS_INSECURE will be seen as false." introductionVersion:"1.0.0"`
EnableTLS bool `yaml:"enable_tls" env:"OC_EVENTS_ENABLE_TLS;AUDIT_EVENTS_ENABLE_TLS" desc:"Enable TLS for the connection to the events broker. The events broker is the OpenCloud service which receives and delivers events between the services." introductionVersion:"1.0.0"` EnableTLS bool `yaml:"enable_tls" env:"OC_EVENTS_ENABLE_TLS;AUDIT_EVENTS_ENABLE_TLS" desc:"Enable TLS for the connection to the events broker. The events broker is the OpenCloud service which receives and delivers events between the services." introductionVersion:"1.0.0"`
AuthUsername string `yaml:"username" env:"OC_EVENTS_AUTH_USERNAME;AUDIT_EVENTS_AUTH_USERNAME" desc:"The username to authenticate with the events broker. The events broker is the OpenCloud service which receives and delivers events between the services." introductionVersion:"1.0.0"` AuthUsername string `yaml:"username" env:"OC_EVENTS_AUTH_USERNAME;AUDIT_EVENTS_AUTH_USERNAME" desc:"The username to authenticate with the events broker. The events broker is the OpenCloud service which receives and delivers events between the services." introductionVersion:"1.0.0"`

View File

@@ -0,0 +1,19 @@
package main
import (
"context"
"os"
"os/signal"
"syscall"
"github.com/opencloud-eu/opencloud/services/auth-app/pkg/command"
"github.com/opencloud-eu/opencloud/services/auth-app/pkg/config/defaults"
)
func main() {
cfg := defaults.DefaultConfig()
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
if err := command.Execute(cfg); err != nil {
os.Exit(1)
}
}

View File

@@ -6,10 +6,14 @@ import (
authpb "github.com/cs3org/go-cs3apis/cs3/auth/provider/v1beta1" authpb "github.com/cs3org/go-cs3apis/cs3/auth/provider/v1beta1"
"github.com/opencloud-eu/reva/v2/pkg/auth/scope" "github.com/opencloud-eu/reva/v2/pkg/auth/scope"
"github.com/spf13/cobra"
"time" "time"
applicationsv1beta1 "github.com/cs3org/go-cs3apis/cs3/auth/applications/v1beta1"
gatewayv1beta1 "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1"
userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1"
typesv1beta1 "github.com/cs3org/go-cs3apis/cs3/types/v1beta1"
"github.com/opencloud-eu/opencloud/pkg/config/configlog" "github.com/opencloud-eu/opencloud/pkg/config/configlog"
"github.com/opencloud-eu/opencloud/pkg/registry" "github.com/opencloud-eu/opencloud/pkg/registry"
"github.com/opencloud-eu/opencloud/pkg/tracing" "github.com/opencloud-eu/opencloud/pkg/tracing"
@@ -17,25 +21,33 @@ import (
"github.com/opencloud-eu/opencloud/services/auth-app/pkg/config/parser" "github.com/opencloud-eu/opencloud/services/auth-app/pkg/config/parser"
ctxpkg "github.com/opencloud-eu/reva/v2/pkg/ctx" ctxpkg "github.com/opencloud-eu/reva/v2/pkg/ctx"
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool" "github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"
"github.com/urfave/cli/v2"
applicationsv1beta1 "github.com/cs3org/go-cs3apis/cs3/auth/applications/v1beta1"
gatewayv1beta1 "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1"
userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1"
typesv1beta1 "github.com/cs3org/go-cs3apis/cs3/types/v1beta1"
"google.golang.org/grpc/metadata" "google.golang.org/grpc/metadata"
) )
// Create is the entrypoint for the app auth create command // Create is the entrypoint for the app auth create command
func Create(cfg *config.Config) *cobra.Command { func Create(cfg *config.Config) *cli.Command {
createCmd := &cobra.Command{ return &cli.Command{
Use: "create", Name: "create",
Short: "create an app auth token for a user", Usage: "create an app auth token for a user",
PreRunE: func(cmd *cobra.Command, args []string) error { Category: "maintenance",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "user-name",
Value: "",
Usage: "user to create the app-token for",
},
&cli.StringFlag{
Name: "expiration",
Value: "72h",
Usage: "expiration of the app password, e.g. 72h, 1h, 1m, 1s. Default is 72h.",
},
},
Before: func(_ *cli.Context) error {
return configlog.ReturnError(parser.ParseConfig(cfg)) return configlog.ReturnError(parser.ParseConfig(cfg))
}, },
RunE: func(cmd *cobra.Command, args []string) error { Action: func(c *cli.Context) error {
traceProvider, err := tracing.GetTraceProvider(cmd.Context(), cfg.Commons.TracesExporter, cfg.Service.Name) traceProvider, err := tracing.GetTraceProvider(c.Context, cfg.Commons.TracesExporter, cfg.Service.Name)
if err != nil { if err != nil {
return err return err
} }
@@ -56,7 +68,7 @@ func Create(cfg *config.Config) *cobra.Command {
return err return err
} }
userName, _ := cmd.Flags().GetString("user-name") userName := c.String("user-name")
if userName == "" { if userName == "" {
fmt.Printf("Username to create app token for: ") fmt.Printf("Username to create app token for: ")
if _, err := fmt.Scanln(&userName); err != nil { if _, err := fmt.Scanln(&userName); err != nil {
@@ -85,7 +97,7 @@ func Create(cfg *config.Config) *cobra.Command {
return err return err
} }
expiry, err := cmd.Flags().GetDuration("expiration") expiry, err := time.ParseDuration(c.String("expiration"))
if err != nil { if err != nil {
return err return err
} }
@@ -109,16 +121,4 @@ func Create(cfg *config.Config) *cobra.Command {
return nil return nil
}, },
} }
createCmd.Flags().String(
"user-name",
"",
"user to create the app-token for",
)
createCmd.Flags().Duration(
"expiration",
time.Hour*72,
"expiration of the app password, e.g. 72h, 1h, 1m, 1s. Default is 72h.",
)
return createCmd
} }

View File

@@ -8,19 +8,19 @@ import (
"github.com/opencloud-eu/opencloud/services/auth-app/pkg/config" "github.com/opencloud-eu/opencloud/services/auth-app/pkg/config"
"github.com/opencloud-eu/opencloud/services/auth-app/pkg/config/parser" "github.com/opencloud-eu/opencloud/services/auth-app/pkg/config/parser"
"github.com/opencloud-eu/opencloud/services/auth-app/pkg/logging" "github.com/opencloud-eu/opencloud/services/auth-app/pkg/logging"
"github.com/urfave/cli/v2"
"github.com/spf13/cobra"
) )
// Health is the entrypoint for the health command. // Health is the entrypoint for the health command.
func Health(cfg *config.Config) *cobra.Command { func Health(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "health", Name: "health",
Short: "check health status", Usage: "check health status",
PreRunE: func(cmd *cobra.Command, args []string) error { Category: "info",
Before: func(_ *cli.Context) error {
return configlog.ReturnError(parser.ParseConfig(cfg)) return configlog.ReturnError(parser.ParseConfig(cfg))
}, },
RunE: func(cmd *cobra.Command, args []string) error { Action: func(_ *cli.Context) error {
logger := logging.Configure(cfg.Service.Name, cfg.Log) logger := logging.Configure(cfg.Service.Name, cfg.Log)
resp, err := http.Get( resp, err := http.Get(

View File

@@ -5,13 +5,12 @@ import (
"github.com/opencloud-eu/opencloud/pkg/clihelper" "github.com/opencloud-eu/opencloud/pkg/clihelper"
"github.com/opencloud-eu/opencloud/services/auth-app/pkg/config" "github.com/opencloud-eu/opencloud/services/auth-app/pkg/config"
"github.com/urfave/cli/v2"
"github.com/spf13/cobra"
) )
// GetCommands provides all commands for this service // GetCommands provides all commands for this service
func GetCommands(cfg *config.Config) []*cobra.Command { func GetCommands(cfg *config.Config) cli.Commands {
return []*cobra.Command{ return []*cli.Command{
// start this service // start this service
Server(cfg), Server(cfg),
@@ -26,12 +25,11 @@ func GetCommands(cfg *config.Config) []*cobra.Command {
// Execute is the entry point for the opencloud auth-app command. // Execute is the entry point for the opencloud auth-app command.
func Execute(cfg *config.Config) error { func Execute(cfg *config.Config) error {
app := clihelper.DefaultApp(&cobra.Command{ app := clihelper.DefaultApp(&cli.App{
Use: "auth-app", Name: "auth-app",
Short: "Provide app authentication for OpenCloud", Usage: "Provide app authentication for OpenCloud",
Commands: GetCommands(cfg),
}) })
app.AddCommand(GetCommands(cfg)...)
app.SetArgs(os.Args[1:])
return app.ExecuteContext(cfg.Context) return app.RunContext(cfg.Context, os.Args)
} }

View File

@@ -20,25 +20,25 @@ import (
"github.com/opencloud-eu/opencloud/services/auth-app/pkg/server/http" "github.com/opencloud-eu/opencloud/services/auth-app/pkg/server/http"
"github.com/opencloud-eu/reva/v2/cmd/revad/runtime" "github.com/opencloud-eu/reva/v2/cmd/revad/runtime"
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool" "github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"
"github.com/urfave/cli/v2"
"github.com/spf13/cobra"
) )
// Server is the entry point for the server command. // Server is the entry point for the server command.
func Server(cfg *config.Config) *cobra.Command { func Server(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "server", Name: "server",
Short: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name), Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
PreRunE: func(cmd *cobra.Command, args []string) error { Category: "server",
Before: func(_ *cli.Context) error {
return configlog.ReturnFatal(parser.ParseConfig(cfg)) return configlog.ReturnFatal(parser.ParseConfig(cfg))
}, },
RunE: func(cmd *cobra.Command, args []string) error { Action: func(c *cli.Context) error {
if cfg.AllowImpersonation { if cfg.AllowImpersonation {
fmt.Println("WARNING: Impersonation is enabled. Admins can impersonate all users.") fmt.Println("WARNING: Impersonation is enabled. Admins can impersonate all users.")
} }
logger := logging.Configure(cfg.Service.Name, cfg.Log) logger := logging.Configure(cfg.Service.Name, cfg.Log)
traceProvider, err := tracing.GetTraceProvider(cmd.Context(), cfg.Commons.TracesExporter, cfg.Service.Name) traceProvider, err := tracing.GetTraceProvider(c.Context, cfg.Commons.TracesExporter, cfg.Service.Name)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -6,19 +6,20 @@ import (
"github.com/opencloud-eu/opencloud/pkg/registry" "github.com/opencloud-eu/opencloud/pkg/registry"
"github.com/opencloud-eu/opencloud/pkg/version" "github.com/opencloud-eu/opencloud/pkg/version"
"github.com/opencloud-eu/opencloud/services/auth-app/pkg/config"
"github.com/olekukonko/tablewriter" "github.com/olekukonko/tablewriter"
"github.com/olekukonko/tablewriter/tw" "github.com/olekukonko/tablewriter/tw"
"github.com/spf13/cobra" "github.com/opencloud-eu/opencloud/services/auth-app/pkg/config"
"github.com/urfave/cli/v2"
) )
// Version prints the service versions of all running instances. // Version prints the service versions of all running instances.
func Version(cfg *config.Config) *cobra.Command { func Version(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "version", Name: "version",
Short: "print the version of this binary and the running service instances", Usage: "print the version of this binary and the running service instances",
RunE: func(cmd *cobra.Command, args []string) error { Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString()) fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("") fmt.Println("")

View File

@@ -8,8 +8,7 @@ import (
settingssvc "github.com/opencloud-eu/opencloud/protogen/gen/opencloud/services/settings/v0" settingssvc "github.com/opencloud-eu/opencloud/protogen/gen/opencloud/services/settings/v0"
"github.com/opencloud-eu/opencloud/services/auth-app/pkg/config" "github.com/opencloud-eu/opencloud/services/auth-app/pkg/config"
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool" "github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"
"github.com/urfave/cli/v2"
"github.com/spf13/pflag"
"go.opentelemetry.io/otel/trace" "go.opentelemetry.io/otel/trace"
) )
@@ -21,7 +20,7 @@ type Options struct {
Logger log.Logger Logger log.Logger
Context context.Context Context context.Context
Config *config.Config Config *config.Config
Flags []pflag.Flag Flags []cli.Flag
Namespace string Namespace string
GatewaySelector pool.Selectable[gateway.GatewayAPIClient] GatewaySelector pool.Selectable[gateway.GatewayAPIClient]
RoleClient settingssvc.RoleService RoleClient settingssvc.RoleService
@@ -61,9 +60,9 @@ func Config(val *config.Config) Option {
} }
// Flags provides a function to set the flags option. // Flags provides a function to set the flags option.
func Flags(flags ...pflag.Flag) Option { func Flags(val []cli.Flag) Option {
return func(o *Options) { return func(o *Options) {
o.Flags = append(o.Flags, flags...) o.Flags = append(o.Flags, val...)
} }
} }

View File

@@ -0,0 +1,19 @@
package main
import (
"context"
"os"
"os/signal"
"syscall"
"github.com/opencloud-eu/opencloud/services/auth-basic/pkg/command"
"github.com/opencloud-eu/opencloud/services/auth-basic/pkg/config/defaults"
)
func main() {
cfg := defaults.DefaultConfig()
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
if err := command.Execute(cfg); err != nil {
os.Exit(1)
}
}

View File

@@ -8,19 +8,19 @@ import (
"github.com/opencloud-eu/opencloud/services/auth-basic/pkg/config" "github.com/opencloud-eu/opencloud/services/auth-basic/pkg/config"
"github.com/opencloud-eu/opencloud/services/auth-basic/pkg/config/parser" "github.com/opencloud-eu/opencloud/services/auth-basic/pkg/config/parser"
"github.com/opencloud-eu/opencloud/services/auth-basic/pkg/logging" "github.com/opencloud-eu/opencloud/services/auth-basic/pkg/logging"
"github.com/urfave/cli/v2"
"github.com/spf13/cobra"
) )
// Health is the entrypoint for the health command. // Health is the entrypoint for the health command.
func Health(cfg *config.Config) *cobra.Command { func Health(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "health", Name: "health",
Short: "check health status", Usage: "check health status",
PreRunE: func(cmd *cobra.Command, args []string) error { Category: "info",
Before: func(c *cli.Context) error {
return configlog.ReturnError(parser.ParseConfig(cfg)) return configlog.ReturnError(parser.ParseConfig(cfg))
}, },
RunE: func(cmd *cobra.Command, args []string) error { Action: func(c *cli.Context) error {
logger := logging.Configure(cfg.Service.Name, cfg.Log) logger := logging.Configure(cfg.Service.Name, cfg.Log)
resp, err := http.Get( resp, err := http.Get(

View File

@@ -5,12 +5,12 @@ import (
"github.com/opencloud-eu/opencloud/pkg/clihelper" "github.com/opencloud-eu/opencloud/pkg/clihelper"
"github.com/opencloud-eu/opencloud/services/auth-basic/pkg/config" "github.com/opencloud-eu/opencloud/services/auth-basic/pkg/config"
"github.com/spf13/cobra" "github.com/urfave/cli/v2"
) )
// GetCommands provides all commands for this service // GetCommands provides all commands for this service
func GetCommands(cfg *config.Config) []*cobra.Command { func GetCommands(cfg *config.Config) cli.Commands {
return []*cobra.Command{ return []*cli.Command{
// start this service // start this service
Server(cfg), Server(cfg),
@@ -24,12 +24,11 @@ func GetCommands(cfg *config.Config) []*cobra.Command {
// Execute is the entry point for the opencloud auth-basic command. // Execute is the entry point for the opencloud auth-basic command.
func Execute(cfg *config.Config) error { func Execute(cfg *config.Config) error {
app := clihelper.DefaultApp(&cobra.Command{ app := clihelper.DefaultApp(&cli.App{
Use: "auth-basic", Name: "auth-basic",
Short: "Provide basic authentication for OpenCloud", Usage: "Provide basic authentication for OpenCloud",
Commands: GetCommands(cfg),
}) })
app.AddCommand(GetCommands(cfg)...)
app.SetArgs(os.Args[1:])
return app.ExecuteContext(cfg.Context) return app.RunContext(cfg.Context, os.Args)
} }

View File

@@ -17,21 +17,21 @@ import (
"github.com/opencloud-eu/opencloud/services/auth-basic/pkg/revaconfig" "github.com/opencloud-eu/opencloud/services/auth-basic/pkg/revaconfig"
"github.com/opencloud-eu/opencloud/services/auth-basic/pkg/server/debug" "github.com/opencloud-eu/opencloud/services/auth-basic/pkg/server/debug"
"github.com/opencloud-eu/reva/v2/cmd/revad/runtime" "github.com/opencloud-eu/reva/v2/cmd/revad/runtime"
"github.com/urfave/cli/v2"
"github.com/spf13/cobra"
) )
// Server is the entry point for the server command. // Server is the entry point for the server command.
func Server(cfg *config.Config) *cobra.Command { func Server(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "server", Name: "server",
Short: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name), Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
PreRunE: func(cmd *cobra.Command, args []string) error { Category: "server",
Before: func(c *cli.Context) error {
return configlog.ReturnFatal(parser.ParseConfig(cfg)) return configlog.ReturnFatal(parser.ParseConfig(cfg))
}, },
RunE: func(cmd *cobra.Command, args []string) error { Action: func(c *cli.Context) error {
logger := logging.Configure(cfg.Service.Name, cfg.Log) logger := logging.Configure(cfg.Service.Name, cfg.Log)
traceProvider, err := tracing.GetTraceProvider(cmd.Context(), cfg.Commons.TracesExporter, cfg.Service.Name) traceProvider, err := tracing.GetTraceProvider(c.Context, cfg.Commons.TracesExporter, cfg.Service.Name)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -6,19 +6,20 @@ import (
"github.com/opencloud-eu/opencloud/pkg/registry" "github.com/opencloud-eu/opencloud/pkg/registry"
"github.com/opencloud-eu/opencloud/pkg/version" "github.com/opencloud-eu/opencloud/pkg/version"
"github.com/opencloud-eu/opencloud/services/auth-basic/pkg/config"
"github.com/olekukonko/tablewriter" "github.com/olekukonko/tablewriter"
"github.com/olekukonko/tablewriter/tw" "github.com/olekukonko/tablewriter/tw"
"github.com/spf13/cobra" "github.com/opencloud-eu/opencloud/services/auth-basic/pkg/config"
"github.com/urfave/cli/v2"
) )
// Version prints the service versions of all running instances. // Version prints the service versions of all running instances.
func Version(cfg *config.Config) *cobra.Command { func Version(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "version", Name: "version",
Short: "print the version of this binary and the running service instances", Usage: "print the version of this binary and the running service instances",
RunE: func(cmd *cobra.Command, args []string) error { Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString()) fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("") fmt.Println("")

View File

@@ -0,0 +1,19 @@
package main
import (
"context"
"os"
"os/signal"
"syscall"
"github.com/opencloud-eu/opencloud/services/auth-bearer/pkg/command"
"github.com/opencloud-eu/opencloud/services/auth-bearer/pkg/config/defaults"
)
func main() {
cfg := defaults.DefaultConfig()
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
if err := command.Execute(cfg); err != nil {
os.Exit(1)
}
}

View File

@@ -8,19 +8,19 @@ import (
"github.com/opencloud-eu/opencloud/services/auth-bearer/pkg/config" "github.com/opencloud-eu/opencloud/services/auth-bearer/pkg/config"
"github.com/opencloud-eu/opencloud/services/auth-bearer/pkg/config/parser" "github.com/opencloud-eu/opencloud/services/auth-bearer/pkg/config/parser"
"github.com/opencloud-eu/opencloud/services/auth-bearer/pkg/logging" "github.com/opencloud-eu/opencloud/services/auth-bearer/pkg/logging"
"github.com/urfave/cli/v2"
"github.com/spf13/cobra"
) )
// Health is the entrypoint for the health command. // Health is the entrypoint for the health command.
func Health(cfg *config.Config) *cobra.Command { func Health(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "health", Name: "health",
Short: "check health status", Usage: "check health status",
PreRunE: func(cmd *cobra.Command, args []string) error { Category: "info",
Before: func(c *cli.Context) error {
return configlog.ReturnError(parser.ParseConfig(cfg)) return configlog.ReturnError(parser.ParseConfig(cfg))
}, },
RunE: func(cmd *cobra.Command, args []string) error { Action: func(c *cli.Context) error {
logger := logging.Configure(cfg.Service.Name, cfg.Log) logger := logging.Configure(cfg.Service.Name, cfg.Log)
resp, err := http.Get( resp, err := http.Get(

View File

@@ -7,14 +7,13 @@ import (
"github.com/opencloud-eu/opencloud/pkg/clihelper" "github.com/opencloud-eu/opencloud/pkg/clihelper"
occfg "github.com/opencloud-eu/opencloud/pkg/config" occfg "github.com/opencloud-eu/opencloud/pkg/config"
"github.com/opencloud-eu/opencloud/services/auth-bearer/pkg/config" "github.com/opencloud-eu/opencloud/services/auth-bearer/pkg/config"
"github.com/spf13/cobra"
"github.com/thejerf/suture/v4" "github.com/thejerf/suture/v4"
"github.com/urfave/cli/v2"
) )
// GetCommands provides all commands for this service // GetCommands provides all commands for this service
func GetCommands(cfg *config.Config) []*cobra.Command { func GetCommands(cfg *config.Config) cli.Commands {
return []*cobra.Command{ return []*cli.Command{
// start this service // start this service
Server(cfg), Server(cfg),
@@ -28,14 +27,13 @@ func GetCommands(cfg *config.Config) []*cobra.Command {
// Execute is the entry point for the opencloud auth-bearer command. // Execute is the entry point for the opencloud auth-bearer command.
func Execute(cfg *config.Config) error { func Execute(cfg *config.Config) error {
app := clihelper.DefaultApp(&cobra.Command{ app := clihelper.DefaultApp(&cli.App{
Use: "auth-bearer", Name: "auth-bearer",
Short: "Provide bearer authentication for OpenCloud", Usage: "Provide bearer authentication for OpenCloud",
Commands: GetCommands(cfg),
}) })
app.AddCommand(GetCommands(cfg)...)
app.SetArgs(os.Args[1:])
return app.ExecuteContext(cfg.Context) return app.RunContext(cfg.Context, os.Args)
} }
// SutureService allows for the accounts command to be embedded and supervised by a suture supervisor tree. // SutureService allows for the accounts command to be embedded and supervised by a suture supervisor tree.

View File

@@ -16,21 +16,21 @@ import (
"github.com/opencloud-eu/opencloud/services/auth-bearer/pkg/revaconfig" "github.com/opencloud-eu/opencloud/services/auth-bearer/pkg/revaconfig"
"github.com/opencloud-eu/opencloud/services/auth-bearer/pkg/server/debug" "github.com/opencloud-eu/opencloud/services/auth-bearer/pkg/server/debug"
"github.com/opencloud-eu/reva/v2/cmd/revad/runtime" "github.com/opencloud-eu/reva/v2/cmd/revad/runtime"
"github.com/urfave/cli/v2"
"github.com/spf13/cobra"
) )
// Server is the entry point for the server command. // Server is the entry point for the server command.
func Server(cfg *config.Config) *cobra.Command { func Server(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "server", Name: "server",
Short: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name), Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
PreRunE: func(cmd *cobra.Command, args []string) error { Category: "server",
Before: func(c *cli.Context) error {
return configlog.ReturnFatal(parser.ParseConfig(cfg)) return configlog.ReturnFatal(parser.ParseConfig(cfg))
}, },
RunE: func(cmd *cobra.Command, args []string) error { Action: func(c *cli.Context) error {
logger := logging.Configure(cfg.Service.Name, cfg.Log) logger := logging.Configure(cfg.Service.Name, cfg.Log)
traceProvider, err := tracing.GetTraceProvider(cmd.Context(), cfg.Commons.TracesExporter, cfg.Service.Name) traceProvider, err := tracing.GetTraceProvider(c.Context, cfg.Commons.TracesExporter, cfg.Service.Name)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -6,19 +6,20 @@ import (
"github.com/opencloud-eu/opencloud/pkg/registry" "github.com/opencloud-eu/opencloud/pkg/registry"
"github.com/opencloud-eu/opencloud/pkg/version" "github.com/opencloud-eu/opencloud/pkg/version"
"github.com/opencloud-eu/opencloud/services/auth-bearer/pkg/config"
"github.com/spf13/cobra"
"github.com/olekukonko/tablewriter" "github.com/olekukonko/tablewriter"
"github.com/olekukonko/tablewriter/tw" "github.com/olekukonko/tablewriter/tw"
"github.com/opencloud-eu/opencloud/services/auth-bearer/pkg/config"
"github.com/urfave/cli/v2"
) )
// Version prints the service versions of all running instances. // Version prints the service versions of all running instances.
func Version(cfg *config.Config) *cobra.Command { func Version(cfg *config.Config) *cli.Command {
return &cobra.Command{ return &cli.Command{
Use: "version", Name: "version",
Short: "print the version of this binary and the running services instances", Usage: "print the version of this binary and the running services instances",
RunE: func(cmd *cobra.Command, args []string) error { Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString()) fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled()) fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("") fmt.Println("")

Some files were not shown because too many files have changed in this diff Show More