google-cloud-datastore-admin 0.1.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 50f6aeedfd9e003bbb2d4889c88342db068f1a8170ecc43b2c2ab73098a39b02
4
- data.tar.gz: d9119acefe0ba32935aa902f2f2fbc6c7b37232fe9af09f50156a2ba54817d1e
3
+ metadata.gz: ee4922c63e63e1831dfb9b9ff650c09e7ebc2add4499e878d2d00e1f930aaee7
4
+ data.tar.gz: bfd514324814a5888f21f2737a91a3885d3453b287938f2f27de11d797225462
5
5
  SHA512:
6
- metadata.gz: c40b3f7d4809109de1e6668d7c97c4c80705764178786fb71ea5dd16e83eeb35f997ff8161c29b2190c64e8d46b38b28ee98fd8f79f1f7462bb1011b2343ac3a
7
- data.tar.gz: fb58c73b7a32ef40a72784aa28262deceefcfa4c3f7835e7e0d3ec05a2662db7a8e7379878c168b91ad22ca135285b644fa4ddc4d70b1fc0324fa85c96a38709
6
+ metadata.gz: ce3ad0828a5cff0308bbbc1ad9edec2b1ad7079421f59189375f72ca092688cc8114fa745532610e70ce4e0f841d074e5d50facefdbde28449d43973a7f218fe
7
+ data.tar.gz: 2adfbdd37665e1982bc4f09f47d8a0878f8f9c959ca3b40597d10249f52e40dd26271b9b4a774bdda00b83db124ab6045549e5d74c7e9ab0ab6b8e8626fb0e9e
data/README.md CHANGED
@@ -16,7 +16,7 @@ for this library, google-cloud-datastore-admin, to see the convenience methods f
16
16
  constructing client objects. Reference documentation for the client objects
17
17
  themselves can be found in the client library documentation for the versioned
18
18
  client gems:
19
- [google-cloud-datastore-admin-v1](https://googleapis.dev/ruby/google-cloud-datastore-admin-v1/latest).
19
+ [google-cloud-datastore-admin-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-datastore-admin-v1/latest).
20
20
 
21
21
  See also the [Product Documentation](https://cloud.google.com/datastore)
22
22
  for more usage information.
@@ -34,32 +34,6 @@ In order to use this library, you first need to go through the following steps:
34
34
  1. [Enable the API.](https://console.cloud.google.com/apis/library/datastore.googleapis.com)
35
35
  1. {file:AUTHENTICATION.md Set up authentication.}
36
36
 
37
- ## Enabling Logging
38
-
39
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
40
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
41
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
42
- that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
43
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
44
-
45
- Configuring a Ruby stdlib logger:
46
-
47
- ```ruby
48
- require "logger"
49
-
50
- module MyLogger
51
- LOGGER = Logger.new $stderr, level: Logger::WARN
52
- def logger
53
- LOGGER
54
- end
55
- end
56
-
57
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
58
- module GRPC
59
- extend MyLogger
60
- end
61
- ```
62
-
63
37
  ## Supported Ruby Versions
64
38
 
65
39
  This library is supported on Ruby 2.6+.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Datastore
23
23
  module Admin
24
- VERSION = "0.1.0"
24
+ VERSION = "0.2.1"
25
25
  end
26
26
  end
27
27
  end
@@ -49,25 +49,23 @@ module Google
49
49
  # Create a new client object for DatastoreAdmin.
50
50
  #
51
51
  # By default, this returns an instance of
52
- # [Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client](https://googleapis.dev/ruby/google-cloud-datastore-admin-v1/latest/Google/Cloud/Datastore/Admin/V1/DatastoreAdmin/Client.html)
52
+ # [Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-datastore-admin-v1/latest/Google-Cloud-Datastore-Admin-V1-DatastoreAdmin-Client)
53
53
  # for a gRPC client for version V1 of the API.
54
54
  # However, you can specify a different API version by passing it in the
55
55
  # `version` parameter. If the DatastoreAdmin service is
56
56
  # supported by that API version, and the corresponding gem is available, the
57
57
  # appropriate versioned client will be returned.
58
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
59
+ # the `transport` parameter.
58
60
  #
59
61
  # ## About DatastoreAdmin
60
62
  #
61
63
  # Google Cloud Datastore Admin API
62
64
  #
63
- #
64
65
  # The Datastore Admin API provides several admin services for Cloud Datastore.
65
66
  #
66
- # -----------------------------------------------------------------------------
67
- # ## Concepts
68
- #
69
- # Project, namespace, kind, and entity as defined in the Google Cloud Datastore
70
- # API.
67
+ # Concepts: Project, namespace, kind, and entity as defined in the Google Cloud
68
+ # Datastore API.
71
69
  #
72
70
  # Operation: An Operation represents work being performed in the background.
73
71
  #
@@ -75,56 +73,47 @@ module Google
75
73
  # specified as a combination of kinds and namespaces (either or both of which
76
74
  # may be all).
77
75
  #
78
- # -----------------------------------------------------------------------------
79
- # ## Services
80
- #
81
- # # Export/Import
76
+ # Export/Import Service:
82
77
  #
83
- # The Export/Import service provides the ability to copy all or a subset of
78
+ # - The Export/Import service provides the ability to copy all or a subset of
84
79
  # entities to/from Google Cloud Storage.
85
- #
86
- # Exported data may be imported into Cloud Datastore for any Google Cloud
80
+ # - Exported data may be imported into Cloud Datastore for any Google Cloud
87
81
  # Platform project. It is not restricted to the export source project. It is
88
82
  # possible to export from one project and then import into another.
89
- #
90
- # Exported data can also be loaded into Google BigQuery for analysis.
91
- #
92
- # Exports and imports are performed asynchronously. An Operation resource is
83
+ # - Exported data can also be loaded into Google BigQuery for analysis.
84
+ # - Exports and imports are performed asynchronously. An Operation resource is
93
85
  # created for each export/import. The state (including any errors encountered)
94
86
  # of the export/import may be queried via the Operation resource.
95
87
  #
96
- # # Index
88
+ # Index Service:
97
89
  #
98
- # The index service manages Cloud Datastore composite indexes.
99
- #
100
- # Index creation and deletion are performed asynchronously.
90
+ # - The index service manages Cloud Datastore composite indexes.
91
+ # - Index creation and deletion are performed asynchronously.
101
92
  # An Operation resource is created for each such asynchronous operation.
102
93
  # The state of the operation (including any errors encountered)
103
94
  # may be queried via the Operation resource.
104
95
  #
105
- # # Operation
96
+ # Operation Service:
106
97
  #
107
- # The Operations collection provides a record of actions performed for the
98
+ # - The Operations collection provides a record of actions performed for the
108
99
  # specified project (including any operations in progress). Operations are not
109
100
  # created directly but through calls on other collections or resources.
110
- #
111
- # An operation that is not yet done may be cancelled. The request to cancel is
112
- # asynchronous and the operation may continue to run for some time after the
101
+ # - An operation that is not yet done may be cancelled. The request to cancel
102
+ # is asynchronous and the operation may continue to run for some time after the
113
103
  # request to cancel is made.
114
- #
115
- # An operation that is done may be deleted so that it is no longer listed as
104
+ # - An operation that is done may be deleted so that it is no longer listed as
116
105
  # part of the Operation collection.
117
- #
118
- # ListOperations returns all pending operations, but not completed operations.
119
- #
120
- # Operations are created by service DatastoreAdmin,
121
- # but are accessed via service google.longrunning.Operations.
106
+ # - ListOperations returns all pending operations, but not completed
107
+ # operations.
108
+ # - Operations are created by service DatastoreAdmin, but are accessed via
109
+ # service google.longrunning.Operations.
122
110
  #
123
111
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
124
112
  # Defaults to `:v1`.
113
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
125
114
  # @return [::Object] A client object for the specified version.
126
115
  #
127
- def self.datastore_admin version: :v1, &block
116
+ def self.datastore_admin version: :v1, transport: :grpc, &block
128
117
  require "google/cloud/datastore/admin/#{version.to_s.downcase}"
129
118
 
130
119
  package_name = Google::Cloud::Datastore::Admin
@@ -132,6 +121,7 @@ module Google
132
121
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
133
122
  .first
134
123
  service_module = Google::Cloud::Datastore::Admin.const_get(package_name).const_get(:DatastoreAdmin)
124
+ service_module = service_module.const_get(:Rest) if transport == :rest
135
125
  service_module.const_get(:Client).new(&block)
136
126
  end
137
127
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-datastore-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-12 00:00:00.000000000 Z
11
+ date: 2023-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0.0'
33
+ version: '0.8'
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
36
  version: 2.a
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: '0.0'
43
+ version: '0.8'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 2.a