strongdm 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +201 -0
- data/README.md +30 -0
- data/doc/Google.html +95 -0
- data/doc/Google/Protobuf.html +95 -0
- data/doc/LICENSE.html +294 -0
- data/doc/Object.html +290 -0
- data/doc/README_md.html +128 -0
- data/doc/SDM.html +143 -0
- data/doc/SDM/AKS.html +347 -0
- data/doc/SDM/AKSBasicAuth.html +279 -0
- data/doc/SDM/AKSServiceAccount.html +262 -0
- data/doc/SDM/AccountAttachment.html +217 -0
- data/doc/SDM/AccountAttachmentCreateOptions.html +182 -0
- data/doc/SDM/AccountAttachmentCreateResponse.html +216 -0
- data/doc/SDM/AccountAttachmentDeleteResponse.html +199 -0
- data/doc/SDM/AccountAttachmentGetResponse.html +215 -0
- data/doc/SDM/AccountAttachments.html +429 -0
- data/doc/SDM/AccountCreateResponse.html +232 -0
- data/doc/SDM/AccountDeleteResponse.html +197 -0
- data/doc/SDM/AccountGetResponse.html +214 -0
- data/doc/SDM/AccountGrant.html +253 -0
- data/doc/SDM/AccountGrantCreateResponse.html +215 -0
- data/doc/SDM/AccountGrantDeleteResponse.html +198 -0
- data/doc/SDM/AccountGrantGetResponse.html +214 -0
- data/doc/SDM/AccountGrants.html +425 -0
- data/doc/SDM/AccountUpdateResponse.html +214 -0
- data/doc/SDM/Accounts.html +492 -0
- data/doc/SDM/AlreadyExistsError.html +161 -0
- data/doc/SDM/AmazonEKS.html +330 -0
- data/doc/SDM/AmazonES.html +296 -0
- data/doc/SDM/Athena.html +296 -0
- data/doc/SDM/AuroraMysql.html +313 -0
- data/doc/SDM/AuroraPostgres.html +330 -0
- data/doc/SDM/AuthenticationError.html +161 -0
- data/doc/SDM/BadRequestError.html +161 -0
- data/doc/SDM/BigQuery.html +296 -0
- data/doc/SDM/Cassandra.html +313 -0
- data/doc/SDM/Client.html +549 -0
- data/doc/SDM/Clustrix.html +313 -0
- data/doc/SDM/Cockroach.html +330 -0
- data/doc/SDM/CreateResponseMetadata.html +156 -0
- data/doc/SDM/DeadlineExceededError.html +161 -0
- data/doc/SDM/DeleteResponseMetadata.html +156 -0
- data/doc/SDM/Druid.html +296 -0
- data/doc/SDM/DynamoDB.html +296 -0
- data/doc/SDM/Elastic.html +313 -0
- data/doc/SDM/ElasticacheRedis.html +296 -0
- data/doc/SDM/Gateway.html +252 -0
- data/doc/SDM/GetResponseMetadata.html +156 -0
- data/doc/SDM/GoogleGKE.html +296 -0
- data/doc/SDM/Greenplum.html +330 -0
- data/doc/SDM/HTTPAuth.html +313 -0
- data/doc/SDM/HTTPBasicAuth.html +330 -0
- data/doc/SDM/HTTPNoAuth.html +296 -0
- data/doc/SDM/InternalError.html +161 -0
- data/doc/SDM/Kubernetes.html +347 -0
- data/doc/SDM/KubernetesBasicAuth.html +279 -0
- data/doc/SDM/KubernetesServiceAccount.html +262 -0
- data/doc/SDM/Maria.html +313 -0
- data/doc/SDM/Memcached.html +262 -0
- data/doc/SDM/Memsql.html +313 -0
- data/doc/SDM/MongoHost.html +330 -0
- data/doc/SDM/MongoLegacyHost.html +347 -0
- data/doc/SDM/MongoLegacyReplicaset.html +364 -0
- data/doc/SDM/MongoReplicaSet.html +364 -0
- data/doc/SDM/Mysql.html +313 -0
- data/doc/SDM/NodeCreateResponse.html +232 -0
- data/doc/SDM/NodeDeleteResponse.html +197 -0
- data/doc/SDM/NodeGetResponse.html +214 -0
- data/doc/SDM/NodeUpdateResponse.html +214 -0
- data/doc/SDM/Nodes.html +493 -0
- data/doc/SDM/NotFoundError.html +161 -0
- data/doc/SDM/Oracle.html +330 -0
- data/doc/SDM/PermissionError.html +161 -0
- data/doc/SDM/Plumbing.html +15821 -0
- data/doc/SDM/Postgres.html +330 -0
- data/doc/SDM/Presto.html +330 -0
- data/doc/SDM/RDP.html +296 -0
- data/doc/SDM/RPCError.html +182 -0
- data/doc/SDM/RateLimitError.html +183 -0
- data/doc/SDM/RateLimitMetadata.html +233 -0
- data/doc/SDM/Redis.html +279 -0
- data/doc/SDM/Redshift.html +330 -0
- data/doc/SDM/Relay.html +216 -0
- data/doc/SDM/ResourceCreateResponse.html +214 -0
- data/doc/SDM/ResourceDeleteResponse.html +197 -0
- data/doc/SDM/ResourceGetResponse.html +214 -0
- data/doc/SDM/ResourceUpdateResponse.html +215 -0
- data/doc/SDM/Resources.html +482 -0
- data/doc/SDM/Role.html +216 -0
- data/doc/SDM/RoleAttachment.html +216 -0
- data/doc/SDM/RoleAttachmentCreateResponse.html +216 -0
- data/doc/SDM/RoleAttachmentDeleteResponse.html +199 -0
- data/doc/SDM/RoleAttachmentGetResponse.html +214 -0
- data/doc/SDM/RoleAttachments.html +427 -0
- data/doc/SDM/RoleCreateResponse.html +215 -0
- data/doc/SDM/RoleDeleteResponse.html +197 -0
- data/doc/SDM/RoleGetResponse.html +214 -0
- data/doc/SDM/RoleGrant.html +214 -0
- data/doc/SDM/RoleGrantCreateResponse.html +215 -0
- data/doc/SDM/RoleGrantDeleteResponse.html +198 -0
- data/doc/SDM/RoleGrantGetResponse.html +214 -0
- data/doc/SDM/RoleGrants.html +427 -0
- data/doc/SDM/RoleUpdateResponse.html +215 -0
- data/doc/SDM/Roles.html +490 -0
- data/doc/SDM/SQLServer.html +347 -0
- data/doc/SDM/SSH.html +296 -0
- data/doc/SDM/Service.html +215 -0
- data/doc/SDM/Snowflake.html +313 -0
- data/doc/SDM/Sybase.html +296 -0
- data/doc/SDM/SybaseIQ.html +296 -0
- data/doc/SDM/Teradata.html +296 -0
- data/doc/SDM/UpdateResponseMetadata.html +156 -0
- data/doc/SDM/User.html +248 -0
- data/doc/V1.html +864 -0
- data/doc/V1/AccountAttachments.html +109 -0
- data/doc/V1/AccountAttachments/Service.html +116 -0
- data/doc/V1/AccountGrants.html +109 -0
- data/doc/V1/AccountGrants/Service.html +117 -0
- data/doc/V1/Accounts.html +109 -0
- data/doc/V1/Accounts/Service.html +122 -0
- data/doc/V1/Nodes.html +109 -0
- data/doc/V1/Nodes/Service.html +124 -0
- data/doc/V1/Resources.html +109 -0
- data/doc/V1/Resources/Service.html +113 -0
- data/doc/V1/RoleAttachments.html +109 -0
- data/doc/V1/RoleAttachments/Service.html +119 -0
- data/doc/V1/RoleGrants.html +109 -0
- data/doc/V1/RoleGrants/Service.html +119 -0
- data/doc/V1/Roles.html +109 -0
- data/doc/V1/Roles/Service.html +120 -0
- data/doc/created.rid +37 -0
- data/doc/css/fonts.css +167 -0
- data/doc/css/rdoc.css +590 -0
- data/doc/examples/Gemfile.html +95 -0
- data/doc/examples/Gemfile_lock.html +112 -0
- data/doc/examples/README_md.html +95 -0
- data/doc/fonts/Lato-Light.ttf +0 -0
- data/doc/fonts/Lato-LightItalic.ttf +0 -0
- data/doc/fonts/Lato-Regular.ttf +0 -0
- data/doc/fonts/Lato-RegularItalic.ttf +0 -0
- data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +353 -0
- data/doc/js/darkfish.js +161 -0
- data/doc/js/jquery.js +4 -0
- data/doc/js/navigation.js +142 -0
- data/doc/js/navigation.js.gz +0 -0
- data/doc/js/search.js +109 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/search_index.js.gz +0 -0
- data/doc/js/searcher.js +228 -0
- data/doc/js/searcher.js.gz +0 -0
- data/doc/lib/version.html +98 -0
- data/doc/strongdm_gemspec.html +117 -0
- data/doc/table_of_contents.html +3002 -0
- data/examples/Gemfile +3 -0
- data/examples/Gemfile.lock +14 -0
- data/examples/README.md +5 -0
- data/examples/listUsers.rb +21 -0
- data/examples/panicButton.rb +154 -0
- data/lib/errors/errors.rb +85 -0
- data/lib/grpc/account_attachments_pb.rb +84 -0
- data/lib/grpc/account_attachments_services_pb.rb +44 -0
- data/lib/grpc/account_grants_pb.rb +82 -0
- data/lib/grpc/account_grants_services_pb.rb +44 -0
- data/lib/grpc/accounts_pb.rb +107 -0
- data/lib/grpc/accounts_services_pb.rb +49 -0
- data/lib/grpc/drivers_pb.rb +601 -0
- data/lib/grpc/nodes_pb.rb +107 -0
- data/lib/grpc/nodes_services_pb.rb +49 -0
- data/lib/grpc/options_pb.rb +60 -0
- data/lib/grpc/plumbing.rb +4283 -0
- data/lib/grpc/protoc-gen-swagger/options/annotations_pb.rb +15 -0
- data/lib/grpc/resources_pb.rb +85 -0
- data/lib/grpc/resources_services_pb.rb +45 -0
- data/lib/grpc/role_attachments_pb.rb +79 -0
- data/lib/grpc/role_attachments_services_pb.rb +47 -0
- data/lib/grpc/role_grants_pb.rb +79 -0
- data/lib/grpc/role_grants_services_pb.rb +47 -0
- data/lib/grpc/roles_pb.rb +91 -0
- data/lib/grpc/roles_services_pb.rb +50 -0
- data/lib/grpc/spec_pb.rb +95 -0
- data/lib/models/porcelain.rb +4033 -0
- data/lib/strongdm.rb +128 -0
- data/lib/svc.rb +1331 -0
- data/lib/version +3 -0
- data/lib/version.rb +17 -0
- data/strongdm.gemspec +23 -0
- metadata +318 -0
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
|
|
7
|
+
<title>class SDM::Cassandra - RDoc Documentation</title>
|
|
8
|
+
|
|
9
|
+
<script type="text/javascript">
|
|
10
|
+
var rdoc_rel_prefix = "../";
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<script src="../js/jquery.js"></script>
|
|
14
|
+
<script src="../js/darkfish.js"></script>
|
|
15
|
+
|
|
16
|
+
<link href="../css/fonts.css" rel="stylesheet">
|
|
17
|
+
<link href="../css/rdoc.css" rel="stylesheet">
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
<body id="top" role="document" class="class">
|
|
22
|
+
<nav role="navigation">
|
|
23
|
+
<div id="project-navigation">
|
|
24
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
|
25
|
+
<h2>
|
|
26
|
+
<a href="../index.html" rel="home">Home</a>
|
|
27
|
+
</h2>
|
|
28
|
+
|
|
29
|
+
<div id="table-of-contents-navigation">
|
|
30
|
+
<a href="../table_of_contents.html#pages">Pages</a>
|
|
31
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
|
32
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
|
37
|
+
<form action="#" method="get" accept-charset="utf-8">
|
|
38
|
+
<div id="search-field-wrapper">
|
|
39
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
|
40
|
+
aria-autocomplete="list" aria-controls="search-results"
|
|
41
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
|
42
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<ul id="search-results" aria-label="Search Results"
|
|
46
|
+
aria-busy="false" aria-expanded="false"
|
|
47
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
|
48
|
+
</form>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
<div id="class-metadata">
|
|
56
|
+
|
|
57
|
+
<div id="parent-class-section" class="nav-section">
|
|
58
|
+
<h3>Parent</h3>
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
<p class="link"><a href="../Object.html">Object</a>
|
|
62
|
+
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
<!-- Method Quickref -->
|
|
68
|
+
<div id="method-list-section" class="nav-section">
|
|
69
|
+
<h3>Methods</h3>
|
|
70
|
+
|
|
71
|
+
<ul class="link-list" role="directory">
|
|
72
|
+
|
|
73
|
+
<li ><a href="#method-c-new">::new</a>
|
|
74
|
+
|
|
75
|
+
</ul>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
</div>
|
|
79
|
+
</nav>
|
|
80
|
+
|
|
81
|
+
<main role="main" aria-labelledby="class-SDM::Cassandra">
|
|
82
|
+
<h1 id="class-SDM::Cassandra" class="class">
|
|
83
|
+
class SDM::Cassandra
|
|
84
|
+
</h1>
|
|
85
|
+
|
|
86
|
+
<section class="description">
|
|
87
|
+
|
|
88
|
+
</section>
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
<section class="attribute-method-details" class="method-section">
|
|
102
|
+
<header>
|
|
103
|
+
<h3>Attributes</h3>
|
|
104
|
+
</header>
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
<div id="attribute-i-healthy" class="method-detail">
|
|
108
|
+
<div class="method-heading attribute-method-heading">
|
|
109
|
+
<span class="method-name">healthy</span><span
|
|
110
|
+
class="attribute-access-type">[RW]</span>
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
<div class="method-description">
|
|
114
|
+
|
|
115
|
+
<p>True if the datasource is reachable and the credentials are valid.</p>
|
|
116
|
+
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
<div id="attribute-i-hostname" class="method-detail">
|
|
121
|
+
<div class="method-heading attribute-method-heading">
|
|
122
|
+
<span class="method-name">hostname</span><span
|
|
123
|
+
class="attribute-access-type">[RW]</span>
|
|
124
|
+
</div>
|
|
125
|
+
|
|
126
|
+
<div class="method-description">
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
<div id="attribute-i-id" class="method-detail">
|
|
134
|
+
<div class="method-heading attribute-method-heading">
|
|
135
|
+
<span class="method-name">id</span><span
|
|
136
|
+
class="attribute-access-type">[RW]</span>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<div class="method-description">
|
|
140
|
+
|
|
141
|
+
<p>Unique identifier of the Resource.</p>
|
|
142
|
+
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
|
|
146
|
+
<div id="attribute-i-name" class="method-detail">
|
|
147
|
+
<div class="method-heading attribute-method-heading">
|
|
148
|
+
<span class="method-name">name</span><span
|
|
149
|
+
class="attribute-access-type">[RW]</span>
|
|
150
|
+
</div>
|
|
151
|
+
|
|
152
|
+
<div class="method-description">
|
|
153
|
+
|
|
154
|
+
<p>Unique human-readable name of the Resource.</p>
|
|
155
|
+
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
|
|
159
|
+
<div id="attribute-i-password" class="method-detail">
|
|
160
|
+
<div class="method-heading attribute-method-heading">
|
|
161
|
+
<span class="method-name">password</span><span
|
|
162
|
+
class="attribute-access-type">[RW]</span>
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
<div class="method-description">
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
<div id="attribute-i-port" class="method-detail">
|
|
173
|
+
<div class="method-heading attribute-method-heading">
|
|
174
|
+
<span class="method-name">port</span><span
|
|
175
|
+
class="attribute-access-type">[RW]</span>
|
|
176
|
+
</div>
|
|
177
|
+
|
|
178
|
+
<div class="method-description">
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
|
|
185
|
+
<div id="attribute-i-port_override" class="method-detail">
|
|
186
|
+
<div class="method-heading attribute-method-heading">
|
|
187
|
+
<span class="method-name">port_override</span><span
|
|
188
|
+
class="attribute-access-type">[RW]</span>
|
|
189
|
+
</div>
|
|
190
|
+
|
|
191
|
+
<div class="method-description">
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
</div>
|
|
196
|
+
</div>
|
|
197
|
+
|
|
198
|
+
<div id="attribute-i-tls_required" class="method-detail">
|
|
199
|
+
<div class="method-heading attribute-method-heading">
|
|
200
|
+
<span class="method-name">tls_required</span><span
|
|
201
|
+
class="attribute-access-type">[RW]</span>
|
|
202
|
+
</div>
|
|
203
|
+
|
|
204
|
+
<div class="method-description">
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
</div>
|
|
209
|
+
</div>
|
|
210
|
+
|
|
211
|
+
<div id="attribute-i-username" class="method-detail">
|
|
212
|
+
<div class="method-heading attribute-method-heading">
|
|
213
|
+
<span class="method-name">username</span><span
|
|
214
|
+
class="attribute-access-type">[RW]</span>
|
|
215
|
+
</div>
|
|
216
|
+
|
|
217
|
+
<div class="method-description">
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
</div>
|
|
222
|
+
</div>
|
|
223
|
+
|
|
224
|
+
</section>
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
|
229
|
+
<header>
|
|
230
|
+
<h3>Public Class Methods</h3>
|
|
231
|
+
</header>
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
<div id="method-c-new" class="method-detail ">
|
|
235
|
+
|
|
236
|
+
<div class="method-heading">
|
|
237
|
+
<span class="method-name">new</span><span
|
|
238
|
+
class="method-args">( id:nil \ , name:nil \ , healthy:nil \ , hostname:nil \ , username:nil \ , password:nil \ , port_override:nil \ , port:nil \ , tls_required:nil \ )</span>
|
|
239
|
+
|
|
240
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
241
|
+
|
|
242
|
+
</div>
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
<div class="method-description">
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
<div class="method-source-code" id="new-source">
|
|
253
|
+
<pre><span class="ruby-comment"># File lib/models/porcelain.rb, line 618</span>
|
|
254
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(
|
|
255
|
+
<span class="ruby-identifier">id</span><span class="ruby-value">:nil</span> ,
|
|
256
|
+
<span class="ruby-identifier">name</span><span class="ruby-value">:nil</span> ,
|
|
257
|
+
<span class="ruby-identifier">healthy</span><span class="ruby-value">:nil</span> ,
|
|
258
|
+
<span class="ruby-identifier">hostname</span><span class="ruby-value">:nil</span> ,
|
|
259
|
+
<span class="ruby-identifier">username</span><span class="ruby-value">:nil</span> ,
|
|
260
|
+
<span class="ruby-identifier">password</span><span class="ruby-value">:nil</span> ,
|
|
261
|
+
<span class="ruby-identifier">port_override</span><span class="ruby-value">:nil</span> ,
|
|
262
|
+
<span class="ruby-identifier">port</span><span class="ruby-value">:nil</span> ,
|
|
263
|
+
<span class="ruby-identifier">tls_required</span><span class="ruby-value">:nil</span> )
|
|
264
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">id</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
|
|
265
|
+
<span class="ruby-ivar">@id</span> = <span class="ruby-identifier">id</span>
|
|
266
|
+
<span class="ruby-keyword">end</span>
|
|
267
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">name</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
|
|
268
|
+
<span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span>
|
|
269
|
+
<span class="ruby-keyword">end</span>
|
|
270
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">healthy</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
|
|
271
|
+
<span class="ruby-ivar">@healthy</span> = <span class="ruby-identifier">healthy</span>
|
|
272
|
+
<span class="ruby-keyword">end</span>
|
|
273
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">hostname</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
|
|
274
|
+
<span class="ruby-ivar">@hostname</span> = <span class="ruby-identifier">hostname</span>
|
|
275
|
+
<span class="ruby-keyword">end</span>
|
|
276
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">username</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
|
|
277
|
+
<span class="ruby-ivar">@username</span> = <span class="ruby-identifier">username</span>
|
|
278
|
+
<span class="ruby-keyword">end</span>
|
|
279
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">password</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
|
|
280
|
+
<span class="ruby-ivar">@password</span> = <span class="ruby-identifier">password</span>
|
|
281
|
+
<span class="ruby-keyword">end</span>
|
|
282
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">port_override</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
|
|
283
|
+
<span class="ruby-ivar">@port_override</span> = <span class="ruby-identifier">port_override</span>
|
|
284
|
+
<span class="ruby-keyword">end</span>
|
|
285
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">port</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
|
|
286
|
+
<span class="ruby-ivar">@port</span> = <span class="ruby-identifier">port</span>
|
|
287
|
+
<span class="ruby-keyword">end</span>
|
|
288
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">tls_required</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">nil</span>
|
|
289
|
+
<span class="ruby-ivar">@tls_required</span> = <span class="ruby-identifier">tls_required</span>
|
|
290
|
+
<span class="ruby-keyword">end</span>
|
|
291
|
+
<span class="ruby-keyword">end</span></pre>
|
|
292
|
+
</div>
|
|
293
|
+
|
|
294
|
+
</div>
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
</div>
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
</section>
|
|
303
|
+
|
|
304
|
+
</section>
|
|
305
|
+
</main>
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
<footer id="validator-badges" role="contentinfo">
|
|
309
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
|
310
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.1.
|
|
311
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
|
312
|
+
</footer>
|
|
313
|
+
|
data/doc/SDM/Client.html
ADDED
|
@@ -0,0 +1,549 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
|
|
7
|
+
<title>class SDM::Client - RDoc Documentation</title>
|
|
8
|
+
|
|
9
|
+
<script type="text/javascript">
|
|
10
|
+
var rdoc_rel_prefix = "../";
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<script src="../js/jquery.js"></script>
|
|
14
|
+
<script src="../js/darkfish.js"></script>
|
|
15
|
+
|
|
16
|
+
<link href="../css/fonts.css" rel="stylesheet">
|
|
17
|
+
<link href="../css/rdoc.css" rel="stylesheet">
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
<body id="top" role="document" class="class">
|
|
22
|
+
<nav role="navigation">
|
|
23
|
+
<div id="project-navigation">
|
|
24
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
|
25
|
+
<h2>
|
|
26
|
+
<a href="../index.html" rel="home">Home</a>
|
|
27
|
+
</h2>
|
|
28
|
+
|
|
29
|
+
<div id="table-of-contents-navigation">
|
|
30
|
+
<a href="../table_of_contents.html#pages">Pages</a>
|
|
31
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
|
32
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
|
37
|
+
<form action="#" method="get" accept-charset="utf-8">
|
|
38
|
+
<div id="search-field-wrapper">
|
|
39
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
|
40
|
+
aria-autocomplete="list" aria-controls="search-results"
|
|
41
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
|
42
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<ul id="search-results" aria-label="Search Results"
|
|
46
|
+
aria-busy="false" aria-expanded="false"
|
|
47
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
|
48
|
+
</form>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
<div id="class-metadata">
|
|
56
|
+
|
|
57
|
+
<div id="parent-class-section" class="nav-section">
|
|
58
|
+
<h3>Parent</h3>
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
<p class="link"><a href="../Object.html">Object</a>
|
|
62
|
+
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
<!-- Method Quickref -->
|
|
68
|
+
<div id="method-list-section" class="nav-section">
|
|
69
|
+
<h3>Methods</h3>
|
|
70
|
+
|
|
71
|
+
<ul class="link-list" role="directory">
|
|
72
|
+
|
|
73
|
+
<li ><a href="#method-c-new">::new</a>
|
|
74
|
+
|
|
75
|
+
<li ><a href="#method-i-get_metadata">#get_metadata</a>
|
|
76
|
+
|
|
77
|
+
<li ><a href="#method-i-jitterSleep">#jitterSleep</a>
|
|
78
|
+
|
|
79
|
+
<li ><a href="#method-i-shouldRetry">#shouldRetry</a>
|
|
80
|
+
|
|
81
|
+
<li ><a href="#method-i-sign">#sign</a>
|
|
82
|
+
|
|
83
|
+
</ul>
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
</div>
|
|
87
|
+
</nav>
|
|
88
|
+
|
|
89
|
+
<main role="main" aria-labelledby="class-SDM::Client">
|
|
90
|
+
<h1 id="class-SDM::Client" class="class">
|
|
91
|
+
class SDM::Client
|
|
92
|
+
</h1>
|
|
93
|
+
|
|
94
|
+
<section class="description">
|
|
95
|
+
|
|
96
|
+
<p><a href="Client.html">Client</a> bundles all the services together and
|
|
97
|
+
initializes them.</p>
|
|
98
|
+
|
|
99
|
+
</section>
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
<section class="attribute-method-details" class="method-section">
|
|
113
|
+
<header>
|
|
114
|
+
<h3>Attributes</h3>
|
|
115
|
+
</header>
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
<div id="attribute-i-_test_options" class="method-detail">
|
|
119
|
+
<div class="method-heading attribute-method-heading">
|
|
120
|
+
<span class="method-name">_test_options</span><span
|
|
121
|
+
class="attribute-access-type">[R]</span>
|
|
122
|
+
</div>
|
|
123
|
+
|
|
124
|
+
<div class="method-description">
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<div id="attribute-i-account_attachments" class="method-detail">
|
|
132
|
+
<div class="method-heading attribute-method-heading">
|
|
133
|
+
<span class="method-name">account_attachments</span><span
|
|
134
|
+
class="attribute-access-type">[R]</span>
|
|
135
|
+
</div>
|
|
136
|
+
|
|
137
|
+
<div class="method-description">
|
|
138
|
+
|
|
139
|
+
<p><a href="AccountAttachments.html">AccountAttachments</a> assign an account
|
|
140
|
+
to a role.</p>
|
|
141
|
+
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
|
|
145
|
+
<div id="attribute-i-account_grants" class="method-detail">
|
|
146
|
+
<div class="method-heading attribute-method-heading">
|
|
147
|
+
<span class="method-name">account_grants</span><span
|
|
148
|
+
class="attribute-access-type">[R]</span>
|
|
149
|
+
</div>
|
|
150
|
+
|
|
151
|
+
<div class="method-description">
|
|
152
|
+
|
|
153
|
+
<p><a href="AccountGrants.html">AccountGrants</a> connect a resource directly
|
|
154
|
+
to an account, giving the account the permission to connect to that
|
|
155
|
+
resource.</p>
|
|
156
|
+
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
|
|
160
|
+
<div id="attribute-i-accounts" class="method-detail">
|
|
161
|
+
<div class="method-heading attribute-method-heading">
|
|
162
|
+
<span class="method-name">accounts</span><span
|
|
163
|
+
class="attribute-access-type">[R]</span>
|
|
164
|
+
</div>
|
|
165
|
+
|
|
166
|
+
<div class="method-description">
|
|
167
|
+
|
|
168
|
+
<p><a href="Accounts.html">Accounts</a> are users that have access to
|
|
169
|
+
strongDM. There are two types of accounts:</p>
|
|
170
|
+
<ol><li>
|
|
171
|
+
<p>**Regular users:** humans who are authenticated through username and
|
|
172
|
+
password or SSO</p>
|
|
173
|
+
</li><li>
|
|
174
|
+
<p>**Service users:** machines that are authneticated using a service token</p>
|
|
175
|
+
</li></ol>
|
|
176
|
+
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
|
|
180
|
+
<div id="attribute-i-api_access_key" class="method-detail">
|
|
181
|
+
<div class="method-heading attribute-method-heading">
|
|
182
|
+
<span class="method-name">api_access_key</span><span
|
|
183
|
+
class="attribute-access-type">[R]</span>
|
|
184
|
+
</div>
|
|
185
|
+
|
|
186
|
+
<div class="method-description">
|
|
187
|
+
|
|
188
|
+
<p>API authentication token (read-only).</p>
|
|
189
|
+
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
192
|
+
|
|
193
|
+
<div id="attribute-i-base_retry_delay" class="method-detail">
|
|
194
|
+
<div class="method-heading attribute-method-heading">
|
|
195
|
+
<span class="method-name">base_retry_delay</span><span
|
|
196
|
+
class="attribute-access-type">[R]</span>
|
|
197
|
+
</div>
|
|
198
|
+
|
|
199
|
+
<div class="method-description">
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
|
|
206
|
+
<div id="attribute-i-max_retries" class="method-detail">
|
|
207
|
+
<div class="method-heading attribute-method-heading">
|
|
208
|
+
<span class="method-name">max_retries</span><span
|
|
209
|
+
class="attribute-access-type">[R]</span>
|
|
210
|
+
</div>
|
|
211
|
+
|
|
212
|
+
<div class="method-description">
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
</div>
|
|
217
|
+
</div>
|
|
218
|
+
|
|
219
|
+
<div id="attribute-i-max_retry_delay" class="method-detail">
|
|
220
|
+
<div class="method-heading attribute-method-heading">
|
|
221
|
+
<span class="method-name">max_retry_delay</span><span
|
|
222
|
+
class="attribute-access-type">[R]</span>
|
|
223
|
+
</div>
|
|
224
|
+
|
|
225
|
+
<div class="method-description">
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
</div>
|
|
230
|
+
</div>
|
|
231
|
+
|
|
232
|
+
<div id="attribute-i-nodes" class="method-detail">
|
|
233
|
+
<div class="method-heading attribute-method-heading">
|
|
234
|
+
<span class="method-name">nodes</span><span
|
|
235
|
+
class="attribute-access-type">[R]</span>
|
|
236
|
+
</div>
|
|
237
|
+
|
|
238
|
+
<div class="method-description">
|
|
239
|
+
|
|
240
|
+
<p><a href="Nodes.html">Nodes</a> make up the strongDM network, and allow your
|
|
241
|
+
users to connect securely to your resources. There are two types of nodes:</p>
|
|
242
|
+
<ol><li>
|
|
243
|
+
<p>*<strong>Relay:</strong>* creates connectivity to your datasources, while
|
|
244
|
+
maintaining the egress-only nature of your firewall</p>
|
|
245
|
+
</li><li>
|
|
246
|
+
<p>*<strong>Gateways:</strong>* a relay that also listens for connections from
|
|
247
|
+
strongDM clients</p>
|
|
248
|
+
</li></ol>
|
|
249
|
+
|
|
250
|
+
</div>
|
|
251
|
+
</div>
|
|
252
|
+
|
|
253
|
+
<div id="attribute-i-resources" class="method-detail">
|
|
254
|
+
<div class="method-heading attribute-method-heading">
|
|
255
|
+
<span class="method-name">resources</span><span
|
|
256
|
+
class="attribute-access-type">[R]</span>
|
|
257
|
+
</div>
|
|
258
|
+
|
|
259
|
+
<div class="method-description">
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
</div>
|
|
264
|
+
</div>
|
|
265
|
+
|
|
266
|
+
<div id="attribute-i-role_attachments" class="method-detail">
|
|
267
|
+
<div class="method-heading attribute-method-heading">
|
|
268
|
+
<span class="method-name">role_attachments</span><span
|
|
269
|
+
class="attribute-access-type">[R]</span>
|
|
270
|
+
</div>
|
|
271
|
+
|
|
272
|
+
<div class="method-description">
|
|
273
|
+
|
|
274
|
+
<p><a href="RoleAttachments.html">RoleAttachments</a> represent relationships
|
|
275
|
+
between composite roles and the roles that make up those composite roles.
|
|
276
|
+
When a composite role is attached to another role, the permissions granted
|
|
277
|
+
to members of the composite role are augmented to include the permissions
|
|
278
|
+
granted to members of the attached role.</p>
|
|
279
|
+
|
|
280
|
+
</div>
|
|
281
|
+
</div>
|
|
282
|
+
|
|
283
|
+
<div id="attribute-i-role_grants" class="method-detail">
|
|
284
|
+
<div class="method-heading attribute-method-heading">
|
|
285
|
+
<span class="method-name">role_grants</span><span
|
|
286
|
+
class="attribute-access-type">[R]</span>
|
|
287
|
+
</div>
|
|
288
|
+
|
|
289
|
+
<div class="method-description">
|
|
290
|
+
|
|
291
|
+
<p><a href="RoleGrants.html">RoleGrants</a> represent relationships between
|
|
292
|
+
composite roles and the roles that make up those composite roles. When a
|
|
293
|
+
composite role is attached to another role, the permissions granted to
|
|
294
|
+
members of the composite role are augmented to include the permissions
|
|
295
|
+
granted to members of the attached role.</p>
|
|
296
|
+
|
|
297
|
+
</div>
|
|
298
|
+
</div>
|
|
299
|
+
|
|
300
|
+
<div id="attribute-i-roles" class="method-detail">
|
|
301
|
+
<div class="method-heading attribute-method-heading">
|
|
302
|
+
<span class="method-name">roles</span><span
|
|
303
|
+
class="attribute-access-type">[R]</span>
|
|
304
|
+
</div>
|
|
305
|
+
|
|
306
|
+
<div class="method-description">
|
|
307
|
+
|
|
308
|
+
<p><a href="Roles.html">Roles</a> are tools for controlling user access to
|
|
309
|
+
resources. Each <a href="Role.html">Role</a> holds a list of resources
|
|
310
|
+
which they grant access to. Composite roles are a special type of <a
|
|
311
|
+
href="Role.html">Role</a> which have no resource associations of their own,
|
|
312
|
+
but instead grant access to the combined resources associated with a set of
|
|
313
|
+
child roles. Each user can be a member of one <a href="Role.html">Role</a>
|
|
314
|
+
or composite role.</p>
|
|
315
|
+
|
|
316
|
+
</div>
|
|
317
|
+
</div>
|
|
318
|
+
|
|
319
|
+
</section>
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
|
324
|
+
<header>
|
|
325
|
+
<h3>Public Class Methods</h3>
|
|
326
|
+
</header>
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
<div id="method-c-new" class="method-detail ">
|
|
330
|
+
|
|
331
|
+
<div class="method-heading">
|
|
332
|
+
<span class="method-name">new</span><span
|
|
333
|
+
class="method-args">(api_access_key, api_secret_key, host:"api.strongdm.com:443", insecure:false)</span>
|
|
334
|
+
|
|
335
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
336
|
+
|
|
337
|
+
</div>
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
<div class="method-description">
|
|
341
|
+
|
|
342
|
+
<p>Creates a new strongDM API client.</p>
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
<div class="method-source-code" id="new-source">
|
|
348
|
+
<pre><span class="ruby-comment"># File lib/strongdm.rb, line 31</span>
|
|
349
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">api_access_key</span>, <span class="ruby-identifier">api_secret_key</span>, <span class="ruby-identifier">host</span><span class="ruby-value">:"api.strongdm.com:443"</span>, <span class="ruby-identifier">insecure</span><span class="ruby-value">:false</span>)
|
|
350
|
+
<span class="ruby-ivar">@api_access_key</span> = <span class="ruby-identifier">api_access_key</span>
|
|
351
|
+
<span class="ruby-ivar">@api_secret_key</span> = <span class="ruby-constant">Base64</span>.<span class="ruby-identifier">strict_decode64</span>(<span class="ruby-identifier">api_secret_key</span>)
|
|
352
|
+
<span class="ruby-ivar">@max_retries</span> = <span class="ruby-constant">DEFAULT_MAX_RETRIES</span>
|
|
353
|
+
<span class="ruby-ivar">@base_retry_delay</span> = <span class="ruby-constant">DEFAULT_BASE_RETRY_DELAY</span>
|
|
354
|
+
<span class="ruby-ivar">@max_retry_delay</span> = <span class="ruby-constant">DEFAULT_MAX_RETRY_DELAY</span>
|
|
355
|
+
<span class="ruby-ivar">@account_attachments</span> = <span class="ruby-constant">AccountAttachments</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">host</span>, <span class="ruby-identifier">insecure</span>, <span class="ruby-keyword">self</span>)
|
|
356
|
+
<span class="ruby-ivar">@account_grants</span> = <span class="ruby-constant">AccountGrants</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">host</span>, <span class="ruby-identifier">insecure</span>, <span class="ruby-keyword">self</span>)
|
|
357
|
+
<span class="ruby-ivar">@accounts</span> = <span class="ruby-constant">Accounts</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">host</span>, <span class="ruby-identifier">insecure</span>, <span class="ruby-keyword">self</span>)
|
|
358
|
+
<span class="ruby-ivar">@nodes</span> = <span class="ruby-constant">Nodes</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">host</span>, <span class="ruby-identifier">insecure</span>, <span class="ruby-keyword">self</span>)
|
|
359
|
+
<span class="ruby-ivar">@resources</span> = <span class="ruby-constant">Resources</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">host</span>, <span class="ruby-identifier">insecure</span>, <span class="ruby-keyword">self</span>)
|
|
360
|
+
<span class="ruby-ivar">@role_attachments</span> = <span class="ruby-constant">RoleAttachments</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">host</span>, <span class="ruby-identifier">insecure</span>, <span class="ruby-keyword">self</span>)
|
|
361
|
+
<span class="ruby-ivar">@role_grants</span> = <span class="ruby-constant">RoleGrants</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">host</span>, <span class="ruby-identifier">insecure</span>, <span class="ruby-keyword">self</span>)
|
|
362
|
+
<span class="ruby-ivar">@roles</span> = <span class="ruby-constant">Roles</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">host</span>, <span class="ruby-identifier">insecure</span>, <span class="ruby-keyword">self</span>)
|
|
363
|
+
<span class="ruby-ivar">@_test_options</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
|
|
364
|
+
<span class="ruby-keyword">end</span></pre>
|
|
365
|
+
</div>
|
|
366
|
+
|
|
367
|
+
</div>
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
</div>
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
</section>
|
|
376
|
+
|
|
377
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
|
378
|
+
<header>
|
|
379
|
+
<h3>Public Instance Methods</h3>
|
|
380
|
+
</header>
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
<div id="method-i-get_metadata" class="method-detail ">
|
|
384
|
+
|
|
385
|
+
<div class="method-heading">
|
|
386
|
+
<span class="method-name">get_metadata</span><span
|
|
387
|
+
class="method-args">(method_name, req)</span>
|
|
388
|
+
|
|
389
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
390
|
+
|
|
391
|
+
</div>
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
<div class="method-description">
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
<div class="method-source-code" id="get_metadata-source">
|
|
402
|
+
<pre><span class="ruby-comment"># File lib/strongdm.rb, line 48</span>
|
|
403
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_metadata</span>(<span class="ruby-identifier">method_name</span>, <span class="ruby-identifier">req</span>)
|
|
404
|
+
<span class="ruby-keyword">return</span> { <span class="ruby-string">'x-sdm-authentication'</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@api_access_key</span>,<span class="ruby-string">'x-sdm-signature'</span><span class="ruby-operator">:</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">sign</span>(<span class="ruby-identifier">method_name</span>, <span class="ruby-identifier">req</span>.<span class="ruby-identifier">to_proto</span>)}
|
|
405
|
+
<span class="ruby-keyword">end</span></pre>
|
|
406
|
+
</div>
|
|
407
|
+
|
|
408
|
+
</div>
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
</div>
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
<div id="method-i-jitterSleep" class="method-detail ">
|
|
417
|
+
|
|
418
|
+
<div class="method-heading">
|
|
419
|
+
<span class="method-name">jitterSleep</span><span
|
|
420
|
+
class="method-args">(iter)</span>
|
|
421
|
+
|
|
422
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
423
|
+
|
|
424
|
+
</div>
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
<div class="method-description">
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
<div class="method-source-code" id="jitterSleep-source">
|
|
435
|
+
<pre><span class="ruby-comment"># File lib/strongdm.rb, line 68</span>
|
|
436
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">jitterSleep</span>(<span class="ruby-identifier">iter</span>)
|
|
437
|
+
<span class="ruby-identifier">dur_max</span> = <span class="ruby-ivar">@base_retry_delay</span> <span class="ruby-operator">*</span> <span class="ruby-value">2</span><span class="ruby-operator">**</span><span class="ruby-identifier">iter</span>
|
|
438
|
+
<span class="ruby-keyword">if</span> (<span class="ruby-identifier">dur_max</span> <span class="ruby-operator">></span> <span class="ruby-ivar">@max_retry_delay</span>)
|
|
439
|
+
<span class="ruby-identifier">dur_max</span> = <span class="ruby-ivar">@max_retry_delay</span>
|
|
440
|
+
<span class="ruby-keyword">end</span>
|
|
441
|
+
<span class="ruby-identifier">dur</span> = <span class="ruby-identifier">rand</span>() <span class="ruby-operator">*</span> <span class="ruby-identifier">dur_max</span>
|
|
442
|
+
<span class="ruby-identifier">sleep</span>(<span class="ruby-identifier">dur</span>)
|
|
443
|
+
<span class="ruby-keyword">end</span></pre>
|
|
444
|
+
</div>
|
|
445
|
+
|
|
446
|
+
</div>
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
</div>
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
<div id="method-i-shouldRetry" class="method-detail ">
|
|
455
|
+
|
|
456
|
+
<div class="method-heading">
|
|
457
|
+
<span class="method-name">shouldRetry</span><span
|
|
458
|
+
class="method-args">(iter, err)</span>
|
|
459
|
+
|
|
460
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
461
|
+
|
|
462
|
+
</div>
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
<div class="method-description">
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
<div class="method-source-code" id="shouldRetry-source">
|
|
473
|
+
<pre><span class="ruby-comment"># File lib/strongdm.rb, line 77</span>
|
|
474
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">shouldRetry</span>(<span class="ruby-identifier">iter</span>, <span class="ruby-identifier">err</span>)
|
|
475
|
+
<span class="ruby-keyword">if</span> (<span class="ruby-identifier">iter</span> <span class="ruby-operator">>=</span> <span class="ruby-ivar">@max_retries</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>)
|
|
476
|
+
<span class="ruby-keyword">return</span> <span class="ruby-keyword">false</span>
|
|
477
|
+
<span class="ruby-keyword">end</span>
|
|
478
|
+
<span class="ruby-keyword">if</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">err</span> .<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">GRPC</span><span class="ruby-operator">::</span><span class="ruby-constant">BadStatus</span>
|
|
479
|
+
<span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span>
|
|
480
|
+
<span class="ruby-keyword">end</span>
|
|
481
|
+
<span class="ruby-keyword">return</span> <span class="ruby-identifier">err</span>.<span class="ruby-identifier">code</span>() <span class="ruby-operator">==</span> <span class="ruby-value">13</span>
|
|
482
|
+
<span class="ruby-keyword">end</span></pre>
|
|
483
|
+
</div>
|
|
484
|
+
|
|
485
|
+
</div>
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
</div>
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
<div id="method-i-sign" class="method-detail ">
|
|
494
|
+
|
|
495
|
+
<div class="method-heading">
|
|
496
|
+
<span class="method-name">sign</span><span
|
|
497
|
+
class="method-args">(method_name, msg_bytes)</span>
|
|
498
|
+
|
|
499
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
500
|
+
|
|
501
|
+
</div>
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
<div class="method-description">
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
<div class="method-source-code" id="sign-source">
|
|
512
|
+
<pre><span class="ruby-comment"># File lib/strongdm.rb, line 52</span>
|
|
513
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">sign</span>(<span class="ruby-identifier">method_name</span>, <span class="ruby-identifier">msg_bytes</span>)
|
|
514
|
+
<span class="ruby-identifier">current_utc_date</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">utc</span>
|
|
515
|
+
<span class="ruby-identifier">date</span> = <span class="ruby-identifier">sprintf</span>(<span class="ruby-string">"%04d-%02d-%02d"</span>,<span class="ruby-identifier">current_utc_date</span>.<span class="ruby-identifier">year</span>, <span class="ruby-identifier">current_utc_date</span>.<span class="ruby-identifier">month</span>, <span class="ruby-identifier">current_utc_date</span>.<span class="ruby-identifier">day</span>)
|
|
516
|
+
|
|
517
|
+
<span class="ruby-identifier">signing_key</span> = <span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">HMAC</span>.<span class="ruby-identifier">digest</span>(<span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">SHA256</span>.<span class="ruby-identifier">new</span>, <span class="ruby-ivar">@api_secret_key</span>, <span class="ruby-identifier">date</span>)
|
|
518
|
+
<span class="ruby-identifier">signing_key</span> = <span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">HMAC</span>.<span class="ruby-identifier">digest</span>(<span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">SHA256</span>.<span class="ruby-identifier">new</span>, <span class="ruby-identifier">signing_key</span>, <span class="ruby-string">'sdm_api_v1'</span>)
|
|
519
|
+
|
|
520
|
+
<span class="ruby-identifier">sha_req</span> = <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">SHA256</span>.<span class="ruby-identifier">new</span>
|
|
521
|
+
<span class="ruby-identifier">sha_req</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">method_name</span>
|
|
522
|
+
<span class="ruby-identifier">sha_req</span> <span class="ruby-operator"><<</span> <span class="ruby-string">"\n"</span>
|
|
523
|
+
<span class="ruby-identifier">sha_req</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">msg_bytes</span>
|
|
524
|
+
<span class="ruby-identifier">request_hash</span> = <span class="ruby-identifier">sha_req</span>.<span class="ruby-identifier">digest</span>
|
|
525
|
+
|
|
526
|
+
<span class="ruby-keyword">return</span> <span class="ruby-constant">Base64</span>.<span class="ruby-identifier">strict_encode64</span>(<span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">HMAC</span>.<span class="ruby-identifier">digest</span>(<span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">SHA256</span>.<span class="ruby-identifier">new</span>, <span class="ruby-identifier">signing_key</span>, <span class="ruby-identifier">request_hash</span>))
|
|
527
|
+
<span class="ruby-keyword">end</span></pre>
|
|
528
|
+
</div>
|
|
529
|
+
|
|
530
|
+
</div>
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
</div>
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
</section>
|
|
539
|
+
|
|
540
|
+
</section>
|
|
541
|
+
</main>
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
<footer id="validator-badges" role="contentinfo">
|
|
545
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
|
546
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.1.
|
|
547
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
|
548
|
+
</footer>
|
|
549
|
+
|