Skip to content

Commit

Permalink
chore(storage): Remove references to notification / hmac / service ac… (
Browse files Browse the repository at this point in the history
#14768)

* chore(storage): Remove references to notification / hmac / service account ops from internal

* omit rpcs

* fix typo

* break into multiple lines
  • Loading branch information
ddelgrosso1 authored Oct 4, 2024
1 parent ce02666 commit c90c889
Show file tree
Hide file tree
Showing 21 changed files with 12 additions and 1,264 deletions.
12 changes: 12 additions & 0 deletions generator/generator_config.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -3683,6 +3683,18 @@ service {
"WriteObject"
]
omit_repo_metadata: true
omitted_rpcs: [
"GetServiceAccount",
"CreateHmacKey",
"DeleteHmacKey",
"GetHmacKey",
"ListHmacKeys",
"UpdateHmacKey",
"DeleteNotificationConfig",
"GetNotificationConfig",
"CreateNotificationConfig",
"ListNotificationConfigs"
]
}
# Storage Control
Expand Down
2 changes: 0 additions & 2 deletions google/cloud/storage/google_cloud_cpp_storage_grpc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ google_cloud_cpp_storage_grpc_hdrs = [
"internal/grpc/metrics_histograms.h",
"internal/grpc/metrics_meter_provider.h",
"internal/grpc/monitoring_project.h",
"internal/grpc/notification_metadata_parser.h",
"internal/grpc/object_access_control_parser.h",
"internal/grpc/object_metadata_parser.h",
"internal/grpc/object_read_source.h",
Expand Down Expand Up @@ -133,7 +132,6 @@ google_cloud_cpp_storage_grpc_srcs = [
"internal/grpc/metrics_histograms.cc",
"internal/grpc/metrics_meter_provider.cc",
"internal/grpc/monitoring_project.cc",
"internal/grpc/notification_metadata_parser.cc",
"internal/grpc/object_access_control_parser.cc",
"internal/grpc/object_metadata_parser.cc",
"internal/grpc/object_read_source.cc",
Expand Down
3 changes: 0 additions & 3 deletions google/cloud/storage/google_cloud_cpp_storage_grpc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ add_library(
internal/grpc/metrics_meter_provider.h
internal/grpc/monitoring_project.cc
internal/grpc/monitoring_project.h
internal/grpc/notification_metadata_parser.cc
internal/grpc/notification_metadata_parser.h
internal/grpc/object_access_control_parser.cc
internal/grpc/object_access_control_parser.h
internal/grpc/object_metadata_parser.cc
Expand Down Expand Up @@ -440,7 +438,6 @@ set(storage_client_grpc_unit_tests
internal/grpc/metrics_histograms_test.cc
internal/grpc/metrics_meter_provider_test.cc
internal/grpc/monitoring_project_test.cc
internal/grpc/notification_metadata_parser_test.cc
internal/grpc/object_access_control_parser_test.cc
internal/grpc/object_metadata_parser_test.cc
internal/grpc/object_read_source_test.cc
Expand Down
72 changes: 0 additions & 72 deletions google/cloud/storage/internal/grpc/notification_metadata_parser.cc

This file was deleted.

39 changes: 0 additions & 39 deletions google/cloud/storage/internal/grpc/notification_metadata_parser.h

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion google/cloud/storage/internal/grpc/stub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "google/cloud/storage/internal/grpc/configure_client_context.h"
#include "google/cloud/storage/internal/grpc/ctype_cord_workaround.h"
#include "google/cloud/storage/internal/grpc/default_options.h"
#include "google/cloud/storage/internal/grpc/notification_metadata_parser.h"
#include "google/cloud/storage/internal/grpc/object_access_control_parser.h"
#include "google/cloud/storage/internal/grpc/object_metadata_parser.h"
#include "google/cloud/storage/internal/grpc/object_read_source.h"
Expand Down
83 changes: 0 additions & 83 deletions google/cloud/storage/internal/storage_auth_decorator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -235,89 +235,6 @@ StorageAuth::QueryWriteStatus(
return child_->QueryWriteStatus(context, options, request);
}

StatusOr<google::storage::v2::ServiceAccount> StorageAuth::GetServiceAccount(
grpc::ClientContext& context, Options const& options,
google::storage::v2::GetServiceAccountRequest const& request) {
auto status = auth_->ConfigureContext(context);
if (!status.ok()) return status;
return child_->GetServiceAccount(context, options, request);
}

StatusOr<google::storage::v2::CreateHmacKeyResponse> StorageAuth::CreateHmacKey(
grpc::ClientContext& context, Options const& options,
google::storage::v2::CreateHmacKeyRequest const& request) {
auto status = auth_->ConfigureContext(context);
if (!status.ok()) return status;
return child_->CreateHmacKey(context, options, request);
}

Status StorageAuth::DeleteHmacKey(
grpc::ClientContext& context, Options const& options,
google::storage::v2::DeleteHmacKeyRequest const& request) {
auto status = auth_->ConfigureContext(context);
if (!status.ok()) return status;
return child_->DeleteHmacKey(context, options, request);
}

StatusOr<google::storage::v2::HmacKeyMetadata> StorageAuth::GetHmacKey(
grpc::ClientContext& context, Options const& options,
google::storage::v2::GetHmacKeyRequest const& request) {
auto status = auth_->ConfigureContext(context);
if (!status.ok()) return status;
return child_->GetHmacKey(context, options, request);
}

StatusOr<google::storage::v2::ListHmacKeysResponse> StorageAuth::ListHmacKeys(
grpc::ClientContext& context, Options const& options,
google::storage::v2::ListHmacKeysRequest const& request) {
auto status = auth_->ConfigureContext(context);
if (!status.ok()) return status;
return child_->ListHmacKeys(context, options, request);
}

StatusOr<google::storage::v2::HmacKeyMetadata> StorageAuth::UpdateHmacKey(
grpc::ClientContext& context, Options const& options,
google::storage::v2::UpdateHmacKeyRequest const& request) {
auto status = auth_->ConfigureContext(context);
if (!status.ok()) return status;
return child_->UpdateHmacKey(context, options, request);
}

Status StorageAuth::DeleteNotificationConfig(
grpc::ClientContext& context, Options const& options,
google::storage::v2::DeleteNotificationConfigRequest const& request) {
auto status = auth_->ConfigureContext(context);
if (!status.ok()) return status;
return child_->DeleteNotificationConfig(context, options, request);
}

StatusOr<google::storage::v2::NotificationConfig>
StorageAuth::GetNotificationConfig(
grpc::ClientContext& context, Options const& options,
google::storage::v2::GetNotificationConfigRequest const& request) {
auto status = auth_->ConfigureContext(context);
if (!status.ok()) return status;
return child_->GetNotificationConfig(context, options, request);
}

StatusOr<google::storage::v2::NotificationConfig>
StorageAuth::CreateNotificationConfig(
grpc::ClientContext& context, Options const& options,
google::storage::v2::CreateNotificationConfigRequest const& request) {
auto status = auth_->ConfigureContext(context);
if (!status.ok()) return status;
return child_->CreateNotificationConfig(context, options, request);
}

StatusOr<google::storage::v2::ListNotificationConfigsResponse>
StorageAuth::ListNotificationConfigs(
grpc::ClientContext& context, Options const& options,
google::storage::v2::ListNotificationConfigsRequest const& request) {
auto status = auth_->ConfigureContext(context);
if (!status.ok()) return status;
return child_->ListNotificationConfigs(context, options, request);
}

future<StatusOr<google::storage::v2::Object>> StorageAuth::AsyncComposeObject(
google::cloud::CompletionQueue& cq,
std::shared_ptr<grpc::ClientContext> context,
Expand Down
45 changes: 0 additions & 45 deletions google/cloud/storage/internal/storage_auth_decorator.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,51 +137,6 @@ class StorageAuth : public StorageStub {
grpc::ClientContext& context, Options const& options,
google::storage::v2::QueryWriteStatusRequest const& request) override;

StatusOr<google::storage::v2::ServiceAccount> GetServiceAccount(
grpc::ClientContext& context, Options const& options,
google::storage::v2::GetServiceAccountRequest const& request) override;

StatusOr<google::storage::v2::CreateHmacKeyResponse> CreateHmacKey(
grpc::ClientContext& context, Options const& options,
google::storage::v2::CreateHmacKeyRequest const& request) override;

Status DeleteHmacKey(
grpc::ClientContext& context, Options const& options,
google::storage::v2::DeleteHmacKeyRequest const& request) override;

StatusOr<google::storage::v2::HmacKeyMetadata> GetHmacKey(
grpc::ClientContext& context, Options const& options,
google::storage::v2::GetHmacKeyRequest const& request) override;

StatusOr<google::storage::v2::ListHmacKeysResponse> ListHmacKeys(
grpc::ClientContext& context, Options const& options,
google::storage::v2::ListHmacKeysRequest const& request) override;

StatusOr<google::storage::v2::HmacKeyMetadata> UpdateHmacKey(
grpc::ClientContext& context, Options const& options,
google::storage::v2::UpdateHmacKeyRequest const& request) override;

Status DeleteNotificationConfig(
grpc::ClientContext& context, Options const& options,
google::storage::v2::DeleteNotificationConfigRequest const& request)
override;

StatusOr<google::storage::v2::NotificationConfig> GetNotificationConfig(
grpc::ClientContext& context, Options const& options,
google::storage::v2::GetNotificationConfigRequest const& request)
override;

StatusOr<google::storage::v2::NotificationConfig> CreateNotificationConfig(
grpc::ClientContext& context, Options const& options,
google::storage::v2::CreateNotificationConfigRequest const& request)
override;

StatusOr<google::storage::v2::ListNotificationConfigsResponse>
ListNotificationConfigs(
grpc::ClientContext& context, Options const& options,
google::storage::v2::ListNotificationConfigsRequest const& request)
override;

future<StatusOr<google::storage::v2::Object>> AsyncComposeObject(
google::cloud::CompletionQueue& cq,
std::shared_ptr<grpc::ClientContext> context,
Expand Down
Loading

0 comments on commit c90c889

Please sign in to comment.