From bf170798a14227eb03b20d73a8f24ded3301ddbe Mon Sep 17 00:00:00 2001 From: kumfo Date: Fri, 19 Jul 2024 17:02:29 +0800 Subject: [PATCH] fix(cdn): change namespace --- {cdn-aliyunoss => cdn-aliyun}/README.md | 2 +- {cdn-aliyunoss => cdn-aliyun}/aliyunoss.go | 4 +- {cdn-aliyunoss => cdn-aliyun}/go.mod | 2 +- {cdn-aliyunoss => cdn-aliyun}/go.sum | 0 {cdn-aliyunoss => cdn-aliyun}/i18n/en_US.yaml | 2 +- cdn-aliyun/i18n/translation.go | 45 +++++++++++++++++++ {cdn-aliyunoss => cdn-aliyun}/i18n/zh_CN.yaml | 2 +- {cdn-aliyunoss => cdn-aliyun}/info.yaml | 4 +- cdn-aliyunoss/i18n/translation.go | 45 ------------------- 9 files changed, 53 insertions(+), 53 deletions(-) rename {cdn-aliyunoss => cdn-aliyun}/README.md (98%) rename {cdn-aliyunoss => cdn-aliyun}/aliyunoss.go (99%) rename {cdn-aliyunoss => cdn-aliyun}/go.mod (96%) rename {cdn-aliyunoss => cdn-aliyun}/go.sum (100%) rename {cdn-aliyunoss => cdn-aliyun}/i18n/en_US.yaml (99%) create mode 100644 cdn-aliyun/i18n/translation.go rename {cdn-aliyunoss => cdn-aliyun}/i18n/zh_CN.yaml (99%) rename {cdn-aliyunoss => cdn-aliyun}/info.yaml (95%) delete mode 100644 cdn-aliyunoss/i18n/translation.go diff --git a/cdn-aliyunoss/README.md b/cdn-aliyun/README.md similarity index 98% rename from cdn-aliyunoss/README.md rename to cdn-aliyun/README.md index ceabbfe7..13ea1171 100644 --- a/cdn-aliyunoss/README.md +++ b/cdn-aliyun/README.md @@ -5,7 +5,7 @@ ### Build ```bash -./answer build --with github.com/apache/incubator-answer-plugins/cdn-aliyunoss +./answer build --with github.com/apache/incubator-answer-plugins/cdn-aliyun ``` ### Configuration diff --git a/cdn-aliyunoss/aliyunoss.go b/cdn-aliyun/aliyunoss.go similarity index 99% rename from cdn-aliyunoss/aliyunoss.go rename to cdn-aliyun/aliyunoss.go index 219dae53..c37564d9 100644 --- a/cdn-aliyunoss/aliyunoss.go +++ b/cdn-aliyun/aliyunoss.go @@ -17,13 +17,13 @@ * under the License. */ -package aliyunoss +package aliyun import ( "embed" "encoding/json" "github.com/aliyun/aliyun-oss-go-sdk/oss" - "github.com/apache/incubator-answer-plugins/cdn-aliyunoss/i18n" + "github.com/apache/incubator-answer-plugins/cdn-aliyun/i18n" "github.com/apache/incubator-answer-plugins/util" "github.com/apache/incubator-answer/plugin" "github.com/apache/incubator-answer/ui" diff --git a/cdn-aliyunoss/go.mod b/cdn-aliyun/go.mod similarity index 96% rename from cdn-aliyunoss/go.mod rename to cdn-aliyun/go.mod index 99239626..e996bc01 100644 --- a/cdn-aliyunoss/go.mod +++ b/cdn-aliyun/go.mod @@ -1,4 +1,4 @@ -module github.com/apache/incubator-answer-plugins/cdn-aliyunoss +module github.com/apache/incubator-answer-plugins/cdn-aliyun go 1.19 diff --git a/cdn-aliyunoss/go.sum b/cdn-aliyun/go.sum similarity index 100% rename from cdn-aliyunoss/go.sum rename to cdn-aliyun/go.sum diff --git a/cdn-aliyunoss/i18n/en_US.yaml b/cdn-aliyun/i18n/en_US.yaml similarity index 99% rename from cdn-aliyunoss/i18n/en_US.yaml rename to cdn-aliyun/i18n/en_US.yaml index 735db17f..199c4897 100644 --- a/cdn-aliyunoss/i18n/en_US.yaml +++ b/cdn-aliyun/i18n/en_US.yaml @@ -16,7 +16,7 @@ # under the License. plugin: - aliyunoss_cdn: + aliyun_cdn: backend: info: name: diff --git a/cdn-aliyun/i18n/translation.go b/cdn-aliyun/i18n/translation.go new file mode 100644 index 00000000..08e2832a --- /dev/null +++ b/cdn-aliyun/i18n/translation.go @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package i18n + +const ( + InfoName = "plugin.aliyun_cdn.backend.info.name" + InfoDescription = "plugin.aliyun_cdn.backend.info.description" + + ConfigEndpointTitle = "plugin.aliyun_cdn.backend.config.endpoint.title" + ConfigEndpointDescription = "plugin.aliyun_cdn.backend.config.endpoint.description" + ConfigBucketNameTitle = "plugin.aliyun_cdn.backend.config.bucket_name.title" + ConfigBucketNameDescription = "plugin.aliyun_cdn.backend.config.bucket_name.description" + ConfigObjectKeyPrefixTitle = "plugin.aliyun_cdn.backend.config.object_key_prefix.title" + ConfigObjectKeyPrefixDescription = "plugin.aliyun_cdn.backend.config.object_key_prefix.description" + ConfigAccessKeyIdTitle = "plugin.aliyun_cdn.backend.config.access_key_id.title" + ConfigAccessKeyIdDescription = "plugin.aliyun_cdn.backend.config.access_key_id.description" + ConfigAccessKeySecretTitle = "plugin.aliyun_cdn.backend.config.access_key_secret.title" + ConfigAccessKeySecretDescription = "plugin.aliyun_cdn.backend.config.access_key_secret.description" + ConfigVisitUrlPrefixTitle = "plugin.aliyun_cdn.backend.config.visit_url_prefix.title" + ConfigVisitUrlPrefixDescription = "plugin.aliyun_cdn.backend.config.visit_url_prefix.description" + ConfigMaxFileSizeTitle = "plugin.aliyun_cdn.backend.config.max_file_size.title" + ConfigMaxFileSizeDescription = "plugin.aliyun_cdn.backend.config.max_file_size.description" + + ErrMisStorageConfig = "plugin.aliyun_cdn.backend.err.mis_storage_config" + ErrUnsupportedFileType = "plugin.aliyun_cdn.backend.err.unsupported_file_type" + ErrOverFileSizeLimit = "plugin.aliyun_cdn.backend.err.over_file_size_limit" + ErrUploadFileFailed = "plugin.aliyun_cdn.backend.err.upload_file_failed" +) diff --git a/cdn-aliyunoss/i18n/zh_CN.yaml b/cdn-aliyun/i18n/zh_CN.yaml similarity index 99% rename from cdn-aliyunoss/i18n/zh_CN.yaml rename to cdn-aliyun/i18n/zh_CN.yaml index eea4725e..0e1240cb 100644 --- a/cdn-aliyunoss/i18n/zh_CN.yaml +++ b/cdn-aliyun/i18n/zh_CN.yaml @@ -16,7 +16,7 @@ # under the License. plugin: - aliyunoss_cdn: + aliyun_cdn: backend: info: name: diff --git a/cdn-aliyunoss/info.yaml b/cdn-aliyun/info.yaml similarity index 95% rename from cdn-aliyunoss/info.yaml rename to cdn-aliyun/info.yaml index e9683d97..91c46ba0 100644 --- a/cdn-aliyunoss/info.yaml +++ b/cdn-aliyun/info.yaml @@ -15,8 +15,8 @@ # specific language governing permissions and limitations # under the License. -slug_name: aliyunoss_cdn +slug_name: aliyun_cdn type: cdn version: 1.0.0 author: answerdev -link: https://github.com/apache/incubator-answer-plugins/tree/main/cdn-aliyunoss +link: https://github.com/apache/incubator-answer-plugins/tree/main/cdn-aliyun diff --git a/cdn-aliyunoss/i18n/translation.go b/cdn-aliyunoss/i18n/translation.go deleted file mode 100644 index 773fe177..00000000 --- a/cdn-aliyunoss/i18n/translation.go +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package i18n - -const ( - InfoName = "plugin.aliyunoss_cdn.backend.info.name" - InfoDescription = "plugin.aliyunoss_cdn.backend.info.description" - - ConfigEndpointTitle = "plugin.aliyunoss_cdn.backend.config.endpoint.title" - ConfigEndpointDescription = "plugin.aliyunoss_cdn.backend.config.endpoint.description" - ConfigBucketNameTitle = "plugin.aliyunoss_cdn.backend.config.bucket_name.title" - ConfigBucketNameDescription = "plugin.aliyunoss_cdn.backend.config.bucket_name.description" - ConfigObjectKeyPrefixTitle = "plugin.aliyunoss_cdn.backend.config.object_key_prefix.title" - ConfigObjectKeyPrefixDescription = "plugin.aliyunoss_cdn.backend.config.object_key_prefix.description" - ConfigAccessKeyIdTitle = "plugin.aliyunoss_cdn.backend.config.access_key_id.title" - ConfigAccessKeyIdDescription = "plugin.aliyunoss_cdn.backend.config.access_key_id.description" - ConfigAccessKeySecretTitle = "plugin.aliyunoss_cdn.backend.config.access_key_secret.title" - ConfigAccessKeySecretDescription = "plugin.aliyunoss_cdn.backend.config.access_key_secret.description" - ConfigVisitUrlPrefixTitle = "plugin.aliyunoss_cdn.backend.config.visit_url_prefix.title" - ConfigVisitUrlPrefixDescription = "plugin.aliyunoss_cdn.backend.config.visit_url_prefix.description" - ConfigMaxFileSizeTitle = "plugin.aliyunoss_cdn.backend.config.max_file_size.title" - ConfigMaxFileSizeDescription = "plugin.aliyunoss_cdn.backend.config.max_file_size.description" - - ErrMisStorageConfig = "plugin.aliyunoss_cdn.backend.err.mis_storage_config" - ErrUnsupportedFileType = "plugin.aliyunoss_cdn.backend.err.unsupported_file_type" - ErrOverFileSizeLimit = "plugin.aliyunoss_cdn.backend.err.over_file_size_limit" - ErrUploadFileFailed = "plugin.aliyunoss_cdn.backend.err.upload_file_failed" -)