google-cloud-redis 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,109 @@
1
+ # Copyright 2018 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+
16
+ module Google
17
+ module Protobuf
18
+ # A Timestamp represents a point in time independent of any time zone
19
+ # or calendar, represented as seconds and fractions of seconds at
20
+ # nanosecond resolution in UTC Epoch time. It is encoded using the
21
+ # Proleptic Gregorian Calendar which extends the Gregorian calendar
22
+ # backwards to year one. It is encoded assuming all minutes are 60
23
+ # seconds long, i.e. leap seconds are "smeared" so that no leap second
24
+ # table is needed for interpretation. Range is from
25
+ # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.
26
+ # By restricting to that range, we ensure that we can convert to
27
+ # and from RFC 3339 date strings.
28
+ # See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).
29
+ #
30
+ # = Examples
31
+ #
32
+ # Example 1: Compute Timestamp from POSIX +time()+.
33
+ #
34
+ # Timestamp timestamp;
35
+ # timestamp.set_seconds(time(NULL));
36
+ # timestamp.set_nanos(0);
37
+ #
38
+ # Example 2: Compute Timestamp from POSIX +gettimeofday()+.
39
+ #
40
+ # struct timeval tv;
41
+ # gettimeofday(&tv, NULL);
42
+ #
43
+ # Timestamp timestamp;
44
+ # timestamp.set_seconds(tv.tv_sec);
45
+ # timestamp.set_nanos(tv.tv_usec * 1000);
46
+ #
47
+ # Example 3: Compute Timestamp from Win32 +GetSystemTimeAsFileTime()+.
48
+ #
49
+ # FILETIME ft;
50
+ # GetSystemTimeAsFileTime(&ft);
51
+ # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
52
+ #
53
+ # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
54
+ # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
55
+ # Timestamp timestamp;
56
+ # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
57
+ # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
58
+ #
59
+ # Example 4: Compute Timestamp from Java +System.currentTimeMillis()+.
60
+ #
61
+ # long millis = System.currentTimeMillis();
62
+ #
63
+ # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
64
+ # .setNanos((int) ((millis % 1000) * 1000000)).build();
65
+ #
66
+ #
67
+ # Example 5: Compute Timestamp from current time in Python.
68
+ #
69
+ # timestamp = Timestamp()
70
+ # timestamp.GetCurrentTime()
71
+ #
72
+ # = JSON Mapping
73
+ #
74
+ # In JSON format, the Timestamp type is encoded as a string in the
75
+ # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
76
+ # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z"
77
+ # where \\{year} is always expressed using four digits while \\{month}, \\{day},
78
+ # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional
79
+ # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
80
+ # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
81
+ # is required. A proto3 JSON serializer should always use UTC (as indicated by
82
+ # "Z") when printing the Timestamp type and a proto3 JSON parser should be
83
+ # able to accept both UTC and other timezones (as indicated by an offset).
84
+ #
85
+ # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
86
+ # 01:30 UTC on January 15, 2017.
87
+ #
88
+ # In JavaScript, one can convert a Date object to this format using the
89
+ # standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString]
90
+ # method. In Python, a standard +datetime.datetime+ object can be converted
91
+ # to this format using [+strftime+](https://docs.python.org/2/library/time.html#time.strftime)
92
+ # with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
93
+ # can use the Joda Time's [+ISODateTimeFormat.dateTime()+](
94
+ # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--
95
+ # ) to obtain a formatter capable of generating timestamps in this format.
96
+ # @!attribute [rw] seconds
97
+ # @return [Integer]
98
+ # Represents seconds of UTC time since Unix epoch
99
+ # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
100
+ # 9999-12-31T23:59:59Z inclusive.
101
+ # @!attribute [rw] nanos
102
+ # @return [Integer]
103
+ # Non-negative fractions of a second at nanosecond resolution. Negative
104
+ # second values with fractions must still have non-negative nanos values
105
+ # that count forward in time. Must be from 0 to 999,999,999
106
+ # inclusive.
107
+ class Timestamp; end
108
+ end
109
+ end
@@ -0,0 +1,84 @@
1
+ # Copyright 2018 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+
16
+ module Google
17
+ module Rpc
18
+ # The +Status+ type defines a logical error model that is suitable for different
19
+ # programming environments, including REST APIs and RPC APIs. It is used by
20
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
21
+ #
22
+ # * Simple to use and understand for most users
23
+ # * Flexible enough to meet unexpected needs
24
+ #
25
+ # = Overview
26
+ #
27
+ # The +Status+ message contains three pieces of data: error code, error message,
28
+ # and error details. The error code should be an enum value of
29
+ # {Google::Rpc::Code}, but it may accept additional error codes if needed. The
30
+ # error message should be a developer-facing English message that helps
31
+ # developers *understand* and *resolve* the error. If a localized user-facing
32
+ # error message is needed, put the localized message in the error details or
33
+ # localize it in the client. The optional error details may contain arbitrary
34
+ # information about the error. There is a predefined set of error detail types
35
+ # in the package +google.rpc+ that can be used for common error conditions.
36
+ #
37
+ # = Language mapping
38
+ #
39
+ # The +Status+ message is the logical representation of the error model, but it
40
+ # is not necessarily the actual wire format. When the +Status+ message is
41
+ # exposed in different client libraries and different wire protocols, it can be
42
+ # mapped differently. For example, it will likely be mapped to some exceptions
43
+ # in Java, but more likely mapped to some error codes in C.
44
+ #
45
+ # = Other uses
46
+ #
47
+ # The error model and the +Status+ message can be used in a variety of
48
+ # environments, either with or without APIs, to provide a
49
+ # consistent developer experience across different environments.
50
+ #
51
+ # Example uses of this error model include:
52
+ #
53
+ # * Partial errors. If a service needs to return partial errors to the client,
54
+ # it may embed the +Status+ in the normal response to indicate the partial
55
+ # errors.
56
+ #
57
+ # * Workflow errors. A typical workflow has multiple steps. Each step may
58
+ # have a +Status+ message for error reporting.
59
+ #
60
+ # * Batch operations. If a client uses batch request and batch response, the
61
+ # +Status+ message should be used directly inside batch response, one for
62
+ # each error sub-response.
63
+ #
64
+ # * Asynchronous operations. If an API call embeds asynchronous operation
65
+ # results in its response, the status of those operations should be
66
+ # represented directly using the +Status+ message.
67
+ #
68
+ # * Logging. If some API errors are stored in logs, the message +Status+ could
69
+ # be used directly after any stripping needed for security/privacy reasons.
70
+ # @!attribute [rw] code
71
+ # @return [Integer]
72
+ # The status code, which should be an enum value of {Google::Rpc::Code}.
73
+ # @!attribute [rw] message
74
+ # @return [String]
75
+ # A developer-facing error message, which should be in English. Any
76
+ # user-facing error message should be localized and sent in the
77
+ # {Google::Rpc::Status#details} field, or localized by the client.
78
+ # @!attribute [rw] details
79
+ # @return [Array<Google::Protobuf::Any>]
80
+ # A list of messages that carry the error details. There is a common set of
81
+ # message types for APIs to use.
82
+ class Status; end
83
+ end
84
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-10 00:00:00.000000000 Z
11
+ date: 2018-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-gax
@@ -105,6 +105,18 @@ files:
105
105
  - LICENSE
106
106
  - README.md
107
107
  - lib/google/cloud/redis.rb
108
+ - lib/google/cloud/redis/v1.rb
109
+ - lib/google/cloud/redis/v1/cloud_redis_client.rb
110
+ - lib/google/cloud/redis/v1/cloud_redis_client_config.json
111
+ - lib/google/cloud/redis/v1/cloud_redis_pb.rb
112
+ - lib/google/cloud/redis/v1/cloud_redis_services_pb.rb
113
+ - lib/google/cloud/redis/v1/credentials.rb
114
+ - lib/google/cloud/redis/v1/doc/google/cloud/redis/v1/cloud_redis.rb
115
+ - lib/google/cloud/redis/v1/doc/google/longrunning/operations.rb
116
+ - lib/google/cloud/redis/v1/doc/google/protobuf/any.rb
117
+ - lib/google/cloud/redis/v1/doc/google/protobuf/field_mask.rb
118
+ - lib/google/cloud/redis/v1/doc/google/protobuf/timestamp.rb
119
+ - lib/google/cloud/redis/v1/doc/google/rpc/status.rb
108
120
  - lib/google/cloud/redis/v1beta1.rb
109
121
  - lib/google/cloud/redis/v1beta1/cloud_redis_client.rb
110
122
  - lib/google/cloud/redis/v1beta1/cloud_redis_client_config.json
@@ -117,7 +129,6 @@ files:
117
129
  - lib/google/cloud/redis/v1beta1/doc/google/protobuf/field_mask.rb
118
130
  - lib/google/cloud/redis/v1beta1/doc/google/protobuf/timestamp.rb
119
131
  - lib/google/cloud/redis/v1beta1/doc/google/rpc/status.rb
120
- - lib/google/cloud/redis/v1beta1/doc/overview.rb
121
132
  homepage: https://github.com/GoogleCloudPlatform/google-cloud-ruby/tree/master/google-cloud-redis
122
133
  licenses:
123
134
  - Apache-2.0
@@ -1,81 +0,0 @@
1
- # Copyright 2018 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- module Google
17
- module Cloud
18
- # rubocop:disable LineLength
19
-
20
- ##
21
- # # Ruby Client for Google Cloud Memorystore for Redis API ([Alpha](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
22
- #
23
- # [Google Cloud Memorystore for Redis API][Product Documentation]:
24
- # The Google Cloud Memorystore for Redis API is used for creating and managing
25
- # Redis instances on the Google Cloud Platform.
26
- # - [Product Documentation][]
27
- #
28
- # ## Quick Start
29
- # In order to use this library, you first need to go through the following
30
- # steps:
31
- #
32
- # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
33
- # 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
34
- # 3. [Enable the Google Cloud Memorystore for Redis API.](https://console.cloud.google.com/apis/library/redis.googleapis.com)
35
- # 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
36
- #
37
- # ### Installation
38
- # ```
39
- # $ gem install google-cloud-redis
40
- # ```
41
- #
42
- # ### Next Steps
43
- # - Read the [Google Cloud Memorystore for Redis API Product documentation][Product Documentation]
44
- # to learn more about the product and see How-to Guides.
45
- # - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
46
- # to see the full list of Cloud APIs that we cover.
47
- #
48
- # [Product Documentation]: https://cloud.google.com/memorystore
49
- #
50
- # ## Enabling Logging
51
- #
52
- # To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
53
- # The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
54
- # or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
55
- # that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
56
- # and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
57
- #
58
- # Configuring a Ruby stdlib logger:
59
- #
60
- # ```ruby
61
- # require "logger"
62
- #
63
- # module MyLogger
64
- # LOGGER = Logger.new $stderr, level: Logger::WARN
65
- # def logger
66
- # LOGGER
67
- # end
68
- # end
69
- #
70
- # # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
71
- # module GRPC
72
- # extend MyLogger
73
- # end
74
- # ```
75
- #
76
- module Redis
77
- module V1beta1
78
- end
79
- end
80
- end
81
- end