mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-06 05:01:10 -05:00
Compare commits
10 Commits
ci/skip-on
...
ocdav-to-f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e09b6d3be7 | ||
|
|
c9ca5e780d | ||
|
|
c0925668fd | ||
|
|
55986e657f | ||
|
|
a8d58deed2 | ||
|
|
b227df74b6 | ||
|
|
c21637cb0f | ||
|
|
aad42fd3de | ||
|
|
24fc3ba005 | ||
|
|
1e369e40fc |
4
.vscode/launch.json
vendored
4
.vscode/launch.json
vendored
@@ -36,7 +36,7 @@
|
||||
// demo users
|
||||
"IDM_CREATE_DEMO_USERS": "true",
|
||||
// OC_RUN_SERVICES allows to start a subset of services even in the supervised mode
|
||||
//"OC_RUN_SERVICES": "settings,storage-system,graph,idp,idm,ocs,store,thumbnails,web,webdav,frontend,gateway,users,groups,auth-basic,storage-authmachine,storage-users,storage-shares,storage-publiclink,storage-system,app-provider,sharing,proxy,ocdav",
|
||||
//"OC_RUN_SERVICES": "settings,storage-system,graph,idp,idm,ocs,store,thumbnails,web,webdav,frontend,gateway,users,groups,auth-basic,storage-authmachine,storage-users,storage-shares,storage-publiclink,storage-system,app-provider,sharing,proxy",
|
||||
|
||||
/*
|
||||
* Keep secrets and passwords in one block to allow easy uncommenting
|
||||
@@ -129,8 +129,6 @@
|
||||
"IDP_HTTP_ADDR": "127.0.0.1:10130",
|
||||
"NATS_DEBUG_ADDR": "127.0.0.1:10234",
|
||||
"NATS_NATS_PORT": "10233",
|
||||
"OCDAV_HTTP_ADDR": "127.0.0.1:10350",
|
||||
"OCDAV_DEBUG_ADDR": "127.0.0.1:10163",
|
||||
"OCM_DEBUG_ADDR": "127.0.0.1:10281",
|
||||
"OCM_HTTP_ADDR": "127.0.0.1:10280",
|
||||
"OCM_GRPC_ADDR": "127.0.0.1:10282",
|
||||
|
||||
183
.woodpecker.star
183
.woodpecker.star
@@ -103,13 +103,13 @@ config = {
|
||||
"basic": {
|
||||
"suites": [
|
||||
"apiArchiver",
|
||||
# "apiContract",
|
||||
# "apiCors",
|
||||
# "apiAsyncUpload",
|
||||
# "apiDownloads",
|
||||
# "apiDepthInfinity",
|
||||
# "apiLocks",
|
||||
# "apiActivities",
|
||||
"apiContract",
|
||||
"apiCors",
|
||||
"apiAsyncUpload",
|
||||
"apiDownloads",
|
||||
"apiDepthInfinity",
|
||||
"apiLocks",
|
||||
"apiActivities",
|
||||
],
|
||||
"skip": False,
|
||||
},
|
||||
@@ -117,7 +117,7 @@ config = {
|
||||
"suites": [
|
||||
"apiSettings",
|
||||
],
|
||||
"skip": True,
|
||||
"skip": False,
|
||||
"withRemotePhp": [True],
|
||||
"emailNeeded": True,
|
||||
"extraTestEnvironment": {
|
||||
@@ -135,7 +135,7 @@ config = {
|
||||
},
|
||||
"graph": {
|
||||
"suites": [
|
||||
# "apiGraph",
|
||||
"apiGraph",
|
||||
"apiServiceAvailability",
|
||||
# skip tests for collaborativePosix. see https://github.com/opencloud-eu/opencloud/issues/2036
|
||||
#"collaborativePosix",
|
||||
@@ -147,38 +147,38 @@ config = {
|
||||
"suites": [
|
||||
"apiGraphUserGroup",
|
||||
],
|
||||
"skip": True,
|
||||
"skip": False,
|
||||
"withRemotePhp": [True],
|
||||
},
|
||||
"spaces": {
|
||||
"suites": [
|
||||
"apiSpaces",
|
||||
],
|
||||
"skip": True,
|
||||
"skip": False,
|
||||
},
|
||||
"spacesShares": {
|
||||
"suites": [
|
||||
"apiSpacesShares",
|
||||
],
|
||||
"skip": True,
|
||||
"skip": False,
|
||||
},
|
||||
"spacesDavOperation": {
|
||||
"suites": [
|
||||
"apiSpacesDavOperation",
|
||||
],
|
||||
"skip": True,
|
||||
"skip": False,
|
||||
},
|
||||
"search1": {
|
||||
"suites": [
|
||||
"apiSearch1",
|
||||
],
|
||||
"skip": True,
|
||||
"skip": False,
|
||||
},
|
||||
"search2": {
|
||||
"suites": [
|
||||
"apiSearch2",
|
||||
],
|
||||
"skip": True,
|
||||
"skip": False,
|
||||
},
|
||||
"sharingNg": {
|
||||
"suites": [
|
||||
@@ -186,23 +186,23 @@ config = {
|
||||
"apiSharingNg1",
|
||||
"apiSharingNg2",
|
||||
],
|
||||
"skip": True,
|
||||
"skip": False,
|
||||
},
|
||||
"sharingNgShareInvitation": {
|
||||
"suites": [
|
||||
"apiSharingNgShareInvitation",
|
||||
],
|
||||
"skip": True,
|
||||
"skip": False,
|
||||
},
|
||||
"sharingNgLinkShare": {
|
||||
"suites": [
|
||||
"apiSharingNgLinkSharePermission",
|
||||
"apiSharingNgLinkShareRoot",
|
||||
],
|
||||
"skip": True,
|
||||
"skip": False,
|
||||
},
|
||||
"accountsHashDifficulty": {
|
||||
"skip": True,
|
||||
"skip": False,
|
||||
"suites": [
|
||||
"apiAccountsHashDifficulty",
|
||||
],
|
||||
@@ -212,7 +212,7 @@ config = {
|
||||
"suites": [
|
||||
"apiNotification",
|
||||
],
|
||||
"skip": True,
|
||||
"skip": False,
|
||||
"withRemotePhp": [True],
|
||||
"emailNeeded": True,
|
||||
"extraTestEnvironment": {
|
||||
@@ -232,7 +232,7 @@ config = {
|
||||
"suites": [
|
||||
"apiAntivirus",
|
||||
],
|
||||
"skip": True,
|
||||
"skip": False,
|
||||
"antivirusNeeded": True,
|
||||
"generateVirusFiles": True,
|
||||
"extraServerEnvironment": {
|
||||
@@ -248,14 +248,14 @@ config = {
|
||||
"suites": [
|
||||
"apiSearchContent",
|
||||
],
|
||||
"skip": True,
|
||||
"skip": False,
|
||||
"tikaNeeded": True,
|
||||
},
|
||||
"ocm": {
|
||||
"suites": [
|
||||
"apiOcm",
|
||||
],
|
||||
"skip": True,
|
||||
"skip": False,
|
||||
"withRemotePhp": [True],
|
||||
"federationServer": True,
|
||||
"emailNeeded": True,
|
||||
@@ -281,7 +281,7 @@ config = {
|
||||
"suites": [
|
||||
"apiCollaboration",
|
||||
],
|
||||
"skip": True,
|
||||
"skip": False,
|
||||
"collaborationServiceNeeded": True,
|
||||
"extraServerEnvironment": {
|
||||
"GATEWAY_GRPC_ADDR": "0.0.0.0:9142",
|
||||
@@ -291,14 +291,14 @@ config = {
|
||||
"suites": [
|
||||
"apiAuthApp",
|
||||
],
|
||||
"skip": True,
|
||||
"skip": False,
|
||||
"withRemotePhp": [True],
|
||||
},
|
||||
"cliCommands": {
|
||||
"suites": [
|
||||
"cliCommands",
|
||||
],
|
||||
"skip": True,
|
||||
"skip": False,
|
||||
"withRemotePhp": [True],
|
||||
"antivirusNeeded": True,
|
||||
"generateVirusFiles": True,
|
||||
@@ -314,7 +314,7 @@ config = {
|
||||
"suites": [
|
||||
"apiTenancy",
|
||||
],
|
||||
"skip": True,
|
||||
"skip": False,
|
||||
"withRemotePhp": [True],
|
||||
"ldapNeeded": True,
|
||||
"extraTestEnvironment": {
|
||||
@@ -347,13 +347,13 @@ config = {
|
||||
},
|
||||
"coreApiTests": {
|
||||
"numberOfParts": 7,
|
||||
"skip": True,
|
||||
"skipExceptParts": [1],
|
||||
"skip": False,
|
||||
"skipExceptParts": [],
|
||||
"storages": ["posix"],
|
||||
},
|
||||
"e2eTests": {
|
||||
"part": {
|
||||
"skip": True,
|
||||
"skip": False,
|
||||
"totalParts": 4, # divide and run all suites in parts (divide pipelines)
|
||||
# suites to skip
|
||||
"xsuites": [
|
||||
@@ -370,14 +370,14 @@ config = {
|
||||
],
|
||||
},
|
||||
"search": {
|
||||
"skip": True,
|
||||
"skip": False,
|
||||
"suites": ["search"], # suites to run
|
||||
"tikaNeeded": True,
|
||||
},
|
||||
},
|
||||
"e2eMultiService": {
|
||||
"testSuites": {
|
||||
"skip": True,
|
||||
"skip": False,
|
||||
"suites": [
|
||||
"smoke",
|
||||
"shares",
|
||||
@@ -454,15 +454,6 @@ CI_HTTP_PROXY_ENV = {
|
||||
},
|
||||
}
|
||||
|
||||
def prefixStepCommands(pipeline, commands = [], skip_steps = []):
|
||||
default_skip_steps = ["evaluate-previous-run"]
|
||||
skip_steps = default_skip_steps + skip_steps
|
||||
for step in pipeline["steps"]:
|
||||
if not "commands" in step.keys():
|
||||
print(step["name"])
|
||||
if "commands" in step.keys() and step["name"] not in skip_steps:
|
||||
step["commands"] = commands + step["commands"]
|
||||
|
||||
def pipelineDependsOn(pipeline, dependant_pipelines):
|
||||
if "depends_on" in pipeline.keys():
|
||||
pipeline["depends_on"] = pipeline["depends_on"] + getPipelineNames(dependant_pipelines)
|
||||
@@ -500,8 +491,6 @@ def main(ctx):
|
||||
Returns:
|
||||
none
|
||||
"""
|
||||
# return localApiTestPipeline(ctx)
|
||||
# return savePipelineNumber(ctx) + test()
|
||||
|
||||
if ctx.build.event == "cron" and ctx.build.sender == "translation-sync":
|
||||
return translation_sync(ctx)
|
||||
@@ -521,9 +510,16 @@ def main(ctx):
|
||||
)
|
||||
|
||||
test_pipelines = \
|
||||
pipelinesDependsOn(buildWebCache(ctx), savePipelineNumber(ctx)) + \
|
||||
pipelinesDependsOn(cacheBrowsers(ctx), savePipelineNumber(ctx)) + \
|
||||
pipelinesDependsOn(buildOpencloudBinaryForTesting(ctx), savePipelineNumber(ctx)) + \
|
||||
codestyle(ctx) + \
|
||||
checkGherkinLint(ctx) + \
|
||||
checkTestSuitesInExpectedFailures(ctx) + \
|
||||
buildWebCache(ctx) + \
|
||||
cacheBrowsers(ctx) + \
|
||||
getGoBinForTesting(ctx) + \
|
||||
buildOpencloudBinaryForTesting(ctx) + \
|
||||
checkStarlark(ctx) + \
|
||||
build_release_helpers + \
|
||||
testOpencloudAndUploadResults(ctx) + \
|
||||
testPipelines(ctx)
|
||||
|
||||
build_release_pipelines = \
|
||||
@@ -565,72 +561,14 @@ def main(ctx):
|
||||
),
|
||||
)
|
||||
|
||||
pipelines = test_pipelines #+ build_release_pipelines + notifyMatrix(ctx)
|
||||
pipelines = test_pipelines + build_release_pipelines + notifyMatrix(ctx)
|
||||
|
||||
pipelineSanityChecks(pipelines)
|
||||
return savePipelineNumber(ctx) + pipelines
|
||||
|
||||
def savePipelineNumber(ctx):
|
||||
base_url = "https://raw.githubusercontent.com/%s" % repo_slug
|
||||
script_link = "%s/%s/tests/config/woodpecker/upload_pipeline_info.sh" % (base_url, ctx.build.commit)
|
||||
return [{
|
||||
"name": "save-pipeline-info",
|
||||
"skip_clone": True,
|
||||
"steps": [{
|
||||
"name": "upload-info",
|
||||
"image": MINIO_MC,
|
||||
"environment": MINIO_MC_ENV,
|
||||
"commands": [
|
||||
"curl -s -o upload_pipeline_info.sh %s" % script_link,
|
||||
"bash -x upload_pipeline_info.sh",
|
||||
],
|
||||
}],
|
||||
"when": [
|
||||
{
|
||||
"event": ["push", "manual"],
|
||||
"branch": ["main", "stable-*"],
|
||||
},
|
||||
event["tag"],
|
||||
event["cron"],
|
||||
event["pull_request"],
|
||||
],
|
||||
}]
|
||||
|
||||
def test():
|
||||
return [{
|
||||
"name": "test-pipeline",
|
||||
"steps": [{
|
||||
"name": "get-previous-pipeline",
|
||||
"image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
|
||||
"commands": [
|
||||
"node --version",
|
||||
"node tests/config/woodpecker/evaluate_pipeline.js",
|
||||
],
|
||||
}],
|
||||
"depends_on": ["save-pipeline-info"],
|
||||
"when": [
|
||||
{
|
||||
"event": ["push", "manual"],
|
||||
"branch": ["main", "stable-*"],
|
||||
},
|
||||
event["tag"],
|
||||
event["cron"],
|
||||
event["pull_request"],
|
||||
],
|
||||
}]
|
||||
|
||||
def evaluateWorkflowStep():
|
||||
return [{
|
||||
"name": "evaluate-previous-run",
|
||||
"image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
|
||||
"commands": [
|
||||
"node tests/config/woodpecker/evaluate_pipeline.js",
|
||||
],
|
||||
}]
|
||||
return pipelines
|
||||
|
||||
def cachePipeline(ctx, name, steps):
|
||||
return {
|
||||
"name": "cache-%s" % name,
|
||||
"name": "build-%s-cache" % name,
|
||||
"steps": steps,
|
||||
"when": [
|
||||
{
|
||||
@@ -852,7 +790,7 @@ def testOpencloud(ctx):
|
||||
]
|
||||
|
||||
return {
|
||||
"name": "test-lint-unit",
|
||||
"name": "linting_and_unitTests",
|
||||
"steps": steps,
|
||||
"when": [
|
||||
event["base"],
|
||||
@@ -899,7 +837,7 @@ def scanOpencloud(ctx):
|
||||
|
||||
def buildOpencloudBinaryForTesting(ctx):
|
||||
return [{
|
||||
"name": "build-opencloud-for-testing",
|
||||
"name": "build_opencloud_binary_for_testing",
|
||||
"steps": makeNodeGenerate("") +
|
||||
makeGoGenerate("") +
|
||||
build() +
|
||||
@@ -1065,7 +1003,7 @@ def codestyle(ctx):
|
||||
|
||||
def cs3ApiTests(ctx, storage, accounts_hash_difficulty = 4):
|
||||
return {
|
||||
"name": "test-cs3-API-%s" % storage,
|
||||
"name": "cs3ApiTests-%s" % storage,
|
||||
"steps": restoreBuildArtifactCache(ctx, dirs["opencloudBinArtifact"], dirs["opencloudBinPath"]) +
|
||||
opencloudServer(storage, accounts_hash_difficulty, deploy_type = "cs3api_validator") +
|
||||
[
|
||||
@@ -1166,7 +1104,7 @@ def wopiValidatorTests(ctx, storage, wopiServerType, accounts_hash_difficulty =
|
||||
})
|
||||
|
||||
return {
|
||||
"name": "test-wopi-validator-%s-%s" % (wopiServerType, storage),
|
||||
"name": "wopiValidatorTests-%s-%s" % (wopiServerType, storage),
|
||||
"services": fakeOffice(),
|
||||
"steps": restoreBuildArtifactCache(ctx, dirs["opencloudBinArtifact"], dirs["opencloudBinPath"]) +
|
||||
waitForServices("fake-office", ["fakeoffice:8080"]) +
|
||||
@@ -1250,9 +1188,9 @@ def localApiTestPipeline(ctx):
|
||||
for storage in params["storages"]:
|
||||
for run_with_remote_php in params["withRemotePhp"]:
|
||||
for run_with_watch_fs_enabled in params["enableWatchFs"]:
|
||||
pipeline_name = "test-API"
|
||||
pipeline_name = "API"
|
||||
if name.startswith("cli"):
|
||||
pipeline_name = "test-CLI"
|
||||
pipeline_name = "CLI"
|
||||
pipeline_name += "-%s" % name
|
||||
if not run_with_remote_php:
|
||||
pipeline_name += "-withoutRemotePhp"
|
||||
@@ -1262,7 +1200,7 @@ def localApiTestPipeline(ctx):
|
||||
|
||||
pipeline = {
|
||||
"name": pipeline_name,
|
||||
"steps": evaluateWorkflowStep() + restoreBuildArtifactCache(ctx, dirs["opencloudBinArtifact"], dirs["opencloudBinPath"]) +
|
||||
"steps": restoreBuildArtifactCache(ctx, dirs["opencloudBinArtifact"], dirs["opencloudBinPath"]) +
|
||||
(tikaService() if params["tikaNeeded"] else []) +
|
||||
(waitForServices("online-offices", ["collabora:9980", "onlyoffice:443", "fakeoffice:8080"]) if params["collaborationServiceNeeded"] else []) +
|
||||
(waitForClamavService() if params["antivirusNeeded"] else []) +
|
||||
@@ -1297,10 +1235,6 @@ def localApiTestPipeline(ctx):
|
||||
},
|
||||
],
|
||||
}
|
||||
prefixStepCommands(pipeline, [
|
||||
". ./.woodpecker.env",
|
||||
'[ "$SKIP_WORKFLOW" = "true" ] && exit 0',
|
||||
])
|
||||
pipelines.append(pipeline)
|
||||
return pipelines
|
||||
|
||||
@@ -1385,7 +1319,7 @@ def coreApiTestPipeline(ctx):
|
||||
for run_with_remote_php in params["withRemotePhp"]:
|
||||
for run_with_watch_fs_enabled in params["enableWatchFs"]:
|
||||
if not debugPartsEnabled or (debugPartsEnabled and runPart in debugParts):
|
||||
pipeline_name = "test-Core-API-%s" % runPart
|
||||
pipeline_name = "Core-API-%s" % runPart
|
||||
if not run_with_remote_php:
|
||||
pipeline_name += "-withoutRemotePhp"
|
||||
pipeline_name += "-%s" % storage
|
||||
@@ -1567,7 +1501,7 @@ def e2eTestPipeline(ctx):
|
||||
"bash run-e2e.sh %s --run-part %d" % (e2e_args, run_part),
|
||||
]
|
||||
pipelines.append({
|
||||
"name": "test-e2e-%s-%s-%s%s" % (name, run_part, storage, "-watchfs" if watch_fs_enabled else ""),
|
||||
"name": "e2e-tests-%s-%s-%s%s" % (name, run_part, storage, "-watchfs" if watch_fs_enabled else ""),
|
||||
"steps": steps_before + [run_e2e] + steps_after,
|
||||
"depends_on": getPipelineNames(buildOpencloudBinaryForTesting(ctx) + buildWebCache(ctx)),
|
||||
"when": e2e_trigger,
|
||||
@@ -1575,7 +1509,7 @@ def e2eTestPipeline(ctx):
|
||||
else:
|
||||
step_e2e["commands"].append("bash run-e2e.sh %s" % e2e_args)
|
||||
pipelines.append({
|
||||
"name": "test-e2e-%s-%s%s" % (name, storage, "-watchfs" if watch_fs_enabled else ""),
|
||||
"name": "e2e-tests-%s-%s%s" % (name, storage, "-watchfs" if watch_fs_enabled else ""),
|
||||
"steps": steps_before + [step_e2e] + steps_after,
|
||||
"depends_on": getPipelineNames(buildOpencloudBinaryForTesting(ctx) + buildWebCache(ctx)),
|
||||
"when": e2e_trigger,
|
||||
@@ -2273,7 +2207,6 @@ def opencloudServer(storage = "decomposed", accounts_hash_difficulty = 4, depend
|
||||
"IDP_DEBUG_ADDR": "0.0.0.0:9134",
|
||||
"INVITATIONS_DEBUG_ADDR": "0.0.0.0:9269",
|
||||
"NATS_DEBUG_ADDR": "0.0.0.0:9234",
|
||||
"OCDAV_DEBUG_ADDR": "0.0.0.0:9163",
|
||||
"OCM_DEBUG_ADDR": "0.0.0.0:9281",
|
||||
"OCS_DEBUG_ADDR": "0.0.0.0:9114",
|
||||
"POSTPROCESSING_DEBUG_ADDR": "0.0.0.0:9255",
|
||||
@@ -2351,9 +2284,9 @@ def opencloudServer(storage = "decomposed", accounts_hash_difficulty = 4, depend
|
||||
"%s/bin/ocwrapper serve --bin %s --url %s --admin-username admin --admin-password admin" % (dirs["ocWrapper"], dirs["opencloudBin"], environment["OC_URL"]),
|
||||
]
|
||||
else:
|
||||
server_commands.append(
|
||||
server_commands += [
|
||||
"%s server" % dirs["opencloudBin"],
|
||||
)
|
||||
]
|
||||
|
||||
wait_for_opencloud = {
|
||||
"name": "wait-for-%s" % container_name,
|
||||
@@ -2740,7 +2673,7 @@ def litmus(ctx, storage):
|
||||
litmusCommand = "/usr/local/bin/litmus-wrapper"
|
||||
|
||||
result = {
|
||||
"name": "test-litmus",
|
||||
"name": "litmus",
|
||||
"steps": restoreBuildArtifactCache(ctx, dirs["opencloudBinArtifact"], dirs["opencloudBinPath"]) +
|
||||
opencloudServer(storage) +
|
||||
setupForLitmus() +
|
||||
|
||||
1
Makefile
1
Makefile
@@ -44,7 +44,6 @@ OC_MODULES = \
|
||||
services/invitations \
|
||||
services/nats \
|
||||
services/notifications \
|
||||
services/ocdav \
|
||||
services/ocm \
|
||||
services/ocs \
|
||||
services/policies \
|
||||
|
||||
10
go.mod
10
go.mod
@@ -65,7 +65,7 @@ require (
|
||||
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/reva/v2 v2.41.0
|
||||
github.com/opensearch-project/opensearch-go/v4 v4.5.0
|
||||
github.com/opensearch-project/opensearch-go/v4 v4.6.0
|
||||
github.com/orcaman/concurrent-map v1.0.0
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/pkg/xattr v0.4.12
|
||||
@@ -97,11 +97,11 @@ require (
|
||||
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/zpages v0.63.0
|
||||
go.opentelemetry.io/otel v1.38.0
|
||||
go.opentelemetry.io/otel v1.39.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/sdk v1.38.0
|
||||
go.opentelemetry.io/otel/trace v1.38.0
|
||||
go.opentelemetry.io/otel/sdk v1.39.0
|
||||
go.opentelemetry.io/otel/trace v1.39.0
|
||||
golang.org/x/crypto v0.46.0
|
||||
golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac
|
||||
golang.org/x/image v0.33.0
|
||||
@@ -384,7 +384,7 @@ require (
|
||||
go.opencensus.io v0.24.0 // 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/metric v1.38.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.39.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.7.1 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
|
||||
24
go.sum
24
go.sum
@@ -973,8 +973,8 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8
|
||||
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/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M=
|
||||
github.com/opensearch-project/opensearch-go/v4 v4.5.0 h1:26XckmmF6MhlXt91Bu1yY6R51jy1Ns/C3XgIfvyeTRo=
|
||||
github.com/opensearch-project/opensearch-go/v4 v4.5.0/go.mod h1:VmFc7dqOEM3ZtLhrpleOzeq+cqUgNabqQG5gX0xId64=
|
||||
github.com/opensearch-project/opensearch-go/v4 v4.6.0 h1:Ac8aLtDSmLEyOmv0r1qhQLw3b4vcUhE42NE9k+Z4cRc=
|
||||
github.com/opensearch-project/opensearch-go/v4 v4.6.0/go.mod h1:3iZtb4SNt3IzaxavKq0dURh1AmtVgYW71E4XqmYnIiQ=
|
||||
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/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
|
||||
@@ -1315,8 +1315,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/zpages v0.63.0 h1:TppOKuZGbqXMgsfjqq3i09N5Vbo1JLtLImUqiTPGnX4=
|
||||
go.opentelemetry.io/contrib/zpages v0.63.0/go.mod h1:5F8uugz75ay/MMhRRhxAXY33FuaI8dl7jTxefrIy5qk=
|
||||
go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=
|
||||
go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM=
|
||||
go.opentelemetry.io/otel v1.39.0 h1:8yPrr/S0ND9QEfTfdP9V+SiwT4E0G7Y5MO7p85nis48=
|
||||
go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8=
|
||||
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/otlptracegrpc v1.38.0 h1:lwI4Dc5leUqENgGuQImwLo4WnuXFPetmPpkLi2IrX54=
|
||||
@@ -1325,14 +1325,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/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/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA=
|
||||
go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI=
|
||||
go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E=
|
||||
go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA=
|
||||
go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE=
|
||||
go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs=
|
||||
go.opentelemetry.io/otel/metric v1.39.0 h1:d1UzonvEZriVfpNKEVmHXbdf909uGTOQjA0HF0Ls5Q0=
|
||||
go.opentelemetry.io/otel/metric v1.39.0/go.mod h1:jrZSWL33sD7bBxg1xjrqyDjnuzTUB0x1nBERXd7Ftcs=
|
||||
go.opentelemetry.io/otel/sdk v1.39.0 h1:nMLYcjVsvdui1B/4FRkwjzoRVsMK8uL/cj0OyhKzt18=
|
||||
go.opentelemetry.io/otel/sdk v1.39.0/go.mod h1:vDojkC4/jsTJsE+kh+LXYQlbL8CgrEcwmt1ENZszdJE=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.39.0 h1:cXMVVFVgsIf2YL6QkRF4Urbr/aMInf+2WKg+sEJTtB8=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew=
|
||||
go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6/qCJI=
|
||||
go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA=
|
||||
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.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
|
||||
@@ -29,7 +29,6 @@ import (
|
||||
invitations "github.com/opencloud-eu/opencloud/services/invitations/pkg/command"
|
||||
nats "github.com/opencloud-eu/opencloud/services/nats/pkg/command"
|
||||
notifications "github.com/opencloud-eu/opencloud/services/notifications/pkg/command"
|
||||
ocdav "github.com/opencloud-eu/opencloud/services/ocdav/pkg/command"
|
||||
ocm "github.com/opencloud-eu/opencloud/services/ocm/pkg/command"
|
||||
ocs "github.com/opencloud-eu/opencloud/services/ocs/pkg/command"
|
||||
policies "github.com/opencloud-eu/opencloud/services/policies/pkg/command"
|
||||
@@ -164,11 +163,6 @@ var serviceCommands = []register.Command{
|
||||
cfg.Notifications.Commons = cfg.Commons
|
||||
})
|
||||
},
|
||||
func(cfg *config.Config) *cobra.Command {
|
||||
return ServiceCommand(cfg, cfg.OCDav.Service.Name, ocdav.GetCommands(cfg.OCDav), func(c *config.Config) {
|
||||
cfg.OCDav.Commons = cfg.Commons
|
||||
})
|
||||
},
|
||||
func(cfg *config.Config) *cobra.Command {
|
||||
return ServiceCommand(cfg, cfg.OCM.Service.Name, ocm.GetCommands(cfg.OCM), func(c *config.Config) {
|
||||
cfg.OCM.Commons = cfg.Commons
|
||||
|
||||
@@ -281,6 +281,7 @@ func CreateConfig(insecure, forceOverwrite, diff bool, configPath, adminPassword
|
||||
cfg.Collaboration.App.Insecure = true
|
||||
cfg.Frontend.AppHandler = _insecureService
|
||||
cfg.Frontend.Archiver = _insecureService
|
||||
cfg.Frontend.OCDav = _insecureService
|
||||
cfg.Graph.Spaces = _insecureService
|
||||
cfg.Graph.Events = _insecureEvents
|
||||
cfg.Notifications.Notifications.Events = _insecureEvents
|
||||
@@ -289,7 +290,6 @@ func CreateConfig(insecure, forceOverwrite, diff bool, configPath, adminPassword
|
||||
cfg.Sharing.Events = _insecureEvents
|
||||
cfg.StorageUsers.Events = _insecureEvents
|
||||
cfg.Nats.Nats.TLSSkipVerifyClientCert = true
|
||||
cfg.Ocdav = _insecureService
|
||||
cfg.Proxy = ProxyService{
|
||||
InsecureBackends: true,
|
||||
OIDC: InsecureProxyOIDC{
|
||||
|
||||
@@ -32,7 +32,6 @@ type OpenCloudConfig struct {
|
||||
AuthBearer AuthbearerService `yaml:"auth_bearer"`
|
||||
Users UsersAndGroupsService `yaml:"users"`
|
||||
Groups UsersAndGroupsService `yaml:"groups"`
|
||||
Ocdav InsecureService `yaml:"ocdav"`
|
||||
Ocm OcmService `yaml:"ocm"`
|
||||
Thumbnails ThumbnailService `yaml:"thumbnails"`
|
||||
Search Search `yaml:"search"`
|
||||
@@ -105,6 +104,7 @@ type FrontendService struct {
|
||||
AppHandler InsecureService `yaml:"app_handler"`
|
||||
Archiver InsecureService
|
||||
ServiceAccount ServiceAccount `yaml:"service_account"`
|
||||
OCDav InsecureService
|
||||
}
|
||||
|
||||
// Gateway is the configuration for the gateway
|
||||
|
||||
@@ -40,7 +40,6 @@ import (
|
||||
invitations "github.com/opencloud-eu/opencloud/services/invitations/pkg/command"
|
||||
nats "github.com/opencloud-eu/opencloud/services/nats/pkg/command"
|
||||
notifications "github.com/opencloud-eu/opencloud/services/notifications/pkg/command"
|
||||
ocdav "github.com/opencloud-eu/opencloud/services/ocdav/pkg/command"
|
||||
ocm "github.com/opencloud-eu/opencloud/services/ocm/pkg/command"
|
||||
ocs "github.com/opencloud-eu/opencloud/services/ocs/pkg/command"
|
||||
policies "github.com/opencloud-eu/opencloud/services/policies/pkg/command"
|
||||
@@ -204,11 +203,6 @@ func NewService(ctx context.Context, options ...Option) (*Service, error) {
|
||||
cfg.IDM.Commons = cfg.Commons
|
||||
return idm.Execute(cfg.IDM)
|
||||
})
|
||||
reg(3, opts.Config.OCDav.Service.Name, func(ctx context.Context, cfg *occfg.Config) error {
|
||||
cfg.OCDav.Context = ctx
|
||||
cfg.OCDav.Commons = cfg.Commons
|
||||
return ocdav.Execute(cfg.OCDav)
|
||||
})
|
||||
reg(3, opts.Config.OCS.Service.Name, func(ctx context.Context, cfg *occfg.Config) error {
|
||||
cfg.OCS.Context = ctx
|
||||
cfg.OCS.Commons = cfg.Commons
|
||||
|
||||
@@ -24,7 +24,6 @@ import (
|
||||
invitations "github.com/opencloud-eu/opencloud/services/invitations/pkg/config"
|
||||
nats "github.com/opencloud-eu/opencloud/services/nats/pkg/config"
|
||||
notifications "github.com/opencloud-eu/opencloud/services/notifications/pkg/config"
|
||||
ocdav "github.com/opencloud-eu/opencloud/services/ocdav/pkg/config"
|
||||
ocm "github.com/opencloud-eu/opencloud/services/ocm/pkg/config"
|
||||
ocs "github.com/opencloud-eu/opencloud/services/ocs/pkg/config"
|
||||
policies "github.com/opencloud-eu/opencloud/services/policies/pkg/config"
|
||||
@@ -105,7 +104,6 @@ type Config struct {
|
||||
Invitations *invitations.Config `yaml:"invitations"`
|
||||
Nats *nats.Config `yaml:"nats"`
|
||||
Notifications *notifications.Config `yaml:"notifications"`
|
||||
OCDav *ocdav.Config `yaml:"ocdav"`
|
||||
OCM *ocm.Config `yaml:"ocm"`
|
||||
OCS *ocs.Config `yaml:"ocs"`
|
||||
Postprocessing *postprocessing.Config `yaml:"postprocessing"`
|
||||
|
||||
@@ -24,7 +24,6 @@ import (
|
||||
invitations "github.com/opencloud-eu/opencloud/services/invitations/pkg/config/defaults"
|
||||
nats "github.com/opencloud-eu/opencloud/services/nats/pkg/config/defaults"
|
||||
notifications "github.com/opencloud-eu/opencloud/services/notifications/pkg/config/defaults"
|
||||
ocdav "github.com/opencloud-eu/opencloud/services/ocdav/pkg/config/defaults"
|
||||
ocm "github.com/opencloud-eu/opencloud/services/ocm/pkg/config/defaults"
|
||||
ocs "github.com/opencloud-eu/opencloud/services/ocs/pkg/config/defaults"
|
||||
policies "github.com/opencloud-eu/opencloud/services/policies/pkg/config/defaults"
|
||||
@@ -80,7 +79,6 @@ func DefaultConfig() *Config {
|
||||
Invitations: invitations.DefaultConfig(),
|
||||
Nats: nats.DefaultConfig(),
|
||||
Notifications: notifications.DefaultConfig(),
|
||||
OCDav: ocdav.DefaultConfig(),
|
||||
OCM: ocm.DefaultConfig(),
|
||||
OCS: ocs.DefaultConfig(),
|
||||
Postprocessing: postprocessing.DefaultConfig(),
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"gotest.tools/v3/assert"
|
||||
"testing"
|
||||
"testing/fstest"
|
||||
|
||||
"gotest.tools/v3/assert"
|
||||
)
|
||||
|
||||
type TestConfig struct {
|
||||
@@ -98,6 +99,8 @@ frontend:
|
||||
service_account:
|
||||
service_account_id: c05389b2-d94c-4d01-a9b5-a2f97952cc14
|
||||
service_account_secret: GW5.x1vDM&+NPRi++eV@.P7Tms4vj!=s
|
||||
ocdav:
|
||||
insecure: true
|
||||
auth_basic:
|
||||
auth_providers:
|
||||
ldap:
|
||||
@@ -114,8 +117,6 @@ groups:
|
||||
drivers:
|
||||
ldap:
|
||||
bind_password: c68JL=V$c@0GHs!%eSb8r&Ps3rgzKnXJ
|
||||
ocdav:
|
||||
insecure: true
|
||||
ocm:
|
||||
service_account:
|
||||
service_account_id: c05389b2-d94c-4d01-a9b5-a2f97952cc14
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2025-12-16 00:02+0000\n"
|
||||
"POT-Creation-Date: 2026-01-05 00:06+0000\n"
|
||||
"PO-Revision-Date: 2025-01-27 10:17+0000\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"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2025-12-17 00:03+0000\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"
|
||||
|
||||
@@ -33,7 +33,6 @@ type Config struct {
|
||||
EnableFederatedSharingIncoming bool `yaml:"enable_federated_sharing_incoming" env:"OC_ENABLE_OCM;FRONTEND_ENABLE_FEDERATED_SHARING_INCOMING" desc:"Changing this value is NOT supported. Enables support for incoming federated sharing for clients. The backend behaviour is not changed." introductionVersion:"1.0.0"`
|
||||
EnableFederatedSharingOutgoing bool `yaml:"enable_federated_sharing_outgoing" env:"OC_ENABLE_OCM;FRONTEND_ENABLE_FEDERATED_SHARING_OUTGOING" desc:"Changing this value is NOT supported. Enables support for outgoing federated sharing for clients. The backend behaviour is not changed." introductionVersion:"1.0.0"`
|
||||
SearchMinLength int `yaml:"search_min_length" env:"FRONTEND_SEARCH_MIN_LENGTH" desc:"Minimum number of characters to enter before a client should start a search for Share receivers. This setting can be used to customize the user experience if e.g too many results are displayed." introductionVersion:"1.0.0"`
|
||||
Edition string `desc:"Edition of OpenCloud. Used for branding purposes." introductionVersion:"1.0.0"`
|
||||
DisableSSE bool `yaml:"disable_sse" env:"OC_DISABLE_SSE;FRONTEND_DISABLE_SSE" desc:"When set to true, clients are informed that the Server-Sent Events endpoint is not accessible." introductionVersion:"1.0.0"`
|
||||
DisableRadicale bool `yaml:"disable_radicale" env:"FRONTEND_DISABLE_RADICALE" desc:"When set to true, clients are informed that the Radicale (CalDAV/CardDAV) is not accessible." introductionVersion:"4.0.0"`
|
||||
DefaultLinkPermissions int `yaml:"default_link_permissions" env:"FRONTEND_DEFAULT_LINK_PERMISSIONS" desc:"Defines the default permissions a link is being created with. Possible values are 0 (= internal link, for instance members only) and 1 (= public link with viewer permissions). Defaults to 1." introductionVersion:"1.0.0"`
|
||||
@@ -44,6 +43,7 @@ type Config struct {
|
||||
Archiver Archiver `yaml:"archiver"`
|
||||
DataGateway DataGateway `yaml:"data_gateway"`
|
||||
OCS OCS `yaml:"ocs"`
|
||||
OCDav OCDav `yaml:"ocdav"`
|
||||
Checksums Checksums `yaml:"checksums"`
|
||||
ReadOnlyUserAttributes []string `yaml:"read_only_user_attributes" env:"FRONTEND_READONLY_USER_ATTRIBUTES" desc:"A list of user attributes to indicate as read-only. Supported values: 'user.onPremisesSamAccountName' (username), 'user.displayName', 'user.mail', 'user.passwordProfile' (password), 'user.appRoleAssignments' (role), 'user.memberOf' (groups), 'user.accountEnabled' (login allowed), 'drive.quota' (quota). See the Environment Variable Types description for more details." introductionVersion:"1.0.0"`
|
||||
LDAPServerWriteEnabled bool `yaml:"ldap_server_write_enabled" env:"OC_LDAP_SERVER_WRITE_ENABLED;FRONTEND_LDAP_SERVER_WRITE_ENABLED" desc:"Allow creating, modifying and deleting LDAP users via the GRAPH API. This can only be set to 'true' when keeping default settings for the LDAP user and group attribute types (the 'OC_LDAP_USER_SCHEMA_* and 'OC_LDAP_GROUP_SCHEMA_* variables)." introductionVersion:"1.0.0"`
|
||||
@@ -152,6 +152,36 @@ type OCS struct {
|
||||
ShowUserEmailInResults bool `yaml:"show_email_in_results" env:"OC_SHOW_USER_EMAIL_IN_RESULTS" desc:"Include user email addresses in responses. If absent or set to false emails will be omitted from results. Please note that admin users can always see all email addresses." introductionVersion:"1.0.0"`
|
||||
}
|
||||
|
||||
type OCDav struct {
|
||||
Prefix string `yaml:"prefix" env:"OCDAV_HTTP_PREFIX" desc:"A URL path prefix for the handler." introductionVersion:"1.0.0"`
|
||||
|
||||
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"OCDAV_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the loading of user's group memberships from the reva access token." introductionVersion:"1.0.0"`
|
||||
|
||||
WebdavNamespace string `yaml:"webdav_namespace" env:"OCDAV_WEBDAV_NAMESPACE" desc:"Jail requests to /dav/webdav into this CS3 namespace. Supports template layouting with CS3 User properties." introductionVersion:"1.0.0"`
|
||||
FilesNamespace string `yaml:"files_namespace" env:"OCDAV_FILES_NAMESPACE" desc:"Jail requests to /dav/files/{username} into this CS3 namespace. Supports template layouting with CS3 User properties." introductionVersion:"1.0.0"`
|
||||
SharesNamespace string `yaml:"shares_namespace" env:"OCDAV_SHARES_NAMESPACE" desc:"The human readable path for the share jail. Relative to a users personal space root. Upcased intentionally." introductionVersion:"1.0.0"`
|
||||
OCMNamespace string `yaml:"ocm_namespace" env:"OCDAV_OCM_NAMESPACE" desc:"The human readable path prefix for the ocm shares." introductionVersion:"1.0.0"`
|
||||
// PublicURL used to redirect /s/{token} URLs to
|
||||
PublicURL string `yaml:"public_url" env:"OC_URL;OCDAV_PUBLIC_URL" desc:"URL where OpenCloud is reachable for users." introductionVersion:"1.0.0"`
|
||||
|
||||
// Insecure certificates allowed when making requests to the gateway
|
||||
Insecure bool `yaml:"insecure" env:"OC_INSECURE;OCDAV_INSECURE" desc:"Allow insecure connections to the GATEWAY service." introductionVersion:"1.0.0"`
|
||||
EnableHTTPTPC bool `yaml:"enable_http_tpc" env:"OCDAV_ENABLE_HTTP_TPC" desc:"Enable HTTP / WebDAV Third-Party-Copy support." introductionVersion:"%%NEXT%%"`
|
||||
// Timeout in seconds when making requests to the gateway
|
||||
Timeout int64 `yaml:"gateway_request_timeout" env:"OCDAV_GATEWAY_REQUEST_TIMEOUT" desc:"Request timeout in seconds for requests from the oCDAV service to the GATEWAY service." introductionVersion:"1.0.0"`
|
||||
|
||||
MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OC_MACHINE_AUTH_API_KEY;OCDAV_MACHINE_AUTH_API_KEY" desc:"Machine auth API key used to validate internal requests necessary for the access to resources from other services." introductionVersion:"1.0.0"`
|
||||
|
||||
AllowPropfindDepthInfinity bool `yaml:"allow_propfind_depth_infinity" env:"OCDAV_ALLOW_PROPFIND_DEPTH_INFINITY" desc:"Allow the use of depth infinity in PROPFINDS. When enabled, a propfind will traverse through all subfolders. If many subfolders are expected, depth infinity can cause heavy server load and/or delayed response times." introductionVersion:"1.0.0"`
|
||||
|
||||
NameValidation NameValidation `yaml:"name_validation"`
|
||||
}
|
||||
|
||||
type NameValidation struct {
|
||||
InvalidChars []string `yaml:"invalid_chars" env:"OCDAV_NAME_VALIDATION_INVALID_CHARS" desc:"List of characters that are not allowed in file or folder names." introductionVersion:"%%NEXT%%"`
|
||||
MaxLength int `yaml:"max_length" env:"OCDAV_NAME_VALIDATION_MAX_LENGTH" desc:"Max lenght og file or folder names." introductionVersion:"%%NEXT%%"`
|
||||
}
|
||||
|
||||
type CacheWarmupDrivers struct {
|
||||
CBOX CBOXDriver `yaml:"cbox,omitempty"`
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
|
||||
"github.com/opencloud-eu/opencloud/pkg/shared"
|
||||
"github.com/opencloud-eu/opencloud/pkg/structs"
|
||||
"github.com/opencloud-eu/opencloud/pkg/version"
|
||||
"github.com/opencloud-eu/opencloud/services/frontend/pkg/config"
|
||||
)
|
||||
|
||||
@@ -88,7 +87,6 @@ func DefaultConfig() *config.Config {
|
||||
DefaultUploadProtocol: "tus",
|
||||
DefaultLinkPermissions: 1,
|
||||
SearchMinLength: 3,
|
||||
Edition: version.Edition,
|
||||
CheckForUpdates: true,
|
||||
Checksums: config.Checksums{
|
||||
SupportedTypes: []string{"sha1", "md5", "adler32"},
|
||||
@@ -120,6 +118,24 @@ func DefaultConfig() *config.Config {
|
||||
PublicShareMustHavePassword: true,
|
||||
IncludeOCMSharees: false,
|
||||
},
|
||||
OCDav: config.OCDav{
|
||||
Prefix: "",
|
||||
SkipUserGroupsInToken: false,
|
||||
|
||||
WebdavNamespace: "/users/{{.Id.OpaqueId}}",
|
||||
FilesNamespace: "/users/{{.Id.OpaqueId}}",
|
||||
SharesNamespace: "/Shares",
|
||||
OCMNamespace: "/public",
|
||||
PublicURL: "https://localhost:9200",
|
||||
Insecure: false,
|
||||
EnableHTTPTPC: false,
|
||||
Timeout: 84300,
|
||||
AllowPropfindDepthInfinity: false,
|
||||
NameValidation: config.NameValidation{
|
||||
InvalidChars: []string{"\f", "\r", "\n", "\\"},
|
||||
MaxLength: 255,
|
||||
},
|
||||
},
|
||||
Middleware: config.Middleware{
|
||||
Auth: config.Auth{
|
||||
CredentialsByUserAgent: map[string]string{},
|
||||
|
||||
@@ -209,7 +209,7 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
|
||||
"needsDbUpgrade": false,
|
||||
"version": version.Legacy,
|
||||
"versionstring": version.LegacyString,
|
||||
"edition": cfg.Edition,
|
||||
"edition": version.Edition,
|
||||
"productname": "OpenCloud",
|
||||
"product": "OpenCloud",
|
||||
"productversion": version.GetString(),
|
||||
@@ -357,6 +357,34 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
|
||||
"include_ocm_sharees": cfg.OCS.IncludeOCMSharees,
|
||||
"show_email_in_results": cfg.OCS.ShowUserEmailInResults,
|
||||
},
|
||||
"ocdav": map[string]interface{}{
|
||||
"prefix": cfg.OCDav.Prefix,
|
||||
"files_namespace": cfg.OCDav.FilesNamespace,
|
||||
"webdav_namespace": cfg.OCDav.WebdavNamespace,
|
||||
"shares_namespace": cfg.OCDav.SharesNamespace,
|
||||
"ocm_namespace": cfg.OCDav.OCMNamespace,
|
||||
"gatewaysvc": cfg.Reva.Address,
|
||||
"timeout": cfg.OCDav.Timeout,
|
||||
"insecure": cfg.OCDav.Insecure,
|
||||
"enable_http_tpc": cfg.OCDav.EnableHTTPTPC,
|
||||
"public_url": cfg.OCDav.PublicURL,
|
||||
// still not supported
|
||||
//"favorite_storage_driver": unused,
|
||||
//"favorite_storage_drivers": unused,
|
||||
"version": version.Legacy,
|
||||
"version_string": version.LegacyString,
|
||||
"edition": version.Edition,
|
||||
"product": "OpenCloud",
|
||||
"product_name": "OpenCloud",
|
||||
"product_version": version.GetString(),
|
||||
"allow_depth_infinity": cfg.OCDav.AllowPropfindDepthInfinity,
|
||||
"validation": map[string]interface{}{
|
||||
"invalid_chars": cfg.OCDav.NameValidation.InvalidChars,
|
||||
"max_length": cfg.OCDav.NameValidation.MaxLength,
|
||||
},
|
||||
"url_signing_shared_secret": cfg.Commons.URLSigningSecret,
|
||||
"machine_auth_apikey": cfg.MachineAuthAPIKey,
|
||||
},
|
||||
},
|
||||
},
|
||||
}, nil
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2025-12-16 00:02+0000\n"
|
||||
"POT-Creation-Date: 2026-01-05 00:06+0000\n"
|
||||
"PO-Revision-Date: 2025-01-27 10:17+0000\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"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2025-12-16 00:02+0000\n"
|
||||
"POT-Creation-Date: 2026-01-05 00:06+0000\n"
|
||||
"PO-Revision-Date: 2025-01-27 10:17+0000\n"
|
||||
"Last-Translator: LinkinWires <darkinsonic13@gmail.com>, 2025\n"
|
||||
"Language-Team: Ukrainian (https://app.transifex.com/opencloud-eu/teams/204053/uk/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2025-12-17 00:03+0000\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"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2025-12-14 00:02+0000\n"
|
||||
"POT-Creation-Date: 2026-01-03 00:06+0000\n"
|
||||
"PO-Revision-Date: 2025-01-27 10:17+0000\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"
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
SHELL := bash
|
||||
NAME := ocdav
|
||||
|
||||
ifneq (, $(shell command -v go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI
|
||||
include ../../.bingo/Variables.mk
|
||||
endif
|
||||
|
||||
include ../../.make/default.mk
|
||||
include ../../.make/go.mk
|
||||
include ../../.make/release.mk
|
||||
include ../../.make/docs.mk
|
||||
@@ -1,3 +0,0 @@
|
||||
# ocDAV
|
||||
|
||||
The ocdav service provides the WebDAV API which is required by OpenCloud clients. Previews (thumbnails) are provided by the [WebDAV service](../webdav).
|
||||
@@ -1,54 +0,0 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/opencloud-eu/opencloud/pkg/config/configlog"
|
||||
"github.com/opencloud-eu/opencloud/services/ocdav/pkg/config"
|
||||
"github.com/opencloud-eu/opencloud/services/ocdav/pkg/config/parser"
|
||||
"github.com/opencloud-eu/opencloud/services/ocdav/pkg/logging"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// Health is the entrypoint for the health command.
|
||||
func Health(cfg *config.Config) *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "health",
|
||||
Short: "check health status",
|
||||
PreRunE: func(cmd *cobra.Command, args []string) error {
|
||||
return configlog.ReturnError(parser.ParseConfig(cfg))
|
||||
},
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
|
||||
resp, err := http.Get(
|
||||
fmt.Sprintf(
|
||||
"http://%s/healthz",
|
||||
cfg.Debug.Addr,
|
||||
),
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
logger.Fatal().
|
||||
Err(err).
|
||||
Msg("Failed to request health check")
|
||||
}
|
||||
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
logger.Fatal().
|
||||
Int("code", resp.StatusCode).
|
||||
Msg("Health seems to be in bad state")
|
||||
}
|
||||
|
||||
logger.Debug().
|
||||
Int("code", resp.StatusCode).
|
||||
Msg("Health got a good state")
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/opencloud-eu/opencloud/pkg/clihelper"
|
||||
"github.com/opencloud-eu/opencloud/services/ocdav/pkg/config"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// GetCommands provides all commands for this service
|
||||
func GetCommands(cfg *config.Config) []*cobra.Command {
|
||||
return []*cobra.Command{
|
||||
// start this service
|
||||
Server(cfg),
|
||||
|
||||
// interaction with this service
|
||||
|
||||
// infos about this service
|
||||
Health(cfg),
|
||||
Version(cfg),
|
||||
}
|
||||
}
|
||||
|
||||
// Execute is the entry point for the OpenCloud ocdav command.
|
||||
func Execute(cfg *config.Config) error {
|
||||
app := clihelper.DefaultApp(&cobra.Command{
|
||||
Use: "ocdav",
|
||||
Short: "Provide a WebDav API for OpenCloud",
|
||||
})
|
||||
app.AddCommand(GetCommands(cfg)...)
|
||||
app.SetArgs(os.Args[1:])
|
||||
|
||||
return app.ExecuteContext(cfg.Context)
|
||||
}
|
||||
@@ -1,134 +0,0 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os/signal"
|
||||
|
||||
"github.com/opencloud-eu/opencloud/pkg/broker"
|
||||
"github.com/opencloud-eu/opencloud/pkg/config/configlog"
|
||||
"github.com/opencloud-eu/opencloud/pkg/registry"
|
||||
"github.com/opencloud-eu/opencloud/pkg/runner"
|
||||
ohttp "github.com/opencloud-eu/opencloud/pkg/service/http"
|
||||
"github.com/opencloud-eu/opencloud/pkg/tracing"
|
||||
"github.com/opencloud-eu/opencloud/pkg/version"
|
||||
"github.com/opencloud-eu/opencloud/services/ocdav/pkg/config"
|
||||
"github.com/opencloud-eu/opencloud/services/ocdav/pkg/config/parser"
|
||||
"github.com/opencloud-eu/opencloud/services/ocdav/pkg/logging"
|
||||
"github.com/opencloud-eu/opencloud/services/ocdav/pkg/server/debug"
|
||||
"github.com/opencloud-eu/reva/v2/pkg/micro/ocdav"
|
||||
"github.com/opencloud-eu/reva/v2/pkg/sharedconf"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// Server is the entry point for the server command.
|
||||
func Server(cfg *config.Config) *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "server",
|
||||
Short: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
|
||||
PreRunE: func(cmd *cobra.Command, args []string) error {
|
||||
return configlog.ReturnFatal(parser.ParseConfig(cfg))
|
||||
},
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
traceProvider, err := tracing.GetTraceProvider(cmd.Context(), cfg.Commons.TracesExporter, cfg.Service.Name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var cancel context.CancelFunc
|
||||
if cfg.Context == nil {
|
||||
cfg.Context, cancel = signal.NotifyContext(context.Background(), runner.StopSignals...)
|
||||
defer cancel()
|
||||
}
|
||||
ctx := cfg.Context
|
||||
|
||||
gr := runner.NewGroup()
|
||||
|
||||
// init reva shared config explicitly as the go-micro based ocdav does not use
|
||||
// the reva runtime. But we need e.g. the shared client settings to be initialized
|
||||
sc := map[string]interface{}{
|
||||
"jwt_secret": cfg.TokenManager.JWTSecret,
|
||||
"gatewaysvc": cfg.Reva.Address,
|
||||
"skip_user_groups_in_token": cfg.SkipUserGroupsInToken,
|
||||
"grpc_client_options": cfg.Reva.GetGRPCClientConfig(),
|
||||
}
|
||||
if err := sharedconf.Decode(sc); err != nil {
|
||||
logger.Error().Err(err).Msg("error decoding shared config for ocdav")
|
||||
}
|
||||
opts := []ocdav.Option{
|
||||
ocdav.Name(cfg.HTTP.Namespace + "." + cfg.Service.Name),
|
||||
ocdav.Version(version.GetString()),
|
||||
ocdav.Context(ctx),
|
||||
ocdav.Logger(logger.Logger),
|
||||
ocdav.Address(cfg.HTTP.Addr),
|
||||
ocdav.AllowCredentials(cfg.HTTP.CORS.AllowCredentials),
|
||||
ocdav.AllowedMethods(cfg.HTTP.CORS.AllowedMethods),
|
||||
ocdav.AllowedHeaders(cfg.HTTP.CORS.AllowedHeaders),
|
||||
ocdav.AllowedOrigins(cfg.HTTP.CORS.AllowedOrigins),
|
||||
ocdav.FilesNamespace(cfg.FilesNamespace),
|
||||
ocdav.WebdavNamespace(cfg.WebdavNamespace),
|
||||
ocdav.OCMNamespace(cfg.OCMNamespace),
|
||||
ocdav.AllowDepthInfinity(cfg.AllowPropfindDepthInfinity),
|
||||
ocdav.SharesNamespace(cfg.SharesNamespace),
|
||||
ocdav.Timeout(cfg.Timeout),
|
||||
ocdav.Insecure(cfg.Insecure),
|
||||
ocdav.PublicURL(cfg.PublicURL),
|
||||
ocdav.Prefix(cfg.HTTP.Prefix),
|
||||
ocdav.GatewaySvc(cfg.Reva.Address),
|
||||
ocdav.JWTSecret(cfg.TokenManager.JWTSecret),
|
||||
ocdav.ProductName(cfg.Status.ProductName),
|
||||
ocdav.ProductVersion(cfg.Status.ProductVersion),
|
||||
ocdav.Product(cfg.Status.Product),
|
||||
ocdav.Version(cfg.Status.Version),
|
||||
ocdav.VersionString(cfg.Status.VersionString),
|
||||
ocdav.Edition(cfg.Status.Edition),
|
||||
ocdav.MachineAuthAPIKey(cfg.MachineAuthAPIKey),
|
||||
ocdav.Broker(broker.NoOp{}),
|
||||
// ocdav.FavoriteManager() // FIXME needs a proper persistence implementation https://github.com/owncloud/ocis/issues/1228
|
||||
// ocdav.LockSystem(), // will default to the CS3 lock system
|
||||
// ocdav.TLSConfig() // tls config for the http server
|
||||
ocdav.MetricsEnabled(true),
|
||||
ocdav.MetricsNamespace("ocis"),
|
||||
ocdav.WithTraceProvider(traceProvider),
|
||||
ocdav.RegisterTTL(registry.GetRegisterTTL()),
|
||||
ocdav.RegisterInterval(registry.GetRegisterInterval()),
|
||||
ocdav.URLSigningSharedSecret(cfg.Commons.URLSigningSecret),
|
||||
}
|
||||
|
||||
s, err := ocdav.Service(opts...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// creating a runner for a go-micro service is a bit complex, so we'll
|
||||
// wrap the go-micro service with an ocis service the same way as
|
||||
// ocis-pkg/service/http is doing in order to reuse the factory.
|
||||
gr.Add(runner.NewGoMicroHttpServerRunner(cfg.Service.Name+".http", ohttp.Service{Service: s}))
|
||||
|
||||
debugServer, err := debug.Server(
|
||||
debug.Logger(logger),
|
||||
debug.Context(ctx),
|
||||
debug.Config(cfg),
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
logger.Info().Err(err).Str("server", "debug").Msg("Failed to initialize server")
|
||||
return err
|
||||
}
|
||||
|
||||
gr.Add(runner.NewGolangHttpServerRunner(cfg.Service.Name+".debug", debugServer))
|
||||
|
||||
grResults := gr.Run(ctx)
|
||||
|
||||
// return the first non-nil error found in the results
|
||||
for _, grResult := range grResults {
|
||||
if grResult.RunnerError != nil {
|
||||
return grResult.RunnerError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/opencloud-eu/opencloud/pkg/registry"
|
||||
"github.com/opencloud-eu/opencloud/pkg/version"
|
||||
"github.com/opencloud-eu/opencloud/services/ocdav/pkg/config"
|
||||
|
||||
"github.com/olekukonko/tablewriter"
|
||||
"github.com/olekukonko/tablewriter/tw"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// Version prints the service versions of all running instances.
|
||||
func Version(cfg *config.Config) *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "version",
|
||||
Short: "print the version of this binary and the running service instances",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
fmt.Println("Version: " + version.GetString())
|
||||
fmt.Printf("Compiled: %s\n", version.Compiled())
|
||||
fmt.Println("")
|
||||
|
||||
reg := registry.GetRegistry()
|
||||
services, err := reg.GetService(cfg.HTTP.Namespace + "." + cfg.Service.Name)
|
||||
if err != nil {
|
||||
fmt.Println(fmt.Errorf("could not get %s services from the registry: %v", cfg.Service.Name, err))
|
||||
return err
|
||||
}
|
||||
|
||||
if len(services) == 0 {
|
||||
fmt.Println("No running " + cfg.Service.Name + " service found.")
|
||||
return nil
|
||||
}
|
||||
|
||||
table := tablewriter.NewTable(os.Stdout, tablewriter.WithHeaderAutoFormat(tw.Off))
|
||||
table.Header([]string{"Version", "Address", "Id"})
|
||||
for _, s := range services {
|
||||
for _, n := range s.Nodes {
|
||||
table.Append([]string{s.Version, n.Address, n.Id})
|
||||
}
|
||||
}
|
||||
table.Render()
|
||||
return nil
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/opencloud-eu/opencloud/pkg/shared"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
Commons *shared.Commons `yaml:"-"` // don't use this directly as configuration for a service
|
||||
Service Service `yaml:"-"`
|
||||
Log *Log `yaml:"log"`
|
||||
Debug Debug `yaml:"debug"`
|
||||
|
||||
HTTP HTTPConfig `yaml:"http"`
|
||||
|
||||
TokenManager *TokenManager `yaml:"token_manager"`
|
||||
Reva *shared.Reva `yaml:"reva"`
|
||||
|
||||
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"OCDAV_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the loading of user's group memberships from the reva access token." introductionVersion:"1.0.0"`
|
||||
|
||||
WebdavNamespace string `yaml:"webdav_namespace" env:"OCDAV_WEBDAV_NAMESPACE" desc:"Jail requests to /dav/webdav into this CS3 namespace. Supports template layouting with CS3 User properties." introductionVersion:"1.0.0"`
|
||||
FilesNamespace string `yaml:"files_namespace" env:"OCDAV_FILES_NAMESPACE" desc:"Jail requests to /dav/files/{username} into this CS3 namespace. Supports template layouting with CS3 User properties." introductionVersion:"1.0.0"`
|
||||
SharesNamespace string `yaml:"shares_namespace" env:"OCDAV_SHARES_NAMESPACE" desc:"The human readable path for the share jail. Relative to a users personal space root. Upcased intentionally." introductionVersion:"1.0.0"`
|
||||
OCMNamespace string `yaml:"ocm_namespace" env:"OCDAV_OCM_NAMESPACE" desc:"The human readable path prefix for the ocm shares." introductionVersion:"1.0.0"`
|
||||
// PublicURL used to redirect /s/{token} URLs to
|
||||
PublicURL string `yaml:"public_url" env:"OC_URL;OCDAV_PUBLIC_URL" desc:"URL where OpenCloud is reachable for users." introductionVersion:"1.0.0"`
|
||||
|
||||
// Insecure certificates allowed when making requests to the gateway
|
||||
Insecure bool `yaml:"insecure" env:"OC_INSECURE;OCDAV_INSECURE" desc:"Allow insecure connections to the GATEWAY service." introductionVersion:"1.0.0"`
|
||||
// Timeout in seconds when making requests to the gateway
|
||||
Timeout int64 `yaml:"gateway_request_timeout" env:"OCDAV_GATEWAY_REQUEST_TIMEOUT" desc:"Request timeout in seconds for requests from the oCDAV service to the GATEWAY service." introductionVersion:"1.0.0"`
|
||||
|
||||
MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OC_MACHINE_AUTH_API_KEY;OCDAV_MACHINE_AUTH_API_KEY" desc:"Machine auth API key used to validate internal requests necessary for the access to resources from other services." introductionVersion:"1.0.0"`
|
||||
|
||||
Context context.Context `yaml:"-"`
|
||||
Status Status `yaml:"-"`
|
||||
|
||||
AllowPropfindDepthInfinity bool `yaml:"allow_propfind_depth_infinity" env:"OCDAV_ALLOW_PROPFIND_DEPTH_INFINITY" desc:"Allow the use of depth infinity in PROPFINDS. When enabled, a propfind will traverse through all subfolders. If many subfolders are expected, depth infinity can cause heavy server load and/or delayed response times." introductionVersion:"1.0.0"`
|
||||
}
|
||||
|
||||
type Log struct {
|
||||
Level string `yaml:"level" env:"OC_LOG_LEVEL;OCDAV_LOG_LEVEL" desc:"The log level. Valid values are: 'panic', 'fatal', 'error', 'warn', 'info', 'debug', 'trace'." introductionVersion:"1.0.0"`
|
||||
Pretty bool `yaml:"pretty" env:"OC_LOG_PRETTY;OCDAV_LOG_PRETTY" desc:"Activates pretty log output." introductionVersion:"1.0.0"`
|
||||
Color bool `yaml:"color" env:"OC_LOG_COLOR;OCDAV_LOG_COLOR" desc:"Activates colorized log output." introductionVersion:"1.0.0"`
|
||||
File string `yaml:"file" env:"OC_LOG_FILE;OCDAV_LOG_FILE" desc:"The path to the log file. Activates logging to this file if set." introductionVersion:"1.0.0"`
|
||||
}
|
||||
|
||||
type Service struct {
|
||||
Name string `yaml:"-"`
|
||||
}
|
||||
|
||||
type Debug struct {
|
||||
Addr string `yaml:"addr" env:"OCDAV_DEBUG_ADDR" desc:"Bind address of the debug server, where metrics, health, config and debug endpoints will be exposed." introductionVersion:"1.0.0"`
|
||||
Token string `yaml:"token" env:"OCDAV_DEBUG_TOKEN" desc:"Token to secure the metrics endpoint." introductionVersion:"1.0.0"`
|
||||
Pprof bool `yaml:"pprof" env:"OCDAV_DEBUG_PPROF" desc:"Enables pprof, which can be used for profiling." introductionVersion:"1.0.0"`
|
||||
Zpages bool `yaml:"zpages" env:"OCDAV_DEBUG_ZPAGES" desc:"Enables zpages, which can be used for collecting and viewing in-memory traces." introductionVersion:"1.0.0"`
|
||||
}
|
||||
|
||||
type HTTPConfig struct {
|
||||
Addr string `yaml:"addr" env:"OCDAV_HTTP_ADDR" desc:"The bind address of the HTTP service." introductionVersion:"1.0.0"`
|
||||
Namespace string `yaml:"-"`
|
||||
Protocol string `yaml:"protocol" env:"OCDAV_HTTP_PROTOCOL" desc:"The transport protocol of the HTTP service." introductionVersion:"1.0.0"`
|
||||
Prefix string `yaml:"prefix" env:"OCDAV_HTTP_PREFIX" desc:"A URL path prefix for the handler." introductionVersion:"1.0.0"`
|
||||
CORS `yaml:"cors"`
|
||||
}
|
||||
|
||||
// CORS defines the available cors configuration.
|
||||
type CORS struct {
|
||||
AllowedOrigins []string `yaml:"allow_origins" env:"OC_CORS_ALLOW_ORIGINS;OCDAV_CORS_ALLOW_ORIGINS" desc:"A list of allowed CORS origins. See following chapter for more details: *Access-Control-Allow-Origin* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin. See the Environment Variable Types description for more details." introductionVersion:"1.0.0"`
|
||||
AllowedMethods []string `yaml:"allow_methods" env:"OC_CORS_ALLOW_METHODS;OCDAV_CORS_ALLOW_METHODS" desc:"A list of allowed CORS methods. See following chapter for more details: *Access-Control-Request-Method* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Request-Method. See the Environment Variable Types description for more details." introductionVersion:"1.0.0"`
|
||||
AllowedHeaders []string `yaml:"allow_headers" env:"OC_CORS_ALLOW_HEADERS;OCDAV_CORS_ALLOW_HEADERS" desc:"A list of allowed CORS headers. See following chapter for more details: *Access-Control-Request-Headers* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Request-Headers. See the Environment Variable Types description for more details." introductionVersion:"1.0.0"`
|
||||
AllowCredentials bool `yaml:"allow_credentials" env:"OC_CORS_ALLOW_CREDENTIALS;OCDAV_CORS_ALLOW_CREDENTIALS" desc:"Allow credentials for CORS.See following chapter for more details: *Access-Control-Allow-Credentials* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials." introductionVersion:"1.0.0"`
|
||||
}
|
||||
|
||||
// Status holds the configurable values for the status.php
|
||||
type Status struct {
|
||||
Version string
|
||||
VersionString string
|
||||
Product string
|
||||
ProductName string
|
||||
ProductVersion string
|
||||
Edition string `desc:"Edition of OpenCloud. Used for branding purposes." introductionVersion:"1.0.0"`
|
||||
}
|
||||
@@ -1,141 +0,0 @@
|
||||
package defaults
|
||||
|
||||
import (
|
||||
"github.com/opencloud-eu/opencloud/pkg/shared"
|
||||
"github.com/opencloud-eu/opencloud/pkg/structs"
|
||||
"github.com/opencloud-eu/opencloud/pkg/version"
|
||||
"github.com/opencloud-eu/opencloud/services/ocdav/pkg/config"
|
||||
)
|
||||
|
||||
// FullDefaultConfig returns a fully initialized default configuration
|
||||
func FullDefaultConfig() *config.Config {
|
||||
cfg := DefaultConfig()
|
||||
EnsureDefaults(cfg)
|
||||
Sanitize(cfg)
|
||||
return cfg
|
||||
}
|
||||
|
||||
// DefaultConfig returns a basic default configuration
|
||||
func DefaultConfig() *config.Config {
|
||||
return &config.Config{
|
||||
Debug: config.Debug{
|
||||
Addr: "127.0.0.1:9163",
|
||||
Token: "",
|
||||
Pprof: false,
|
||||
Zpages: false,
|
||||
},
|
||||
HTTP: config.HTTPConfig{
|
||||
Addr: "127.0.0.1:9350",
|
||||
Namespace: "eu.opencloud.web",
|
||||
Protocol: "tcp",
|
||||
Prefix: "",
|
||||
CORS: config.CORS{
|
||||
AllowedOrigins: []string{"https://localhost:9200"},
|
||||
AllowedMethods: []string{
|
||||
"OPTIONS",
|
||||
"HEAD",
|
||||
"GET",
|
||||
"PUT",
|
||||
"POST",
|
||||
"DELETE",
|
||||
"MKCOL",
|
||||
"PROPFIND",
|
||||
"PROPPATCH",
|
||||
"MOVE",
|
||||
"COPY",
|
||||
"REPORT",
|
||||
"SEARCH",
|
||||
},
|
||||
AllowedHeaders: []string{
|
||||
"Origin",
|
||||
"Accept",
|
||||
"Content-Type",
|
||||
"Depth",
|
||||
"Authorization",
|
||||
"Ocs-Apirequest",
|
||||
"If-None-Match",
|
||||
"If-Match",
|
||||
"Destination",
|
||||
"Overwrite",
|
||||
"X-Request-Id",
|
||||
"X-Requested-With",
|
||||
"Tus-Resumable",
|
||||
"Tus-Checksum-Algorithm",
|
||||
"Upload-Concat",
|
||||
"Upload-Length",
|
||||
"Upload-Metadata",
|
||||
"Upload-Defer-Length",
|
||||
"Upload-Expires",
|
||||
"Upload-Checksum",
|
||||
"Upload-Offset",
|
||||
"X-HTTP-Method-Override",
|
||||
"Cache-Control",
|
||||
},
|
||||
AllowCredentials: false,
|
||||
},
|
||||
},
|
||||
Service: config.Service{
|
||||
Name: "ocdav",
|
||||
},
|
||||
Reva: shared.DefaultRevaConfig(),
|
||||
WebdavNamespace: "/users/{{.Id.OpaqueId}}",
|
||||
FilesNamespace: "/users/{{.Id.OpaqueId}}",
|
||||
SharesNamespace: "/Shares",
|
||||
OCMNamespace: "/public",
|
||||
PublicURL: "https://localhost:9200",
|
||||
Insecure: false,
|
||||
Timeout: 84300,
|
||||
MachineAuthAPIKey: "",
|
||||
Status: config.Status{
|
||||
Version: version.Legacy,
|
||||
VersionString: version.LegacyString,
|
||||
ProductVersion: version.GetString(),
|
||||
Product: "OpenCloud",
|
||||
ProductName: "OpenCloud",
|
||||
Edition: version.Edition,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// EnsureDefaults adds default values to the configuration if they are not set yet
|
||||
func EnsureDefaults(cfg *config.Config) {
|
||||
// provide with defaults for shared logging, since we need a valid destination address for "envdecode".
|
||||
if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
|
||||
cfg.Log = &config.Log{
|
||||
Level: cfg.Commons.Log.Level,
|
||||
Pretty: cfg.Commons.Log.Pretty,
|
||||
Color: cfg.Commons.Log.Color,
|
||||
File: cfg.Commons.Log.File,
|
||||
}
|
||||
} else if cfg.Log == nil {
|
||||
cfg.Log = &config.Log{}
|
||||
}
|
||||
|
||||
if cfg.Reva == nil && cfg.Commons != nil {
|
||||
cfg.Reva = structs.CopyOrZeroValue(cfg.Commons.Reva)
|
||||
}
|
||||
|
||||
if cfg.TokenManager == nil && cfg.Commons != nil && cfg.Commons.TokenManager != nil {
|
||||
cfg.TokenManager = &config.TokenManager{
|
||||
JWTSecret: cfg.Commons.TokenManager.JWTSecret,
|
||||
}
|
||||
} else if cfg.TokenManager == nil {
|
||||
cfg.TokenManager = &config.TokenManager{}
|
||||
}
|
||||
|
||||
if cfg.MachineAuthAPIKey == "" && cfg.Commons != nil && cfg.Commons.MachineAuthAPIKey != "" {
|
||||
cfg.MachineAuthAPIKey = cfg.Commons.MachineAuthAPIKey
|
||||
}
|
||||
|
||||
if (cfg.Commons != nil && cfg.Commons.OpenCloudURL != "") &&
|
||||
(cfg.HTTP.CORS.AllowedOrigins == nil ||
|
||||
len(cfg.HTTP.CORS.AllowedOrigins) == 1 &&
|
||||
cfg.HTTP.CORS.AllowedOrigins[0] == "https://localhost:9200") {
|
||||
cfg.HTTP.CORS.AllowedOrigins = []string{cfg.Commons.OpenCloudURL}
|
||||
}
|
||||
}
|
||||
|
||||
// Sanitize sanitizes the configuration
|
||||
func Sanitize(cfg *config.Config) {
|
||||
// nothing to sanitize here atm
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
package parser
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
occfg "github.com/opencloud-eu/opencloud/pkg/config"
|
||||
"github.com/opencloud-eu/opencloud/pkg/shared"
|
||||
"github.com/opencloud-eu/opencloud/services/ocdav/pkg/config"
|
||||
"github.com/opencloud-eu/opencloud/services/ocdav/pkg/config/defaults"
|
||||
|
||||
"github.com/opencloud-eu/opencloud/pkg/config/envdecode"
|
||||
)
|
||||
|
||||
// ParseConfig loads configuration from known paths.
|
||||
func ParseConfig(cfg *config.Config) error {
|
||||
err := occfg.BindSourcesToStructs(cfg.Service.Name, cfg)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defaults.EnsureDefaults(cfg)
|
||||
|
||||
// load all env variables relevant to the config in the current context.
|
||||
if err := envdecode.Decode(cfg); err != nil {
|
||||
// no environment variable set for this config is an expected "error"
|
||||
if !errors.Is(err, envdecode.ErrNoTargetFieldsAreSet) {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
defaults.Sanitize(cfg)
|
||||
|
||||
return Validate(cfg)
|
||||
}
|
||||
|
||||
func Validate(cfg *config.Config) error {
|
||||
if cfg.TokenManager.JWTSecret == "" {
|
||||
return shared.MissingJWTTokenError(cfg.Service.Name)
|
||||
}
|
||||
|
||||
if cfg.MachineAuthAPIKey == "" {
|
||||
return shared.MissingMachineAuthApiKeyError(cfg.Service.Name)
|
||||
}
|
||||
|
||||
if cfg.Commons.URLSigningSecret == "" {
|
||||
return shared.MissingURLSigningSecret(cfg.Service.Name)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
package config
|
||||
|
||||
// TokenManager is the config for using the reva token manager
|
||||
type TokenManager struct {
|
||||
JWTSecret string `yaml:"jwt_secret" env:"OC_JWT_SECRET;OCDAV_JWT_SECRET" desc:"The secret to mint and validate jwt tokens." introductionVersion:"1.0.0"`
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package logging
|
||||
|
||||
import (
|
||||
"github.com/opencloud-eu/opencloud/pkg/log"
|
||||
"github.com/opencloud-eu/opencloud/services/ocdav/pkg/config"
|
||||
)
|
||||
|
||||
// Configure initializes a service-specific logger instance.
|
||||
func Configure(name string, cfg *config.Log) log.Logger {
|
||||
return log.NewLogger(
|
||||
log.Name(name),
|
||||
log.Level(cfg.Level),
|
||||
log.Pretty(cfg.Pretty),
|
||||
log.Color(cfg.Color),
|
||||
log.File(cfg.File),
|
||||
)
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
package debug
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/opencloud-eu/opencloud/pkg/log"
|
||||
"github.com/opencloud-eu/opencloud/services/ocdav/pkg/config"
|
||||
)
|
||||
|
||||
// Option defines a single option function.
|
||||
type Option func(o *Options)
|
||||
|
||||
// Options defines the available options for this package.
|
||||
type Options struct {
|
||||
Logger log.Logger
|
||||
Context context.Context
|
||||
Config *config.Config
|
||||
}
|
||||
|
||||
// newOptions initializes the available default options.
|
||||
func newOptions(opts ...Option) Options {
|
||||
opt := Options{}
|
||||
|
||||
for _, o := range opts {
|
||||
o(&opt)
|
||||
}
|
||||
|
||||
return opt
|
||||
}
|
||||
|
||||
// Logger provides a function to set the logger option.
|
||||
func Logger(val log.Logger) Option {
|
||||
return func(o *Options) {
|
||||
o.Logger = val
|
||||
}
|
||||
}
|
||||
|
||||
// Context provides a function to set the context option.
|
||||
func Context(val context.Context) Option {
|
||||
return func(o *Options) {
|
||||
o.Context = val
|
||||
}
|
||||
}
|
||||
|
||||
// Config provides a function to set the config option.
|
||||
func Config(val *config.Config) Option {
|
||||
return func(o *Options) {
|
||||
o.Config = val
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package debug
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/opencloud-eu/opencloud/pkg/service/debug"
|
||||
"github.com/opencloud-eu/opencloud/pkg/version"
|
||||
)
|
||||
|
||||
// Server initializes the debug service and server.
|
||||
func Server(opts ...Option) (*http.Server, error) {
|
||||
options := newOptions(opts...)
|
||||
|
||||
return debug.NewService(
|
||||
debug.Logger(options.Logger),
|
||||
debug.Name(options.Config.Service.Name),
|
||||
debug.Version(version.GetString()),
|
||||
debug.Address(options.Config.Debug.Addr),
|
||||
debug.Token(options.Config.Debug.Token),
|
||||
debug.Pprof(options.Config.Debug.Pprof),
|
||||
debug.Zpages(options.Config.Debug.Zpages),
|
||||
//debug.CorsAllowedOrigins(options.Config.HTTP.CORS.AllowedOrigins),
|
||||
//debug.CorsAllowedMethods(options.Config.HTTP.CORS.AllowedMethods),
|
||||
//debug.CorsAllowedHeaders(options.Config.HTTP.CORS.AllowedHeaders),
|
||||
//debug.CorsAllowCredentials(options.Config.HTTP.CORS.AllowCredentials),
|
||||
), nil
|
||||
}
|
||||
@@ -28,7 +28,7 @@ policies:
|
||||
- endpoint: /
|
||||
service: eu.opencloud.web.web
|
||||
- endpoint: /dav/
|
||||
service: eu.opencloud.web.ocdav
|
||||
service: eu.opencloud.web.frontend
|
||||
```
|
||||
|
||||
For adding _additional_ routes to the default routes use:
|
||||
|
||||
@@ -223,33 +223,33 @@ func DefaultPolicies() []config.Policy {
|
||||
},
|
||||
{
|
||||
Endpoint: "/remote.php/",
|
||||
Service: "eu.opencloud.web.ocdav",
|
||||
Service: "eu.opencloud.web.frontend",
|
||||
},
|
||||
{
|
||||
Endpoint: "/dav/",
|
||||
Service: "eu.opencloud.web.ocdav",
|
||||
Service: "eu.opencloud.web.frontend",
|
||||
},
|
||||
{
|
||||
Endpoint: "/webdav/",
|
||||
Service: "eu.opencloud.web.ocdav",
|
||||
Service: "eu.opencloud.web.frontend",
|
||||
},
|
||||
{
|
||||
Endpoint: "/status",
|
||||
Service: "eu.opencloud.web.ocdav",
|
||||
Service: "eu.opencloud.web.frontend",
|
||||
Unprotected: true,
|
||||
},
|
||||
{
|
||||
Endpoint: "/status.php",
|
||||
Service: "eu.opencloud.web.ocdav",
|
||||
Service: "eu.opencloud.web.frontend",
|
||||
Unprotected: true,
|
||||
},
|
||||
{
|
||||
Endpoint: "/index.php/",
|
||||
Service: "eu.opencloud.web.ocdav",
|
||||
Service: "eu.opencloud.web.frontend",
|
||||
},
|
||||
{
|
||||
Endpoint: "/apps/",
|
||||
Service: "eu.opencloud.web.ocdav",
|
||||
Service: "eu.opencloud.web.frontend",
|
||||
},
|
||||
{
|
||||
Endpoint: "/data",
|
||||
@@ -262,7 +262,7 @@ func DefaultPolicies() []config.Policy {
|
||||
Unprotected: true,
|
||||
},
|
||||
{
|
||||
Endpoint: "/app/", // /app or /apps? ocdav only handles /apps
|
||||
Endpoint: "/app/", // /app or /apps? frontend only handles /apps
|
||||
Service: "eu.opencloud.web.frontend",
|
||||
},
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
"net/url"
|
||||
"path"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
@@ -271,7 +272,11 @@ func (rt Router) regexRouteMatcher(pattern string, target url.URL) bool {
|
||||
}
|
||||
|
||||
func prefixRouteMatcher(prefix string, target url.URL) bool {
|
||||
return strings.HasPrefix(target.Path, prefix) && prefix != "/"
|
||||
cleanTarget := path.Clean(target.Path)
|
||||
if strings.HasSuffix(target.Path, "/") {
|
||||
cleanTarget += "/"
|
||||
}
|
||||
return strings.HasPrefix(cleanTarget, prefix) && prefix != "/"
|
||||
}
|
||||
|
||||
func singleJoiningSlash(a, b string) string {
|
||||
@@ -288,7 +293,7 @@ func singleJoiningSlash(a, b string) string {
|
||||
|
||||
func queryRouteMatcher(endpoint string, target url.URL) bool {
|
||||
u, _ := url.Parse(endpoint)
|
||||
if !strings.HasPrefix(target.Path, u.Path) || endpoint == "/" {
|
||||
if !strings.HasPrefix(path.Clean(target.Path), u.Path) || endpoint == "/" {
|
||||
return false
|
||||
}
|
||||
q := u.Query()
|
||||
|
||||
@@ -127,7 +127,7 @@ func TestRouter(t *testing.T) {
|
||||
Name: "default",
|
||||
Routes: []config.Route{
|
||||
{Type: config.PrefixRoute, Endpoint: "/web/unprotected/demo/", Backend: "http://web", Unprotected: true},
|
||||
{Type: config.PrefixRoute, Endpoint: "/dav", Backend: "http://ocdav"},
|
||||
{Type: config.PrefixRoute, Endpoint: "/dav", Backend: "http://frontend"},
|
||||
{Type: config.PrefixRoute, Method: "REPORT", Endpoint: "/dav", Backend: "http://opencloud-webdav"},
|
||||
},
|
||||
},
|
||||
@@ -138,7 +138,7 @@ func TestRouter(t *testing.T) {
|
||||
router := New(sel, policySelectorCfg, policies, log.NewLogger())
|
||||
|
||||
table := []matchertest{
|
||||
{method: "PROPFIND", endpoint: "/dav/files/demo/", target: "ocdav"},
|
||||
{method: "PROPFIND", endpoint: "/dav/files/demo/", target: "frontend"},
|
||||
{method: "REPORT", endpoint: "/dav/files/demo/", target: "opencloud-webdav"},
|
||||
{method: "GET", endpoint: "/web/unprotected/demo/", target: "web", unprotected: true},
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2025-12-14 00:02+0000\n"
|
||||
"POT-Creation-Date: 2026-01-03 00:06+0000\n"
|
||||
"PO-Revision-Date: 2025-01-27 10:17+0000\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"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2025-12-16 00:02+0000\n"
|
||||
"POT-Creation-Date: 2026-01-05 00:06+0000\n"
|
||||
"PO-Revision-Date: 2025-01-27 10:17+0000\n"
|
||||
"Last-Translator: LinkinWires <darkinsonic13@gmail.com>, 2025\n"
|
||||
"Language-Team: Ukrainian (https://app.transifex.com/opencloud-eu/teams/204053/uk/)\n"
|
||||
|
||||
@@ -12,7 +12,7 @@ This service is part of the storage services family and is responsible for:
|
||||
|
||||
The storage-publiclink service integrates with:
|
||||
- `sharing` service - Manages and persists public link shares
|
||||
- `frontend` and `ocdav` - Provide HTTP/WebDAV access to public links
|
||||
- `frontend` service - Provides HTTP/WebDAV access to public links
|
||||
- Storage drivers - Accesses the actual file content
|
||||
|
||||
## Storage Registry
|
||||
|
||||
@@ -13,7 +13,7 @@ This service is part of the storage services family and is responsible for:
|
||||
The storage-shares service integrates with:
|
||||
- `sharing` service - Manages and persists shares
|
||||
- `storage-users` service - Accesses the underlying file content
|
||||
- `frontend` and `ocdav` - Provide HTTP/WebDAV access to shares
|
||||
- `frontend` service - Provides HTTP/WebDAV access to shares
|
||||
|
||||
## Virtual Shares Folder
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2025-12-16 00:02+0000\n"
|
||||
"POT-Creation-Date: 2026-01-05 00:06+0000\n"
|
||||
"PO-Revision-Date: 2025-01-27 10:17+0000\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"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Webdav
|
||||
|
||||
The webdav service, like the [ocdav](../ocdav) service, provides a HTTP API following the webdav protocol. It receives HTTP calls from requestors like clients and issues gRPC calls to other services executing these requests. After the called service has finished the request, the webdav service will render their responses in `xml` and sends them back to the requestor.
|
||||
The webdav service, like the [frontend](../frontend) service, provides a HTTP API following the webdav protocol. It receives HTTP calls from requestors like clients and issues gRPC calls to other services executing these requests. After the called service has finished the request, the webdav service will render their responses in `xml` and sends them back to the requestor.
|
||||
|
||||
## Endpoints Overview
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
|
||||
#### [Readiness check for some services returns 500 status code](https://github.com/owncloud/ocis/issues/10661)
|
||||
|
||||
- [apiServiceAvailability/serviceAvailabilityCheck.feature:125](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiServiceAvailability/serviceAvailabilityCheck.feature#L125)
|
||||
- [apiServiceAvailability/serviceAvailabilityCheck.feature:123](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiServiceAvailability/serviceAvailabilityCheck.feature#L123)
|
||||
|
||||
#### [Skip tests for different languages](https://github.com/opencloud-eu/opencloud/issues/183)
|
||||
- [apiActivities/activities.feature:2598](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiActivities/activities.feature#L2598)
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
|
||||
#### [Readiness check for some services returns 500 status code](https://github.com/owncloud/ocis/issues/10661)
|
||||
|
||||
- [apiServiceAvailability/serviceAvailabilityCheck.feature:125](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiServiceAvailability/serviceAvailabilityCheck.feature#L125)
|
||||
- [apiServiceAvailability/serviceAvailabilityCheck.feature:123](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiServiceAvailability/serviceAvailabilityCheck.feature#L123)
|
||||
|
||||
#### [Skip tests for different languages](https://github.com/opencloud-eu/opencloud/issues/183)
|
||||
- [apiActivities/activities.feature:2598](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiActivities/activities.feature#L2598)
|
||||
|
||||
@@ -19,7 +19,7 @@ Feature: download multiple resources bundled into an archive
|
||||
Then the HTTP status code should be "200"
|
||||
And the downloaded <archive-type> archive should contain these files:
|
||||
| name | content |
|
||||
| textfile0.txt | some dat |
|
||||
| textfile0.txt | some data |
|
||||
Examples:
|
||||
| user-agent | archive-type |
|
||||
| Linux | tar |
|
||||
|
||||
@@ -19,7 +19,6 @@ Feature: service health check
|
||||
| http://%base_url_hostname%:9239/healthz | idm |
|
||||
| http://%base_url_hostname%:9134/healthz | idp |
|
||||
| http://%base_url_hostname%:9234/healthz | nats |
|
||||
| http://%base_url_hostname%:9163/healthz | ocdav |
|
||||
| http://%base_url_hostname%:9281/healthz | ocm |
|
||||
| http://%base_url_hostname%:9114/healthz | ocs |
|
||||
| http://%base_url_hostname%:9255/healthz | postprocessing |
|
||||
@@ -74,7 +73,6 @@ Feature: service health check
|
||||
| http://%base_url_hostname%:9161/readyz | groups |
|
||||
| http://%base_url_hostname%:9239/readyz | idm |
|
||||
| http://%base_url_hostname%:9234/readyz | nats |
|
||||
| http://%base_url_hostname%:9163/readyz | ocdav |
|
||||
| http://%base_url_hostname%:9281/readyz | ocm |
|
||||
| http://%base_url_hostname%:9114/readyz | ocs |
|
||||
| http://%base_url_hostname%:9255/readyz | postprocessing |
|
||||
|
||||
@@ -20,7 +20,7 @@ Feature: make webdav request with special urls
|
||||
| /dav//files/%username%/PARENT/parent.txt |
|
||||
| /webdav//PARENT |
|
||||
| //dav/files/%username%//FOLDER |
|
||||
Then the HTTP status code of responses on each endpoint should be "200,200,204,204,200" on OpenCloud or "204,204,204,204,204" on reva
|
||||
Then the HTTP status code of responses on all endpoints should be "204"
|
||||
|
||||
|
||||
Scenario: send DELETE requests to webDav endpoints with 2 slashes using the spaces WebDAV API
|
||||
@@ -30,7 +30,7 @@ Feature: make webdav request with special urls
|
||||
| //dav//spaces/%spaceid%/PARENT/parent.txt |
|
||||
| /dav//spaces/%spaceid%/PARENT |
|
||||
| //dav/spaces/%spaceid%//FOLDER |
|
||||
Then the HTTP status code of responses on each endpoint should be "200,200,204,200" on OpenCloud or "204,204,204,204" on reva
|
||||
Then the HTTP status code of responses on all endpoints should be "204"
|
||||
|
||||
|
||||
Scenario: send GET requests to webDav endpoints with 2 slashes
|
||||
@@ -84,7 +84,7 @@ Feature: make webdav request with special urls
|
||||
| //dav//files/%username%/PARENT4 |
|
||||
| /dav/files/%username%//PARENT5 |
|
||||
| /dav//files/%username%/PARENT6 |
|
||||
Then the HTTP status code of responses on each endpoint should be "200,201,200,200,201,201" on OpenCloud or "201,201,201,201,201,201" on reva
|
||||
Then the HTTP status code of responses on all endpoints should be "201"
|
||||
|
||||
|
||||
Scenario: send MKCOL requests to webDav endpoints with 2 slashes using the spaces WebDAV API
|
||||
@@ -96,7 +96,7 @@ Feature: make webdav request with special urls
|
||||
| //dav/spaces//%spaceid%/PARENT4 |
|
||||
| /dav/spaces/%spaceid%//PARENT5 |
|
||||
| /dav//spaces/%spaceid%/PARENT6 |
|
||||
Then the HTTP status code of responses on each endpoint should be "200,201,200,200,201,201" on OpenCloud or "201,201,201,201,201,201" on reva
|
||||
Then the HTTP status code of responses on all endpoints should be "201"
|
||||
|
||||
|
||||
Scenario: send MOVE requests to webDav endpoints with 2 slashes
|
||||
@@ -107,7 +107,7 @@ Feature: make webdav request with special urls
|
||||
| /webdav//PARENT | /webdav/PARENT1 |
|
||||
| //dav/files//%username%//PARENT1 | /dav/files/%username%/PARENT2 |
|
||||
| /dav//files/%username%/PARENT2/parent.txt | /dav/files/%username%/PARENT2/parent1.txt |
|
||||
Then the HTTP status code of responses on each endpoint should be "200,201,201,200,404" on OpenCloud or "201,201,201,201,201" on reva
|
||||
Then the HTTP status code of responses on all endpoints should be "201"
|
||||
|
||||
|
||||
Scenario: send MOVE requests to webDav endpoints with 2 slashes using the spaces WebDAV API
|
||||
@@ -117,7 +117,7 @@ Feature: make webdav request with special urls
|
||||
| /dav/spaces/%spaceid%//PARENT | /dav/spaces/%spaceid%/PARENT1 |
|
||||
| //dav/spaces/%spaceid%//PARENT1 | /dav/spaces/%spaceid%/PARENT2 |
|
||||
| //dav/spaces/%spaceid%/PARENT2/parent.txt | /dav/spaces/%spaceid%/PARENT2/parent1.txt |
|
||||
Then the HTTP status code of responses on each endpoint should be "201,201,200,200" on OpenCloud or "201,201,201,201" on reva
|
||||
Then the HTTP status code of responses on all endpoints should be "201"
|
||||
|
||||
|
||||
Scenario: send POST requests to webDav endpoints with 2 slashes
|
||||
@@ -128,7 +128,7 @@ Feature: make webdav request with special urls
|
||||
| /dav//files/%username%/PARENT/parent.txt |
|
||||
| /webdav//PARENT |
|
||||
| //dav/files//%username%//FOLDER |
|
||||
Then the HTTP status code of responses on each endpoint should be "200,200,412,412,200" respectively
|
||||
Then the HTTP status code of responses on all endpoints should be "412"
|
||||
|
||||
|
||||
Scenario: send POST requests to webDav endpoints with 2 slashes using the spaces WebDAV API
|
||||
@@ -138,7 +138,7 @@ Feature: make webdav request with special urls
|
||||
| /dav//spaces/%spaceid%/PARENT/parent.txt |
|
||||
| /dav//spaces/%spaceid%/PARENT |
|
||||
| //dav//spaces/%spaceid%//FOLDER |
|
||||
Then the HTTP status code of responses on each endpoint should be "200,412,412,200" respectively
|
||||
Then the HTTP status code of responses on all endpoints should be "412"
|
||||
|
||||
|
||||
Scenario: send PROPFIND requests to webDav endpoints with 2 slashes
|
||||
@@ -149,7 +149,7 @@ Feature: make webdav request with special urls
|
||||
| /dav//files/%username%/PARENT/parent.txt |
|
||||
| /webdav//PARENT |
|
||||
| //dav/files//%username%//FOLDER |
|
||||
Then the HTTP status code of responses on each endpoint should be "200,200,207,207,200" on OpenCloud or "207,207,207,207,207" on reva
|
||||
Then the HTTP status code of responses on all endpoints should be "207"
|
||||
|
||||
|
||||
Scenario: send PROPFIND requests to webDav endpoints with 2 slashes using the spaces WebDAV API
|
||||
@@ -159,7 +159,7 @@ Feature: make webdav request with special urls
|
||||
| /dav//spaces/%spaceid%/PARENT/parent.txt |
|
||||
| /dav//spaces/%spaceid%/PARENT |
|
||||
| //dav/spaces//%spaceid%//FOLDER |
|
||||
Then the HTTP status code of responses on each endpoint should be "200,207,207,200" on OpenCloud or "207,207,207,207" on reva
|
||||
Then the HTTP status code of responses on all endpoints should be "207"
|
||||
|
||||
|
||||
Scenario: send PROPPATCH requests to webDav endpoints with 2 slashes
|
||||
@@ -170,7 +170,7 @@ Feature: make webdav request with special urls
|
||||
| /dav//files/%username%/PARENT/parent.txt |
|
||||
| /webdav//PARENT |
|
||||
| //dav//files/%username%//FOLDER |
|
||||
Then the HTTP status code of responses on each endpoint should be "200,200,400,400,200" respectively
|
||||
Then the HTTP status code of responses on all endpoints should be "400"
|
||||
|
||||
|
||||
Scenario: send PROPPATCH requests to webDav endpoints with 2 slashes using the spaces WebDAV API
|
||||
@@ -180,7 +180,7 @@ Feature: make webdav request with special urls
|
||||
| /dav//spaces/%spaceid%/PARENT/parent.txt |
|
||||
| /dav//spaces/%spaceid%/PARENT |
|
||||
| //dav/spaces//%spaceid%//FOLDER |
|
||||
Then the HTTP status code of responses on each endpoint should be "200,400,400,200" respectively
|
||||
Then the HTTP status code of responses on all endpoints should be "400"
|
||||
|
||||
|
||||
Scenario: send PUT requests to webDav endpoints with 2 slashes
|
||||
@@ -191,7 +191,7 @@ Feature: make webdav request with special urls
|
||||
| //dav//files/%username%/textfile1.txt |
|
||||
| /dav/files//%username%/textfile7.txt |
|
||||
| //dav//files/%username%/PARENT//parent.txt |
|
||||
Then the HTTP status code of responses on each endpoint should be "200,204,200,201,200" on OpenCloud or "204,204,204,201,204" on reva
|
||||
Then the HTTP status code of responses on each endpoint should be "204,204,204,201,204" respectively
|
||||
|
||||
|
||||
Scenario: send PUT requests to webDav endpoints with 2 slashes using the spaces WebDAV API
|
||||
@@ -202,4 +202,4 @@ Feature: make webdav request with special urls
|
||||
| //dav//spaces/%spaceid%/textfile1.txt |
|
||||
| /dav/spaces//%spaceid%/textfile7.txt |
|
||||
| //dav/spaces//%spaceid%/PARENT//parent.txt |
|
||||
Then the HTTP status code of responses on each endpoint should be "200,204,200,201,200" on OpenCloud or "204,204,204,201,204" on reva
|
||||
Then the HTTP status code of responses on each endpoint should be "204,204,204,201,204" respectively
|
||||
|
||||
@@ -45,8 +45,6 @@ export IDP_DEBUG_ADDR=127.0.0.1:10134
|
||||
export IDP_HTTP_ADDR=127.0.0.1:10130
|
||||
export NATS_DEBUG_ADDR=127.0.0.1:10234
|
||||
export NATS_NATS_PORT=10233
|
||||
export OCDAV_HTTP_ADDR=127.0.0.1:10350
|
||||
export OCDAV_DEBUG_ADDR=127.0.0.1:10163
|
||||
export OCM_DEBUG_ADDR=127.0.0.1:10281
|
||||
export OCM_HTTP_ADDR=127.0.0.1:10280
|
||||
export OCM_GRPC_ADDR=127.0.0.1:10282
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
const fs = require("fs");
|
||||
|
||||
// const INFO_URL="https://s3.ci.opencloud.eu/public/$CI_REPO_NAME/pipelines/$CI_COMMIT_SHA/pipeline_info.json"
|
||||
const CI_REPO_NAME = process.env.CI_REPO_NAME;
|
||||
const CI_COMMIT_SHA = process.env.CI_COMMIT_SHA;
|
||||
const CI_WORKFLOW_NAME = process.env.CI_WORKFLOW_NAME;
|
||||
|
||||
const opencloudBuildWorkflow = "build-opencloud-for-testing";
|
||||
const webCacheWorkflows = ["cache-web", "cache-web-pnpm", "cache-browsers"];
|
||||
|
||||
const INFO_URL = `https://s3.ci.opencloud.eu/public/${CI_REPO_NAME}/pipelines/${CI_COMMIT_SHA}/pipeline_info.json`;
|
||||
|
||||
// const INFO_URL =
|
||||
// "https://s3.ci.opencloud.eu/public/opencloud/pipelines/fcbcb3d9cc73fcd1cab49774632a92b531718a76/pipeline_info.json";
|
||||
|
||||
function getFailedWorkflows(workflows) {
|
||||
const failedWorkflows = [];
|
||||
for (const workflow of workflows) {
|
||||
if (workflow.state !== "success") {
|
||||
failedWorkflows.push(workflow.name);
|
||||
}
|
||||
}
|
||||
return failedWorkflows;
|
||||
}
|
||||
|
||||
function hasFailingTestWorkflow(failedWorkflows) {
|
||||
for (const workflowName of failedWorkflows) {
|
||||
if (workflowName.startsWith("test-")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function hasFailingE2eTestWorkflow(failedWorkflows) {
|
||||
for (const workflowName of failedWorkflows) {
|
||||
if (workflowName.startsWith("test-e2e-")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const infoResponse = await fetch(INFO_URL);
|
||||
if (infoResponse.status === 404) {
|
||||
console.log("[INFO] No matching previous pipeline found. Continue...");
|
||||
process.exit(0);
|
||||
} else if (!infoResponse.ok) {
|
||||
console.error(
|
||||
"[ERROR] Failed to fetch previous pipeline info:" +
|
||||
`\n URL: ${INFO_URL}\n Status: ${infoResponse.status}`
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
const info = await infoResponse.json();
|
||||
console.log(info);
|
||||
|
||||
if (info.status === "success") {
|
||||
console.log(
|
||||
"[INFO] All workflows passed in previous pipeline. Full restart. Continue..."
|
||||
);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
const failedWorkflows = getFailedWorkflows(info.workflows);
|
||||
|
||||
// NOTE: implement for test pipelines only for now
|
||||
// // run the build workflow if any test workflow has failed
|
||||
// if (
|
||||
// CI_WORKFLOW_NAME === opencloudBuildWorkflow &&
|
||||
// hasFailingTestWorkflow(failedWorkflows)
|
||||
// ) {
|
||||
// process.exit(0);
|
||||
// }
|
||||
|
||||
// // run the web cache workflows if any e2e test workflow has failed
|
||||
// if (
|
||||
// webCacheWorkflows.includes(CI_WORKFLOW_NAME) &&
|
||||
// hasFailingE2eTestWorkflow(failedWorkflows)
|
||||
// ) {
|
||||
// process.exit(0);
|
||||
// }
|
||||
|
||||
if (!failedWorkflows.includes(CI_WORKFLOW_NAME)) {
|
||||
console.log("[INFO] Workflow passed in previous pipeline. Skip...");
|
||||
fs.appendFileSync(".woodpecker.env", "SKIP_WORKFLOW=true\n");
|
||||
process.exit(0);
|
||||
}
|
||||
console.log("[INFO] Restarting previously failed workflow. Continue...");
|
||||
}
|
||||
|
||||
main();
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
# CI_COMMIT_SHA=fcbcb3d9cc73fcd1cab49774632a92b531718a76
|
||||
mc alias set s3 $MC_HOST $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY
|
||||
|
||||
# check previous pipeline
|
||||
URL="https://s3.ci.opencloud.eu/$PUBLIC_BUCKET/$CI_REPO_NAME/pipelines/$CI_COMMIT_SHA/prev_pipeline"
|
||||
status=$(curl -s -o prev_pipeline "$URL" -w '%{http_code}')
|
||||
|
||||
if [ "$status" == "200" ];
|
||||
then
|
||||
source prev_pipeline
|
||||
REPO_ID=$(printf '%s' "$CI_PIPELINE_URL" | sed 's|.*/repos/\([0-9]*\)/.*|\1|')
|
||||
p_status=$(curl -s -o pipeline_info.json "$CI_SYSTEM_URL/api/repos/$REPO_ID/pipelines/$PREV_PIPELINE_NUMBER" -w "%{http_code}")
|
||||
if [ "$p_status" != "200" ];
|
||||
then
|
||||
echo -e "[ERROR] Failed to fetch previous pipeline info.\n URL: $CI_SYSTEM_URL/api/repos/$REPO_ID/pipelines/$PREV_PIPELINE_NUMBER\n Status: $p_status"
|
||||
exit 1
|
||||
fi
|
||||
# update previous pipeline info
|
||||
mc cp -a pipeline_info.json "s3/$PUBLIC_BUCKET/$CI_REPO_NAME/pipelines/$CI_COMMIT_SHA/"
|
||||
fi
|
||||
|
||||
# upload current pipeline number for the next pipeline
|
||||
echo "PREV_PIPELINE_NUMBER=$CI_PIPELINE_NUMBER" > prev_pipeline
|
||||
mc cp -a prev_pipeline "s3/$PUBLIC_BUCKET/$CI_REPO_NAME/pipelines/$CI_COMMIT_SHA/"
|
||||
214
vendor/github.com/opensearch-project/opensearch-go/v4/.golangci.yml
generated
vendored
214
vendor/github.com/opensearch-project/opensearch-go/v4/.golangci.yml
generated
vendored
@@ -1,59 +1,8 @@
|
||||
version: "2"
|
||||
run:
|
||||
timeout: 10m
|
||||
modules-download-mode: readonly
|
||||
|
||||
linters-settings:
|
||||
errcheck:
|
||||
check-blank: true
|
||||
check-type-assertions: false
|
||||
errorlint:
|
||||
check-generated: false
|
||||
default-signifies-exhaustive: false
|
||||
exhaustive:
|
||||
default-signifies-exhaustive: false
|
||||
gci:
|
||||
sections:
|
||||
- standard
|
||||
- default
|
||||
- prefix(github.com/opensearch-project/opensearch-go)
|
||||
goconst:
|
||||
min-len: 3
|
||||
min-occurrences: 3
|
||||
godox:
|
||||
keywords:
|
||||
- BUG
|
||||
- FIXME
|
||||
- HACK
|
||||
goimports:
|
||||
local-prefixes: github.com/opensearch-project/opensearch-go
|
||||
lll:
|
||||
line-length: 140
|
||||
nolintlint:
|
||||
allow-leading-space: false
|
||||
require-explanation: true
|
||||
require-specific: true
|
||||
unparam:
|
||||
check-exported: true
|
||||
misspell:
|
||||
locale: US
|
||||
ignore-words:
|
||||
- expect
|
||||
- cancelled
|
||||
prealloc:
|
||||
simple: true
|
||||
range-loops: true
|
||||
for-loops: false
|
||||
revive:
|
||||
rules:
|
||||
- name: exported
|
||||
severity: error
|
||||
disabled: false
|
||||
arguments:
|
||||
- "checkPrivateReceivers"
|
||||
- "sayRepetitiveInsteadOfStutters"
|
||||
|
||||
linters:
|
||||
disable-all: true
|
||||
default: none
|
||||
enable:
|
||||
- asasalint
|
||||
- asciicheck
|
||||
@@ -70,10 +19,7 @@ linters:
|
||||
- errchkjson
|
||||
- errname
|
||||
- errorlint
|
||||
- execinquery
|
||||
- exhaustive
|
||||
- exportloopref
|
||||
- gci
|
||||
- ginkgolinter
|
||||
- gocheckcompilerdirectives
|
||||
- gochecknoglobals
|
||||
@@ -81,15 +27,11 @@ linters:
|
||||
- goconst
|
||||
- gocritic
|
||||
- godox
|
||||
- gofmt
|
||||
- gofumpt
|
||||
- goheader
|
||||
- goimports
|
||||
- gomoddirectives
|
||||
- gomodguard
|
||||
- goprintffuncname
|
||||
- gosec
|
||||
- gosimple
|
||||
- govet
|
||||
- grouper
|
||||
- importas
|
||||
@@ -117,12 +59,10 @@ linters:
|
||||
- rowserrcheck
|
||||
- sqlclosecheck
|
||||
- staticcheck
|
||||
- stylecheck
|
||||
- tagalign
|
||||
- testpackage
|
||||
- thelper
|
||||
- tparallel
|
||||
- typecheck
|
||||
- unconvert
|
||||
- unparam
|
||||
- unused
|
||||
@@ -130,46 +70,110 @@ linters:
|
||||
- wastedassign
|
||||
- whitespace
|
||||
- zerologlint
|
||||
|
||||
issues:
|
||||
include:
|
||||
- EXC0012
|
||||
- EXC0014
|
||||
exclude-rules:
|
||||
- path: (_test\.go|internal/)
|
||||
linters:
|
||||
- cyclop
|
||||
- dupl
|
||||
- errcheck
|
||||
- gochecknoglobals
|
||||
- gochecknoinits
|
||||
- goconst
|
||||
- noctx
|
||||
- linters:
|
||||
- gosec
|
||||
text: "math/rand"
|
||||
path: _test\.go
|
||||
- linters:
|
||||
- gosec
|
||||
text: "TLS InsecureSkipVerify set true"
|
||||
path: (_test\.go|internal/)
|
||||
- linters:
|
||||
- gosec
|
||||
text: "G108: Profiling endpoint is automatically exposed on /debug/pprof"
|
||||
path: _test\.go
|
||||
- linters:
|
||||
- goconst
|
||||
path: opensearchapi\/api_
|
||||
- linters:
|
||||
- errcheck
|
||||
text: "Error return value of `debugLogger.Logf` is not checked"
|
||||
- linters:
|
||||
- errcheck
|
||||
- gochecknoglobals
|
||||
path: opensearchtransport\/logger\.go
|
||||
- linters:
|
||||
- nestif
|
||||
path: opensearchtransport/opensearchtransport.go
|
||||
- linters:
|
||||
- dupl
|
||||
path: (-params\.go|api_indices|api_dangling\.go|api_point_in_time\.go|rethrottle\.go|api_cat-.*\.go|plugins/security/api_\w+.go|plugins/security/api_.*-patch.go)
|
||||
settings:
|
||||
errcheck:
|
||||
check-type-assertions: false
|
||||
check-blank: true
|
||||
exhaustive:
|
||||
default-signifies-exhaustive: false
|
||||
goconst:
|
||||
min-len: 3
|
||||
min-occurrences: 3
|
||||
godox:
|
||||
keywords:
|
||||
- BUG
|
||||
- FIXME
|
||||
- HACK
|
||||
lll:
|
||||
line-length: 140
|
||||
misspell:
|
||||
locale: US
|
||||
ignore-rules:
|
||||
- expect
|
||||
- cancelled
|
||||
nolintlint:
|
||||
require-explanation: true
|
||||
require-specific: true
|
||||
prealloc:
|
||||
simple: true
|
||||
range-loops: true
|
||||
for-loops: false
|
||||
revive:
|
||||
rules:
|
||||
- name: exported
|
||||
arguments:
|
||||
- checkPrivateReceivers
|
||||
- sayRepetitiveInsteadOfStutters
|
||||
severity: error
|
||||
disabled: false
|
||||
unparam:
|
||||
check-exported: true
|
||||
exclusions:
|
||||
generated: lax
|
||||
presets:
|
||||
- common-false-positives
|
||||
- legacy
|
||||
- std-error-handling
|
||||
rules:
|
||||
- linters:
|
||||
- cyclop
|
||||
- dupl
|
||||
- errcheck
|
||||
- gochecknoglobals
|
||||
- gochecknoinits
|
||||
- goconst
|
||||
- noctx
|
||||
path: (_test\.go|internal/)
|
||||
- linters:
|
||||
- gosec
|
||||
path: _test\.go
|
||||
text: math/rand
|
||||
- linters:
|
||||
- gosec
|
||||
path: (_test\.go|internal/)
|
||||
text: TLS InsecureSkipVerify set true
|
||||
- linters:
|
||||
- gosec
|
||||
path: _test\.go
|
||||
text: 'G108: Profiling endpoint is automatically exposed on /debug/pprof'
|
||||
- linters:
|
||||
- goconst
|
||||
path: -params\.go
|
||||
- linters:
|
||||
- errcheck
|
||||
text: Error return value of `debugLogger.Logf` is not checked
|
||||
- linters:
|
||||
- errcheck
|
||||
- gochecknoglobals
|
||||
path: opensearchtransport\/logger\.go
|
||||
- linters:
|
||||
- nestif
|
||||
path: opensearchtransport/opensearchtransport.go
|
||||
- linters:
|
||||
- dupl
|
||||
path: (-params\.go|api_indices|api_dangling\.go|api_point_in_time\.go|rethrottle\.go|api_cat-.*\.go|plugins/security/api_\w+.go|plugins/security/api_.*-patch.go)
|
||||
paths:
|
||||
- third_party$
|
||||
- builtin$
|
||||
- examples$
|
||||
formatters:
|
||||
enable:
|
||||
- gci
|
||||
- gofmt
|
||||
- gofumpt
|
||||
- goimports
|
||||
settings:
|
||||
gci:
|
||||
sections:
|
||||
- standard
|
||||
- default
|
||||
- prefix(github.com/opensearch-project/opensearch-go)
|
||||
goimports:
|
||||
local-prefixes:
|
||||
- github.com/opensearch-project/opensearch-go
|
||||
exclusions:
|
||||
generated: lax
|
||||
paths:
|
||||
- third_party$
|
||||
- builtin$
|
||||
- examples$
|
||||
|
||||
38
vendor/github.com/opensearch-project/opensearch-go/v4/CHANGELOG.md
generated
vendored
38
vendor/github.com/opensearch-project/opensearch-go/v4/CHANGELOG.md
generated
vendored
@@ -2,6 +2,41 @@
|
||||
|
||||
Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
|
||||
## [4.6.0]
|
||||
|
||||
### Dependencies
|
||||
- Bump `github.com/aws/aws-sdk-go-v2/config` from 1.29.14 to 1.32.5 ([#707](https://github.com/opensearch-project/opensearch-go/pull/707), [#711](https://github.com/opensearch-project/opensearch-go/pull/711), [#719](https://github.com/opensearch-project/opensearch-go/pull/719), [#730](https://github.com/opensearch-project/opensearch-go/pull/730), [#737](https://github.com/opensearch-project/opensearch-go/pull/737), [#761](https://github.com/opensearch-project/opensearch-go/pull/761))
|
||||
- Bump `github.com/aws/aws-sdk-go-v2` from 1.36.4 to 1.41.0 ([#710](https://github.com/opensearch-project/opensearch-go/pull/710), [#720](https://github.com/opensearch-project/opensearch-go/pull/720), [#759](https://github.com/opensearch-project/opensearch-go/pull/759))
|
||||
- Bump `github.com/stretchr/testify` from 1.10.0 to 1.11.1 ([#728](https://github.com/opensearch-project/opensearch-go/pull/728))
|
||||
- Bump `github.com/aws/aws-sdk-go` from 1.55.7 to 1.55.8 ([#716](https://github.com/opensearch-project/opensearch-go/pull/716))
|
||||
|
||||
### Added
|
||||
- Adds new fields for Opensearch 3.0 ([#702](https://github.com/opensearch-project/opensearch-go/pull/702))
|
||||
- Allow users to override signing port ([#721](https://github.com/opensearch-project/opensearch-go/pull/721))
|
||||
- Add `phase_took` features supported from OpenSearch 2.12 ([#722](https://github.com/opensearch-project/opensearch-go/pull/722))
|
||||
- Adds the action to refresh the search analyzers to the ISM plugin ([#686](https://github.com/opensearch-project/opensearch-go/pull/686))
|
||||
|
||||
### Changed
|
||||
- Test against Opensearch 3.0 ([#702](https://github.com/opensearch-project/opensearch-go/pull/702))
|
||||
- Add more SuggestOptions to SearchResp ([#713](https://github.com/opensearch-project/opensearch-go/pull/713))
|
||||
- Updates Go version to 1.24 ([#674](https://github.com/opensearch-project/opensearch-go/pull/674))
|
||||
- Replace `golang.org/x/exp/slices` usage with built-in `slices` ([#674](https://github.com/opensearch-project/opensearch-go/pull/674))
|
||||
- Update golangci-linter to 1.64.8 ([#740](https://github.com/opensearch-project/opensearch-go/pull/740))
|
||||
- Change MaxScore to pointer ([#740](https://github.com/opensearch-project/opensearch-go/pull/740))
|
||||
- Update workflow action ([#760](https://github.com/opensearch-project/opensearch-go/pull/760))
|
||||
- Migrate to golangci-lint v2 ([#760](https://github.com/opensearch-project/opensearch-go/pull/760))
|
||||
|
||||
### Deprecated
|
||||
|
||||
### Removed
|
||||
|
||||
### Fixed
|
||||
- Missing "caused by" information in StructError ([#752](https://github.com/opensearch-project/opensearch-go/pull/752))
|
||||
- Add missing `ignore_unavailable`, `allow_no_indices`, and `expand_wildcards` params to MSearch ([#757](https://github.com/opensearch-project/opensearch-go/pull/757))
|
||||
- Fix `UpdateResp` to correctly parse the `get` field when `_source` is requested in update operations. ([#739](https://github.com/opensearch-project/opensearch-go/pull/739))
|
||||
|
||||
### Security
|
||||
|
||||
## [4.5.0]
|
||||
|
||||
### Dependencies
|
||||
@@ -290,7 +325,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
- Uses `[]string` instead of `string` in `SnapshotDeleteRequest` ([#237](https://github.com/opensearch-project/opensearch-go/pull/237))
|
||||
- Updates workflows to reduce CI time, consolidate OpenSearch versions, update compatibility matrix ([#242](https://github.com/opensearch-project/opensearch-go/pull/242))
|
||||
- Moves @svencowart to emeritus maintainers ([#270](https://github.com/opensearch-project/opensearch-go/pull/270))
|
||||
- Reads, closes and replaces the http Reponse Body ([#300](https://github.com/opensearch-project/opensearch-go/pull/300))
|
||||
- Reads, closes and replaces the http Response Body ([#300](https://github.com/opensearch-project/opensearch-go/pull/300))
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -329,6 +364,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
- Bumps `github.com/stretchr/testify` from 1.8.0 to 1.8.1
|
||||
- Bumps `github.com/aws/aws-sdk-go` from 1.44.45 to 1.44.132
|
||||
|
||||
[4.6.0]: https://github.com/opensearch-project/opensearch-go/compare/v4.5.0...v4.6.0
|
||||
[4.5.0]: https://github.com/opensearch-project/opensearch-go/compare/v4.4.0...v4.5.0
|
||||
[4.4.0]: https://github.com/opensearch-project/opensearch-go/compare/v4.3.0...v4.4.0
|
||||
[4.3.0]: https://github.com/opensearch-project/opensearch-go/compare/v4.2.0...v4.3.0
|
||||
|
||||
2
vendor/github.com/opensearch-project/opensearch-go/v4/COMPATIBILITY.md
generated
vendored
2
vendor/github.com/opensearch-project/opensearch-go/v4/COMPATIBILITY.md
generated
vendored
@@ -9,6 +9,8 @@ The below matrix shows the compatibility of the [`opensearch-go`](https://pkg.go
|
||||
| -------------- | ------------------ |
|
||||
| 1.x.0 | 1.x |
|
||||
| 2.x.0 | 1.3.13-2.11.0 |
|
||||
| 3.x.0 | 1.3.13-2.12.0 |
|
||||
| 4.x.0 | 1.3.20-3.0.0 |
|
||||
|
||||
## Upgrading
|
||||
|
||||
|
||||
6
vendor/github.com/opensearch-project/opensearch-go/v4/DEVELOPER_GUIDE.md
generated
vendored
6
vendor/github.com/opensearch-project/opensearch-go/v4/DEVELOPER_GUIDE.md
generated
vendored
@@ -2,7 +2,7 @@
|
||||
- [Getting Started](#getting-started)
|
||||
- [Git Clone OpenSearch Go Client Repository](#git-clone-opensearch-go-client-repository)
|
||||
- [Install Prerequisites](#install-prerequisites)
|
||||
- [Go 1.21](#go-121)
|
||||
- [Go 1.24](#go-124)
|
||||
- [Docker](#docker)
|
||||
- [Windows](#windows)
|
||||
- [Unit Testing](#unit-testing)
|
||||
@@ -29,9 +29,9 @@ Fork [opensearch-project/opensearch-go](https://github.com/opensearch-project/op
|
||||
|
||||
### Install Prerequisites
|
||||
|
||||
#### Go 1.21
|
||||
#### Go 1.24
|
||||
|
||||
OpenSearch Go Client builds using [Go](https://go.dev/doc/install) 1.21 at a minimum.
|
||||
OpenSearch Go Client builds using [Go](https://go.dev/doc/install) 1.24 at a minimum.
|
||||
|
||||
#### Docker
|
||||
|
||||
|
||||
2
vendor/github.com/opensearch-project/opensearch-go/v4/MAINTAINERS.md
generated
vendored
2
vendor/github.com/opensearch-project/opensearch-go/v4/MAINTAINERS.md
generated
vendored
@@ -6,7 +6,6 @@ This document contains a list of maintainers in this repo. See [opensearch-proje
|
||||
|
||||
| Maintainer | GitHub ID | Affiliation |
|
||||
| ----------------------- | ----------------------------------------- | ------------------- |
|
||||
| Daniel Doubrovkine | [dblock](https://github.com/dblock) | Independent |
|
||||
| Jakob Hahn | [Jakob3xD](https://github.com/Jakob3xD) | Hetzner Online GmbH |
|
||||
| Vacha Shah | [VachaShah](https://github.com/VachaShah) | Amazon |
|
||||
| Vijayan Balasubramanian | [VijayanB](https://github.com/VijayanB) | Amazon |
|
||||
@@ -15,6 +14,7 @@ This document contains a list of maintainers in this repo. See [opensearch-proje
|
||||
|
||||
| Maintainer | GitHub ID | Affiliation |
|
||||
| ---------------------- | ------------------------------------------- | ----------- |
|
||||
| Daniel Doubrovkine | [dblock](https://github.com/dblock) | Independent |
|
||||
| Jack Mazanec | [jmazanec15](https://github.com/jmazanec15) | Amazon |
|
||||
| Rob Cowart | [robcowart](https://github.com/robcowart) | ElastiFlow |
|
||||
| Sven Cowart | [svencowart](https://github.com/svencowart) | |
|
||||
|
||||
6
vendor/github.com/opensearch-project/opensearch-go/v4/Makefile
generated
vendored
6
vendor/github.com/opensearch-project/opensearch-go/v4/Makefile
generated
vendored
@@ -80,9 +80,7 @@ build-coverage:
|
||||
|
||||
##@ Development
|
||||
lint: ## Run lint on the package
|
||||
@printf "\033[2m→ Running lint...\033[0m\n"
|
||||
go vet github.com/opensearch-project/opensearch-go/...
|
||||
go list github.com/opensearch-project/opensearch-go/... | 'grep' -v internal | xargs golint -set_exit_status
|
||||
@make linters
|
||||
|
||||
package := "prettier"
|
||||
lint.markdown:
|
||||
@@ -229,7 +227,7 @@ cluster.clean: ## Remove unused Docker volumes and networks
|
||||
docker system prune --volumes --force
|
||||
|
||||
linters:
|
||||
docker run -t --rm -v $$(pwd):/app -v ~/.cache/golangci-lint/v1.54.2:/root/.cache -w /app golangci/golangci-lint:v1.54.2 golangci-lint run --timeout=5m
|
||||
docker run -t --rm -v $$(pwd):/app -v ~/.cache/golangci-lint/v2.7.2:/root/.cache -w /app golangci/golangci-lint:v2.7.2 golangci-lint run --timeout=5m -v
|
||||
|
||||
workflow: ## Run all github workflow commands here sequentially
|
||||
|
||||
|
||||
24
vendor/github.com/opensearch-project/opensearch-go/v4/error.go
generated
vendored
24
vendor/github.com/opensearch-project/opensearch-go/v4/error.go
generated
vendored
@@ -75,10 +75,26 @@ type Err struct {
|
||||
RootCause []RootCause `json:"root_cause"`
|
||||
Type string `json:"type"`
|
||||
Reason string `json:"reason"`
|
||||
CausedBy *CausedBy `json:"caused_by,omitempty"`
|
||||
Index string `json:"index,omitempty"`
|
||||
IndexUUID string `json:"index_uuid,omitempty"`
|
||||
}
|
||||
|
||||
// CausedBy represents the optional caused_by of an API error response. Causes can be nested
|
||||
type CausedBy struct {
|
||||
Type string `json:"type"`
|
||||
Reason string `json:"reason"`
|
||||
CausedBy *CausedBy `json:"caused_by,omitempty"`
|
||||
}
|
||||
|
||||
// String returns a string representation of CausedBy, handling nested structures
|
||||
func (c *CausedBy) String() string {
|
||||
if c.CausedBy == nil {
|
||||
return fmt.Sprintf("{type: %s, reason: %s}", c.Type, c.Reason)
|
||||
}
|
||||
return fmt.Sprintf("{type: %s, reason: %s, caused_by: %s}", c.Type, c.Reason, c.CausedBy)
|
||||
}
|
||||
|
||||
// RootCause represents the root_cause of an API error response
|
||||
type RootCause struct {
|
||||
Type string `json:"type"`
|
||||
@@ -89,7 +105,13 @@ type RootCause struct {
|
||||
|
||||
// Error returns a string
|
||||
func (e StructError) Error() string {
|
||||
return fmt.Sprintf("status: %d, type: %s, reason: %s, root_cause: %s", e.Status, e.Err.Type, e.Err.Reason, e.Err.RootCause)
|
||||
result := fmt.Sprintf("status: %d, type: %s, reason: %s, root_cause: %s", e.Status, e.Err.Type, e.Err.Reason, e.Err.RootCause)
|
||||
|
||||
if e.Err.CausedBy != nil {
|
||||
result += fmt.Sprintf(", caused_by: %s", e.Err.CausedBy)
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshal function for StructError returning custom errors in special cases
|
||||
|
||||
2
vendor/github.com/opensearch-project/opensearch-go/v4/internal/version/version.go
generated
vendored
2
vendor/github.com/opensearch-project/opensearch-go/v4/internal/version/version.go
generated
vendored
@@ -27,4 +27,4 @@
|
||||
package version
|
||||
|
||||
// Client returns the client version as a string.
|
||||
const Client = "4.5.0"
|
||||
const Client = "4.6.0"
|
||||
|
||||
2
vendor/github.com/opensearch-project/opensearch-go/v4/opensearchapi/api_aliases.go
generated
vendored
2
vendor/github.com/opensearch-project/opensearch-go/v4/opensearchapi/api_aliases.go
generated
vendored
@@ -52,7 +52,7 @@ type AliasesResp struct {
|
||||
response *opensearch.Response
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r AliasesResp) Inspect() Inspect {
|
||||
return Inspect{Response: r.response}
|
||||
}
|
||||
|
||||
2
vendor/github.com/opensearch-project/opensearch-go/v4/opensearchapi/api_bulk.go
generated
vendored
2
vendor/github.com/opensearch-project/opensearch-go/v4/opensearchapi/api_bulk.go
generated
vendored
@@ -103,7 +103,7 @@ type BulkRespItem struct {
|
||||
} `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r BulkResp) Inspect() Inspect {
|
||||
return Inspect{Response: r.response}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ type CatAliasResp struct {
|
||||
IsWriteIndex string `json:"is_write_index"`
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r CatAliasesResp) Inspect() Inspect {
|
||||
return Inspect{
|
||||
Response: r.response,
|
||||
|
||||
@@ -59,7 +59,7 @@ type CatAllocationResp struct {
|
||||
Node string `json:"node"`
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r CatAllocationsResp) Inspect() Inspect {
|
||||
return Inspect{
|
||||
Response: r.response,
|
||||
|
||||
@@ -43,7 +43,7 @@ type CatClusterManagerResp struct {
|
||||
Node string `json:"node"`
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r CatClusterManagersResp) Inspect() Inspect {
|
||||
return Inspect{
|
||||
Response: r.response,
|
||||
|
||||
2
vendor/github.com/opensearch-project/opensearch-go/v4/opensearchapi/api_cat-count.go
generated
vendored
2
vendor/github.com/opensearch-project/opensearch-go/v4/opensearchapi/api_cat-count.go
generated
vendored
@@ -52,7 +52,7 @@ type CatCountResp struct {
|
||||
Count int `json:"count,string"`
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r CatCountsResp) Inspect() Inspect {
|
||||
return Inspect{
|
||||
Response: r.response,
|
||||
|
||||
@@ -55,7 +55,7 @@ type CatFieldDataItemResp struct {
|
||||
Size string `json:"size"`
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r CatFieldDataResp) Inspect() Inspect {
|
||||
return Inspect{
|
||||
Response: r.response,
|
||||
|
||||
@@ -55,7 +55,7 @@ type CatHealthItemResp struct {
|
||||
ActiveShardsPercent string `json:"active_shards_percent"`
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r CatHealthResp) Inspect() Inspect {
|
||||
return Inspect{
|
||||
Response: r.response,
|
||||
|
||||
@@ -195,7 +195,7 @@ type CatIndexResp struct {
|
||||
SearchThrottled bool `json:"search.throttled,string"`
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r CatIndicesResp) Inspect() Inspect {
|
||||
return Inspect{
|
||||
Response: r.response,
|
||||
|
||||
@@ -43,7 +43,7 @@ type CatMasterItemResp struct {
|
||||
Node string `json:"node"`
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r CatMasterResp) Inspect() Inspect {
|
||||
return Inspect{
|
||||
Response: r.response,
|
||||
|
||||
@@ -47,7 +47,7 @@ type CatNodeAttrsItemResp struct {
|
||||
Value string `json:"value"`
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r CatNodeAttrsResp) Inspect() Inspect {
|
||||
return Inspect{
|
||||
Response: r.response,
|
||||
|
||||
2
vendor/github.com/opensearch-project/opensearch-go/v4/opensearchapi/api_cat-nodes.go
generated
vendored
2
vendor/github.com/opensearch-project/opensearch-go/v4/opensearchapi/api_cat-nodes.go
generated
vendored
@@ -138,7 +138,7 @@ type CatNodesItemResp struct {
|
||||
SuggestTotal *int `json:"suggest.total,string"`
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r CatNodesResp) Inspect() Inspect {
|
||||
return Inspect{
|
||||
Response: r.response,
|
||||
|
||||
@@ -43,7 +43,7 @@ type CatPendingTaskResp struct {
|
||||
Source string `json:"source"`
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r CatPendingTasksResp) Inspect() Inspect {
|
||||
return Inspect{
|
||||
Response: r.response,
|
||||
|
||||
@@ -44,7 +44,7 @@ type CatPluginResp struct {
|
||||
Description string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r CatPluginsResp) Inspect() Inspect {
|
||||
return Inspect{
|
||||
Response: r.response,
|
||||
|
||||
@@ -75,7 +75,7 @@ type CatRecoveryItemResp struct {
|
||||
TranslogOpsPercent string `json:"translog_ops_percent"`
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r CatRecoveryResp) Inspect() Inspect {
|
||||
return Inspect{
|
||||
Response: r.response,
|
||||
|
||||
@@ -41,7 +41,7 @@ type CatRepositorieResp struct {
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r CatRepositoriesResp) Inspect() Inspect {
|
||||
return Inspect{
|
||||
Response: r.response,
|
||||
|
||||
@@ -64,7 +64,7 @@ type CatSegmentResp struct {
|
||||
Compound bool `json:"compound,string"`
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r CatSegmentsResp) Inspect() Inspect {
|
||||
return Inspect{
|
||||
Response: r.response,
|
||||
|
||||
@@ -129,7 +129,7 @@ type CatShardResp struct {
|
||||
DocsDeleted *int `json:"docs.deleted,string"`
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r CatShardsResp) Inspect() Inspect {
|
||||
return Inspect{
|
||||
Response: r.response,
|
||||
|
||||
@@ -53,7 +53,7 @@ type CatSnapshotResp struct {
|
||||
Reason string `json:"reason"`
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r CatSnapshotsResp) Inspect() Inspect {
|
||||
return Inspect{
|
||||
Response: r.response,
|
||||
|
||||
2
vendor/github.com/opensearch-project/opensearch-go/v4/opensearchapi/api_cat-tasks.go
generated
vendored
2
vendor/github.com/opensearch-project/opensearch-go/v4/opensearchapi/api_cat-tasks.go
generated
vendored
@@ -54,7 +54,7 @@ type CatTaskResp struct {
|
||||
XOpaqueID string `json:"x_opaque_id"`
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r CatTasksResp) Inspect() Inspect {
|
||||
return Inspect{
|
||||
Response: r.response,
|
||||
|
||||
@@ -54,7 +54,7 @@ type CatTemplateResp struct {
|
||||
ComposedOf string `json:"composed_of"`
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r CatTemplatesResp) Inspect() Inspect {
|
||||
return Inspect{
|
||||
Response: r.response,
|
||||
|
||||
@@ -70,7 +70,7 @@ type CatThreadPoolItemResp struct {
|
||||
TotalWaitTime string `json:"total_wait_time"`
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r CatThreadPoolResp) Inspect() Inspect {
|
||||
return Inspect{
|
||||
Response: r.response,
|
||||
|
||||
@@ -74,7 +74,7 @@ type ClusterAllocationExplainResp struct {
|
||||
response *opensearch.Response
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r ClusterAllocationExplainResp) Inspect() Inspect {
|
||||
return Inspect{Response: r.response}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ type ClusterPutDecommissionResp struct {
|
||||
response *opensearch.Response
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r ClusterPutDecommissionResp) Inspect() Inspect {
|
||||
return Inspect{Response: r.response}
|
||||
}
|
||||
@@ -74,7 +74,7 @@ type ClusterDeleteDecommissionResp struct {
|
||||
response *opensearch.Response
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r ClusterDeleteDecommissionResp) Inspect() Inspect {
|
||||
return Inspect{Response: r.response}
|
||||
}
|
||||
@@ -110,7 +110,7 @@ type ClusterGetDecommissionResp struct {
|
||||
response *opensearch.Response
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r ClusterGetDecommissionResp) Inspect() Inspect {
|
||||
return Inspect{Response: r.response}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ type ClusterHealthResp struct {
|
||||
response *opensearch.Response
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r ClusterHealthResp) Inspect() Inspect {
|
||||
return Inspect{Response: r.response}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ type ClusterPendingTasksResp struct {
|
||||
response *opensearch.Response
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r ClusterPendingTasksResp) Inspect() Inspect {
|
||||
return Inspect{Response: r.response}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ type ClusterRemoteInfoResp struct {
|
||||
response *opensearch.Response
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r ClusterRemoteInfoResp) Inspect() Inspect {
|
||||
return Inspect{Response: r.response}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ type ClusterRerouteResp struct {
|
||||
response *opensearch.Response
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r ClusterRerouteResp) Inspect() Inspect {
|
||||
return Inspect{Response: r.response}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ type ClusterGetSettingsResp struct {
|
||||
response *opensearch.Response
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r ClusterGetSettingsResp) Inspect() Inspect {
|
||||
return Inspect{Response: r.response}
|
||||
}
|
||||
@@ -70,7 +70,7 @@ type ClusterPutSettingsResp struct {
|
||||
response *opensearch.Response
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r ClusterPutSettingsResp) Inspect() Inspect {
|
||||
return Inspect{Response: r.response}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ type ClusterStateResp struct {
|
||||
} `json:"restore"`
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r ClusterStateResp) Inspect() Inspect {
|
||||
return Inspect{Response: r.response}
|
||||
}
|
||||
@@ -194,6 +194,7 @@ type ClusterStateMetaDataStream struct {
|
||||
type ClusterStateRoutingIndex struct {
|
||||
State string `json:"state"`
|
||||
Primary bool `json:"primary"`
|
||||
SearchOnly bool `json:"searchOnly"`
|
||||
Node *string `json:"node"`
|
||||
RelocatingNode *string `json:"relocating_node"`
|
||||
Shard int `json:"shard"`
|
||||
|
||||
@@ -60,7 +60,7 @@ type ClusterStatsResp struct {
|
||||
response *opensearch.Response
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r ClusterStatsResp) Inspect() Inspect {
|
||||
return Inspect{Response: r.response}
|
||||
}
|
||||
@@ -194,6 +194,7 @@ type ClusterStatsNodes struct {
|
||||
Master int `json:"master"`
|
||||
RemoteClusterClient int `json:"remote_cluster_client"`
|
||||
Search int `json:"search"`
|
||||
Warm int `json:"warm"`
|
||||
} `json:"count"`
|
||||
Versions []string `json:"versions"`
|
||||
Os struct {
|
||||
|
||||
@@ -41,7 +41,7 @@ type ComponentTemplateCreateResp struct {
|
||||
response *opensearch.Response
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r ComponentTemplateCreateResp) Inspect() Inspect {
|
||||
return Inspect{Response: r.response}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ type ComponentTemplateDeleteResp struct {
|
||||
response *opensearch.Response
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r ComponentTemplateDeleteResp) Inspect() Inspect {
|
||||
return Inspect{Response: r.response}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ type ComponentTemplateGetResp struct {
|
||||
response *opensearch.Response
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r ComponentTemplateGetResp) Inspect() Inspect {
|
||||
return Inspect{Response: r.response}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ type DanglingDeleteResp struct {
|
||||
response *opensearch.Response
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r DanglingDeleteResp) Inspect() Inspect {
|
||||
return Inspect{Response: r.response}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ type DanglingGetResp struct {
|
||||
response *opensearch.Response
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r DanglingGetResp) Inspect() Inspect {
|
||||
return Inspect{Response: r.response}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ type DanglingImportResp struct {
|
||||
response *opensearch.Response
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r DanglingImportResp) Inspect() Inspect {
|
||||
return Inspect{Response: r.response}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ type DataStreamCreateResp struct {
|
||||
response *opensearch.Response
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r DataStreamCreateResp) Inspect() Inspect {
|
||||
return Inspect{Response: r.response}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ type DataStreamDeleteResp struct {
|
||||
response *opensearch.Response
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r DataStreamDeleteResp) Inspect() Inspect {
|
||||
return Inspect{Response: r.response}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ type DataStreamGetResp struct {
|
||||
response *opensearch.Response
|
||||
}
|
||||
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
|
||||
// Inspect returns the Inspect type containing the raw *opensearch.Response
|
||||
func (r DataStreamGetResp) Inspect() Inspect {
|
||||
return Inspect{Response: r.response}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user