Qore ConnectionProvider Module Reference 2.0
Loading...
Searching...
No Matches
ConnectionProvider.qm.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
4/* ConnectionProvider.qm Copyright 2016 - 2024 Qore Technologies, s.r.o.
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23*/
24
25// minimum required Qore module
26
27
28
29
231
233namespace ConnectionProvider {
235
241 *string module;
242
245
247 *softlist<auto> args;
248
250
261
263
274};
275
277
279public hashdecl ConnectionInfo {
281 string name;
282
285
288
290 string desc;
291
294
297
300
302 *hash opts;
303
305 string status;
306
308 string type;
309
311 bool up = False;
312
314 *date updated;
315
317
319 string url;
320
323
325
328
330
332 bool locked;
333
335
338
340 hash<auto> tags;
341
343 *hash<string, bool> features;
344
346 *hash<string, *hash<string, hash<DataProviderOptionInfo>>> dataprovider_subtypes;
347
349
352
354 bool has_provider = False;
355
358
361
364
367
370};
371
373
377public hashdecl ConnectionDataInfo {
379 string name;
380
383
386
388 string desc;
389
392
395
398
400 *hash opts;
401
403 string status;
404
406 string type;
407
409 bool up = False;
410
412 *date updated;
413
415
417 string url;
418
421
423
426
428
430 bool locked;
431
433
436
438 hash<auto> tags;
439
441 *hash<string, bool> features;
442
444 *hash<string, *hash<string, hash<auto>>> dataprovider_subtypes;
445
447
450
452 bool has_provider = False;
453
456
459
462
465
468};
469
471
473public hashdecl ConfigInfo {
474 string name;
475 string desc;
476 string url;
477 *hash opts;
478};
479
481
483public hashdecl PingInfo {
485 string name;
486
488 string desc;
489
491 *hash opts;
492
494 string url;
495
497 bool ok;
498
500 date time;
501
503 string info;
504
507
510
512 *hash<ExceptionInfo> ex;
513};
514
516
531 string get_connection_url(string str);
532
533
535
551
552
554
569 *hash<string, AbstractConnection> get_connections(*bool verbose);
570
571
573
588 *hash<string, hash<ConnectionInfo>> get_connection_hash(*bool verbose);
589
590}; // ConnectionProvider namespace
591
592// private, non-exported namespace
593namespace Priv {
594*hash priv_try_get_connections(string mod);
595
596
597ConnectionProvider::AbstractConnection priv_try_get_connection(string mod, string conn);
598
599}; // Priv nsmrspace
Abstract base class for connections.
Definition AbstractConnection.qc.dox.h:47
The ConnectionProvider namespace.
Definition AbstractConnection.qc.dox.h:28
string get_connection_url(string str)
returns a URL string for the given identifier if the identifier is known to a registered connection p...
*hash< string, AbstractConnection > get_connections(*bool verbose)
returns all known connections as a hash keyed by connection identifier; values are AbstractConnection...
AbstractConnection get_connection(string conn)
returns an AbstractConnection object if the identifier is known to a registered connection provider
*hash< string, hash< ConnectionInfo > > get_connection_hash(*bool verbose)
returns a hash of connection information keyed by connection identifier; values are ConnectionInfo ha...
config informaton
Definition ConnectionProvider.qm.dox.h:473
*hash opts
the options set on the connection
Definition ConnectionProvider.qm.dox.h:477
string name
the name of the connection
Definition ConnectionProvider.qm.dox.h:474
string desc
the description
Definition ConnectionProvider.qm.dox.h:475
string url
the full URL (including any username & password)
Definition ConnectionProvider.qm.dox.h:476
information that can be used to dynamically construct a connection object
Definition ConnectionProvider.qm.dox.h:239
*string string class_name
any module required to be loaded for the constructor call
Definition ConnectionProvider.qm.dox.h:244
*string pre_processing
code to execute before construction to preprocess the constructor arguments
Definition ConnectionProvider.qm.dox.h:273
*string post_processing
code to execute after construction
Definition ConnectionProvider.qm.dox.h:260
*softlist< auto > args
the constructor arguments
Definition ConnectionProvider.qm.dox.h:247
Connection information hash containing only serializable data.
Definition ConnectionProvider.qm.dox.h:377
string url
the URL for the connection including the password
Definition ConnectionProvider.qm.dox.h:417
string status
a string giving the connection's status
Definition ConnectionProvider.qm.dox.h:403
string short_desc
the connection short description in plain text
Definition ConnectionProvider.qm.dox.h:385
bool locked
a boolean value indicating whether the connection is locked or not
Definition ConnectionProvider.qm.dox.h:430
string type
the connection type
Definition ConnectionProvider.qm.dox.h:406
bool children_can_support_apis
if the data provider or any of its children support requests (APIs)
Definition ConnectionProvider.qm.dox.h:455
*date last_check
the date/time value of the last connection check (or NOTHING if not checked)
Definition ConnectionProvider.qm.dox.h:391
bool up
a boolean vaue indicating the connection is known to be up (will be False if not checked)
Definition ConnectionProvider.qm.dox.h:409
bool children_can_support_records
if the data provider or any of its children support records
Definition ConnectionProvider.qm.dox.h:458
*date updated
the date/time value of the update (or NOTHING if not updated)
Definition ConnectionProvider.qm.dox.h:412
bool children_can_support_observers
if the data provider or any of its children support events
Definition ConnectionProvider.qm.dox.h:461
bool debug_data
a boolean value indicating whether the connection should be subject to data debugging
Definition ConnectionProvider.qm.dox.h:435
string name
the connection name
Definition ConnectionProvider.qm.dox.h:379
*hash opts
the original options used to create the object
Definition ConnectionProvider.qm.dox.h:400
string desc
the connection description
Definition ConnectionProvider.qm.dox.h:388
*hash< string, *hash< string, hash< auto > > > dataprovider_subtypes
Data provider subtype information.
Definition ConnectionProvider.qm.dox.h:444
*hash< string, bool > features
connection-defined feature hash
Definition ConnectionProvider.qm.dox.h:441
bool monitor
a boolean vaue indicating if the connection should be monitored or not
Definition ConnectionProvider.qm.dox.h:397
hash url_hash
a hash of URL information as returned by parse_url()
Definition ConnectionProvider.qm.dox.h:420
bool children_can_support_transactions
if the data provider or any of its children support transaction management
Definition ConnectionProvider.qm.dox.h:467
bool has_provider
if the connection supports the data provider API
Definition ConnectionProvider.qm.dox.h:452
bool loopback
a boolean vaue indicating if the connection is a loopback connection
Definition ConnectionProvider.qm.dox.h:394
bool enabled
a boolean value indicating if the connection should be enabled or not
Definition ConnectionProvider.qm.dox.h:425
bool children_can_support_messages
if the data provider or any of its children support messages
Definition ConnectionProvider.qm.dox.h:464
hash< auto > tags
user-defined key-value pairs associated with the connection
Definition ConnectionProvider.qm.dox.h:438
string display_name
the display name
Definition ConnectionProvider.qm.dox.h:382
bool needs_auth
True if the connection requires OAuth2 authorization before it can be used
Definition ConnectionProvider.qm.dox.h:449
Connection information hash.
Definition ConnectionProvider.qm.dox.h:279
hash< auto > tags
user-defined key-value pairs associated with the connection
Definition ConnectionProvider.qm.dox.h:340
bool children_can_support_records
if the data provider or any of its children support records
Definition ConnectionProvider.qm.dox.h:360
bool loopback
a boolean vaue indicating if the connection is a loopback connection
Definition ConnectionProvider.qm.dox.h:296
bool has_provider
if the connection supports the data provider API
Definition ConnectionProvider.qm.dox.h:354
*date last_check
the date/time value of the last connection check (or NOTHING if not checked)
Definition ConnectionProvider.qm.dox.h:293
*hash opts
the original options used to create the object
Definition ConnectionProvider.qm.dox.h:302
string short_desc
the connection short description in plain text
Definition ConnectionProvider.qm.dox.h:287
bool children_can_support_apis
if the data provider or any of its children support requests (APIs)
Definition ConnectionProvider.qm.dox.h:357
bool monitor
a boolean vaue indicating if the connection should be monitored or not
Definition ConnectionProvider.qm.dox.h:299
bool up
a boolean vaue indicating the connection is known to be up (will be False if not checked)
Definition ConnectionProvider.qm.dox.h:311
bool children_can_support_messages
if the data provider or any of its children support messages
Definition ConnectionProvider.qm.dox.h:366
bool locked
a boolean value indicating whether the connection is locked or not
Definition ConnectionProvider.qm.dox.h:332
*hash< string, bool > features
connection-defined feature hash
Definition ConnectionProvider.qm.dox.h:343
string name
the connection name
Definition ConnectionProvider.qm.dox.h:281
bool children_can_support_transactions
if the data provider or any of its children support transaction management
Definition ConnectionProvider.qm.dox.h:369
string type
the connection type
Definition ConnectionProvider.qm.dox.h:308
bool needs_auth
True if the connection requires OAuth2 authorization before it can be used
Definition ConnectionProvider.qm.dox.h:351
*date updated
the date/time value of the update (or NOTHING if not updated)
Definition ConnectionProvider.qm.dox.h:314
bool enabled
a boolean value indicating if the connection should be enabled or not
Definition ConnectionProvider.qm.dox.h:327
*hash< string, *hash< string, hash< DataProviderOptionInfo > > > dataprovider_subtypes
Data provider subtype information.
Definition ConnectionProvider.qm.dox.h:346
bool debug_data
a boolean value indicating whether the connection should be subject to data debugging
Definition ConnectionProvider.qm.dox.h:337
bool children_can_support_observers
if the data provider or any of its children support events
Definition ConnectionProvider.qm.dox.h:363
string display_name
the display name
Definition ConnectionProvider.qm.dox.h:284
string status
a string giving the connection's status
Definition ConnectionProvider.qm.dox.h:305
string desc
the connection description in markdown
Definition ConnectionProvider.qm.dox.h:290
string url
the URL for the connection including the password
Definition ConnectionProvider.qm.dox.h:319
hash url_hash
a hash of URL information as returned by parse_url()
Definition ConnectionProvider.qm.dox.h:322
ping response info
Definition ConnectionProvider.qm.dox.h:483
date time
a relative date/time value giving the elapsed time of the ping operation
Definition ConnectionProvider.qm.dox.h:500
string desc
the description
Definition ConnectionProvider.qm.dox.h:488
*hash ping_info
an optional free-form hash giving additional info regarding ping operation or the remote system
Definition ConnectionProvider.qm.dox.h:509
bool ok
a boolean value giving the result of the ping
Definition ConnectionProvider.qm.dox.h:497
*hash< ExceptionInfo > ex
if an exception occured, all exception info will be returned here
Definition ConnectionProvider.qm.dox.h:512
*hash opts
the options set on the connection
Definition ConnectionProvider.qm.dox.h:491
string url
a safe version of the URL (without passwords)
Definition ConnectionProvider.qm.dox.h:494
string name
the name of the connection
Definition ConnectionProvider.qm.dox.h:485
int ping_flags
Ping flags used for the ping.
Definition ConnectionProvider.qm.dox.h:506
string info
a string giving the result of the ping ("OK" or an error message)
Definition ConnectionProvider.qm.dox.h:503