Qore ConnectionProvider Module Reference 2.1
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
240
242namespace ConnectionProvider {
244
250 *string module;
251
254
256 *softlist<auto> args;
257
259
270
272
283};
284
286
288public hashdecl ConnectionInfo {
290 string name;
291
294
297
299 string desc;
300
303
306
309
311 *hash opts;
312
314 string status;
315
317 string type;
318
320 bool up = False;
321
323 *date updated;
324
326
328 string url;
329
332
334
337
339
341 bool locked;
342
345
347
350
353
355
358
360 hash<auto> tags;
361
363 *hash<string, bool> features;
364
366 *hash<string, *hash<string, hash<DataProviderOptionInfo>>> dataprovider_subtypes;
367
369 *string app;
370
372
375
377 bool has_provider = False;
378
381
384
387
390
393};
394
396
400public hashdecl ConnectionDataInfo {
402 string name;
403
406
409
411 string desc;
412
415
418
421
423 *hash opts;
424
426 string status;
427
429 string type;
430
432 bool up = False;
433
435 *date updated;
436
438
440 string url;
441
444
446
449
451
453 bool locked;
454
457
459
462
465
467
470
472 hash<auto> tags;
473
475 *hash<string, bool> features;
476
478 *hash<string, *hash<string, hash<auto>>> dataprovider_subtypes;
479
481 *string app;
482
484
487
489 bool has_provider = False;
490
493
496
499
502
505};
506
508
510public hashdecl ConfigInfo {
511 string name;
512 string desc;
513 string url;
514 *hash opts;
515};
516
518
520public hashdecl PingInfo {
522 string name;
523
525 string desc;
526
528 *hash opts;
529
531 string url;
532
534 bool ok;
535
537 date time;
538
540 string info;
541
544
547
549 *hash<ExceptionInfo> ex;
550};
551
553
568 string get_connection_url(string str);
569
570
572
588
589
591
606 *hash<string, AbstractConnection> get_connections(*bool verbose);
607
608
610
625 *hash<string, hash<ConnectionInfo>> get_connection_hash(*bool verbose);
626
627}; // ConnectionProvider namespace
628
629// private, non-exported namespace
630namespace Priv {
631*hash priv_try_get_connections(string mod);
632
633
634ConnectionProvider::AbstractConnection priv_try_get_connection(string mod, string conn);
635
636}; // Priv nsmrspace
Abstract base class for connections.
Definition AbstractConnection.qc.dox.h:69
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:510
*hash opts
the options set on the connection
Definition ConnectionProvider.qm.dox.h:514
string name
the name of the connection
Definition ConnectionProvider.qm.dox.h:511
string desc
the description
Definition ConnectionProvider.qm.dox.h:512
string url
the full URL (including any username & password)
Definition ConnectionProvider.qm.dox.h:513
information that can be used to dynamically construct a connection object
Definition ConnectionProvider.qm.dox.h:248
*string string class_name
any module required to be loaded for the constructor call
Definition ConnectionProvider.qm.dox.h:253
*string pre_processing
code to execute before construction to preprocess the constructor arguments
Definition ConnectionProvider.qm.dox.h:282
*string post_processing
code to execute after construction
Definition ConnectionProvider.qm.dox.h:269
*softlist< auto > args
the constructor arguments
Definition ConnectionProvider.qm.dox.h:256
Connection information hash containing only serializable data.
Definition ConnectionProvider.qm.dox.h:400
*string app
Any application name associated with the connection.
Definition ConnectionProvider.qm.dox.h:481
bool supports_customization
Indicates if the connection supports customization or not.
Definition ConnectionProvider.qm.dox.h:456
string url
the URL for the connection including the password
Definition ConnectionProvider.qm.dox.h:440
string status
a string giving the connection's status
Definition ConnectionProvider.qm.dox.h:426
string short_desc
the connection short description in plain text
Definition ConnectionProvider.qm.dox.h:408
bool locked
a boolean value indicating whether the connection is locked or not
Definition ConnectionProvider.qm.dox.h:453
string type
the connection type
Definition ConnectionProvider.qm.dox.h:429
bool children_can_support_apis
if the data provider or any of its children support requests (APIs)
Definition ConnectionProvider.qm.dox.h:492
*date last_check
the date/time value of the last connection check (or NOTHING if not checked)
Definition ConnectionProvider.qm.dox.h:414
bool up
a boolean vaue indicating the connection is known to be up (will be False if not checked)
Definition ConnectionProvider.qm.dox.h:432
bool children_can_support_records
if the data provider or any of its children support records
Definition ConnectionProvider.qm.dox.h:495
*date updated
the date/time value of the update (or NOTHING if not updated)
Definition ConnectionProvider.qm.dox.h:435
bool children_can_support_observers
if the data provider or any of its children support events
Definition ConnectionProvider.qm.dox.h:498
bool debug_data
a boolean value indicating whether the connection should be subject to data debugging
Definition ConnectionProvider.qm.dox.h:469
string name
the connection name
Definition ConnectionProvider.qm.dox.h:402
*hash opts
the original options used to create the object
Definition ConnectionProvider.qm.dox.h:423
string desc
the connection description
Definition ConnectionProvider.qm.dox.h:411
*hash< string, *hash< string, hash< auto > > > dataprovider_subtypes
Data provider subtype information.
Definition ConnectionProvider.qm.dox.h:478
*hash< string, bool > features
connection-defined feature hash
Definition ConnectionProvider.qm.dox.h:475
bool monitor
a boolean vaue indicating if the connection should be monitored or not
Definition ConnectionProvider.qm.dox.h:420
hash url_hash
a hash of URL information as returned by parse_url()
Definition ConnectionProvider.qm.dox.h:443
bool children_can_support_transactions
if the data provider or any of its children support transaction management
Definition ConnectionProvider.qm.dox.h:504
bool has_provider
if the connection supports the data provider API
Definition ConnectionProvider.qm.dox.h:489
bool loopback
a boolean vaue indicating if the connection is a loopback connection
Definition ConnectionProvider.qm.dox.h:417
bool enabled
a boolean value indicating if the connection should be enabled or not
Definition ConnectionProvider.qm.dox.h:448
*date customization_timestamp
The timestamp of the last customization for the connection.
Definition ConnectionProvider.qm.dox.h:464
bool children_can_support_messages
if the data provider or any of its children support messages
Definition ConnectionProvider.qm.dox.h:501
hash< auto > tags
user-defined key-value pairs associated with the connection
Definition ConnectionProvider.qm.dox.h:472
string customization_status
The current customization status for the connection.
Definition ConnectionProvider.qm.dox.h:461
string display_name
the display name
Definition ConnectionProvider.qm.dox.h:405
bool needs_auth
True if the connection requires OAuth2 authorization before it can be used
Definition ConnectionProvider.qm.dox.h:486
Connection information hash.
Definition ConnectionProvider.qm.dox.h:288
hash< auto > tags
user-defined key-value pairs associated with the connection
Definition ConnectionProvider.qm.dox.h:360
bool children_can_support_records
if the data provider or any of its children support records
Definition ConnectionProvider.qm.dox.h:383
bool loopback
a boolean vaue indicating if the connection is a loopback connection
Definition ConnectionProvider.qm.dox.h:305
bool has_provider
if the connection supports the data provider API
Definition ConnectionProvider.qm.dox.h:377
*date last_check
the date/time value of the last connection check (or NOTHING if not checked)
Definition ConnectionProvider.qm.dox.h:302
string customization_status
The current customization status for the connection.
Definition ConnectionProvider.qm.dox.h:349
*hash opts
the original options used to create the object
Definition ConnectionProvider.qm.dox.h:311
string short_desc
the connection short description in plain text
Definition ConnectionProvider.qm.dox.h:296
bool children_can_support_apis
if the data provider or any of its children support requests (APIs)
Definition ConnectionProvider.qm.dox.h:380
bool monitor
a boolean vaue indicating if the connection should be monitored or not
Definition ConnectionProvider.qm.dox.h:308
bool up
a boolean vaue indicating the connection is known to be up (will be False if not checked)
Definition ConnectionProvider.qm.dox.h:320
bool supports_customization
Indicates if the connection supports customization or not.
Definition ConnectionProvider.qm.dox.h:344
bool children_can_support_messages
if the data provider or any of its children support messages
Definition ConnectionProvider.qm.dox.h:389
bool locked
a boolean value indicating whether the connection is locked or not
Definition ConnectionProvider.qm.dox.h:341
*string app
Any application name associated with the connection.
Definition ConnectionProvider.qm.dox.h:369
*hash< string, bool > features
connection-defined feature hash
Definition ConnectionProvider.qm.dox.h:363
string name
the connection name
Definition ConnectionProvider.qm.dox.h:290
bool children_can_support_transactions
if the data provider or any of its children support transaction management
Definition ConnectionProvider.qm.dox.h:392
string type
the connection type
Definition ConnectionProvider.qm.dox.h:317
bool needs_auth
True if the connection requires OAuth2 authorization before it can be used
Definition ConnectionProvider.qm.dox.h:374
*date updated
the date/time value of the update (or NOTHING if not updated)
Definition ConnectionProvider.qm.dox.h:323
bool enabled
a boolean value indicating if the connection should be enabled or not
Definition ConnectionProvider.qm.dox.h:336
*hash< string, *hash< string, hash< DataProviderOptionInfo > > > dataprovider_subtypes
Data provider subtype information.
Definition ConnectionProvider.qm.dox.h:366
bool debug_data
a boolean value indicating whether the connection should be subject to data debugging
Definition ConnectionProvider.qm.dox.h:357
bool children_can_support_observers
if the data provider or any of its children support events
Definition ConnectionProvider.qm.dox.h:386
string display_name
the display name
Definition ConnectionProvider.qm.dox.h:293
string status
a string giving the connection's status
Definition ConnectionProvider.qm.dox.h:314
*date customization_timestamp
The timestamp of the last customization for the connection.
Definition ConnectionProvider.qm.dox.h:352
string desc
the connection description in markdown
Definition ConnectionProvider.qm.dox.h:299
string url
the URL for the connection including the password
Definition ConnectionProvider.qm.dox.h:328
hash url_hash
a hash of URL information as returned by parse_url()
Definition ConnectionProvider.qm.dox.h:331
ping response info
Definition ConnectionProvider.qm.dox.h:520
date time
a relative date/time value giving the elapsed time of the ping operation
Definition ConnectionProvider.qm.dox.h:537
string desc
the description
Definition ConnectionProvider.qm.dox.h:525
*hash ping_info
an optional free-form hash giving additional info regarding ping operation or the remote system
Definition ConnectionProvider.qm.dox.h:546
bool ok
a boolean value giving the result of the ping
Definition ConnectionProvider.qm.dox.h:534
*hash< ExceptionInfo > ex
if an exception occured, all exception info will be returned here
Definition ConnectionProvider.qm.dox.h:549
*hash opts
the options set on the connection
Definition ConnectionProvider.qm.dox.h:528
string url
a safe version of the URL (without passwords)
Definition ConnectionProvider.qm.dox.h:531
string name
the name of the connection
Definition ConnectionProvider.qm.dox.h:522
int ping_flags
Ping flags used for the ping.
Definition ConnectionProvider.qm.dox.h:543
string info
a string giving the result of the ping ("OK" or an error message)
Definition ConnectionProvider.qm.dox.h:540