martinzink commented on a change in pull request #1268: URL: https://github.com/apache/nifi-minifi-cpp/pull/1268#discussion_r824867128
########## File path: extensions/gcp/controllerservices/GcpCredentialsControllerService.h ########## @@ -0,0 +1,85 @@ +/** + * 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. + */ + +#pragma once +#include <filesystem> +#include <string> +#include <memory> + +#include "core/controller/ControllerService.h" +#include "core/logging/Logger.h" +#include "core/logging/LoggerConfiguration.h" +#include "utils/Enum.h" + +#include "google/cloud/storage/oauth2/credentials.h" + +namespace org::apache::nifi::minifi::extensions::gcp { + +class GcpCredentialsControllerService : public core::controller::ControllerService { + public: + SMART_ENUM(CredentialsLocation, + (USE_DEFAULT_CREDENTIALS, "Google Application Default Credentials"), + (USE_COMPUTE_ENGINE_CREDENTIALS, "Use Compute Engine Credentials"), + (USE_JSON_FILE, "Service Account JSON File"), + (USE_JSON_CONTENTS, "Service Account JSON"), + (USE_ANONYMOUS_CREDENTIALS, "Use Anonymous credentials")); + + EXTENSIONAPI static const core::Property CredentialsLoc; + EXTENSIONAPI static const core::Property JsonFilePath; + EXTENSIONAPI static const core::Property JsonContents; + + explicit GcpCredentialsControllerService(const std::string& name, const minifi::utils::Identifier& uuid = {}) + : ControllerService(name, uuid) { + } + + explicit GcpCredentialsControllerService(const std::string& name, const std::shared_ptr<Configure>& /*configuration*/) + : ControllerService(name) { + } Review comment: Good idea changed it in https://github.com/apache/nifi-minifi-cpp/pull/1268/commits/57404afcf541daa1780365e054a555dcd8093c3e#diff-58fcc543a6d27e65e6ebab876162722d5af853e579d2fef8beb431b411b96a2eR45 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
