| Qore ConnectionProvider Module Reference 2.0.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
234
236
238 namespace ConnectionProvider {
240
244 public struct ConnectionConstructorInfo {
246 *string module;
247
249 string class_name;
250
252 *softlist<auto> args;
253
255
265 *string post_processing;
266
268
278 *string pre_processing;
279};
280
282
284 public struct ConnectionInfo {
286 string name;
287
289 string display_name;
290
292 string short_desc;
293
295 string desc;
296
298 *date last_check;
299
301 bool loopback;
302
304 bool monitor;
305
307 *hash opts;
308
310 string status;
311
313 string type;
314
316 bool up = False;
317
319 *date updated;
320
322
324 string url;
325
327 hash url_hash;
328
330
332 bool enabled;
333
335
337 bool locked;
338
340 bool supports_customization;
341
343
345 string customization_status;
346
348 *date customization_timestamp;
349
351
353 bool debug_data;
354
356 hash<auto> tags;
357
359 *hash<string, bool> features;
360
362 *hash<string, *hash<string, hash<DataProviderOptionInfo>>> dataprovider_subtypes;
363
365 *string app;
366
368
370 bool needs_auth;
371
373 bool has_provider = False;
374
376 bool children_can_support_apis = False;
377
379 bool children_can_support_records = False;
380
382 bool children_can_support_observers = False;
383
385 bool children_can_support_messages = False;
386
388 bool children_can_support_transactions = False;
389};
390
392
396 public struct ConnectionDataInfo {
398 string name;
399
401 string display_name;
402
404 string short_desc;
405
407 string desc;
408
410 *date last_check;
411
413 bool loopback;
414
416 bool monitor;
417
419 *hash opts;
420
422 string status;
423
425 string type;
426
428 bool up = False;
429
431 *date updated;
432
434
436 string url;
437
439 hash url_hash;
440
442
444 bool enabled;
445
447
449 bool locked;
450
452 bool supports_customization;
453
455
457 string customization_status;
458
460 *date customization_timestamp;
461
463
465 bool debug_data;
466
468 hash<auto> tags;
469
471 *hash<string, bool> features;
472
474 *hash<string, *hash<string, hash<auto>>> dataprovider_subtypes;
475
477 *string app;
478
480
482 bool needs_auth;
483
485 bool has_provider = False;
486
488 bool children_can_support_apis = False;
489
491 bool children_can_support_records = False;
492
494 bool children_can_support_observers = False;
495
497 bool children_can_support_messages = False;
498
500 bool children_can_support_transactions = False;
501};
502
504
506 public struct ConfigInfo {
507 string name;
508 string desc;
509 string url;
510 *hash opts;
511};
512
514
516 public struct PingInfo {
518 string name;
519
521 string desc;
522
524 *hash opts;
525
527 string url;
528
530 bool ok;
531
533 date time;
534
536 string info;
537
539 int ping_flags;
540
542 *hash ping_info;
543
545 *hash<ExceptionInfo> ex;
546};
547
549
564 string get_connection_url(string str);
565
566
568
583 AbstractConnection get_connection(string conn);
584
585
587
602 *hash<string, AbstractConnection> get_connections(*bool verbose);
603
604
606
621 *hash<string, hash<ConnectionInfo>> get_connection_hash(*bool verbose);
622
623}; // ConnectionProvider namespace
624
625// private, non-exported namespace
626 namespace Priv {
627*hash priv_try_get_connections(string mod);
628
629
630 ConnectionProvider::AbstractConnection priv_try_get_connection(string mod, string conn);
631
632}; // Priv nsmrspace
ConnectionProvider::AbstractConnection
Abstract base class for connections.
Definition AbstractConnection.qc.dox.h:69
ConnectionProvider
The ConnectionProvider namespace.
Definition AbstractConnection.qc.dox.h:28
ConnectionProvider::get_connection_url
string get_connection_url(string str)
returns a URL string for the given identifier if the identifier is known to a registered connection p...
ConnectionProvider::get_connections
*hash< string, AbstractConnection > get_connections(*bool verbose)
returns all known connections as a hash keyed by connection identifier; values are AbstractConnection...
ConnectionProvider::get_connection
AbstractConnection get_connection(string conn)
returns an AbstractConnection object if the identifier is known to a registered connection provider
ConnectionProvider::get_connection_hash
*hash< string, hash< ConnectionInfo > > get_connection_hash(*bool verbose)
returns a hash of connection information keyed by connection identifier; values are ConnectionInfo ha...
ConnectionProvider::ConfigInfo
config informaton
Definition ConnectionProvider.qm.dox.h:506
ConnectionProvider::ConfigInfo::opts
*hash opts
the options set on the connection
Definition ConnectionProvider.qm.dox.h:510
ConnectionProvider::ConfigInfo::name
string name
the name of the connection
Definition ConnectionProvider.qm.dox.h:507
ConnectionProvider::ConfigInfo::desc
string desc
the description
Definition ConnectionProvider.qm.dox.h:508
ConnectionProvider::ConfigInfo::url
string url
the full URL (including any username & password)
Definition ConnectionProvider.qm.dox.h:509
ConnectionProvider::ConnectionConstructorInfo
information that can be used to dynamically construct a connection object
Definition ConnectionProvider.qm.dox.h:244
ConnectionProvider::ConnectionConstructorInfo::class_name
string class_name
the name of the constructor's class
Definition ConnectionProvider.qm.dox.h:249
ConnectionProvider::ConnectionConstructorInfo::module
*string module
any module required to be loaded for the constructor call
Definition ConnectionProvider.qm.dox.h:246
ConnectionProvider::ConnectionConstructorInfo::pre_processing
*string pre_processing
code to execute before construction to preprocess the constructor arguments
Definition ConnectionProvider.qm.dox.h:278
ConnectionProvider::ConnectionConstructorInfo::post_processing
*string post_processing
code to execute after construction
Definition ConnectionProvider.qm.dox.h:265
ConnectionProvider::ConnectionConstructorInfo::args
*softlist< auto > args
the constructor arguments
Definition ConnectionProvider.qm.dox.h:252
ConnectionProvider::ConnectionDataInfo
Connection information hash containing only serializable data.
Definition ConnectionProvider.qm.dox.h:396
ConnectionProvider::ConnectionDataInfo::app
*string app
Any application name associated with the connection.
Definition ConnectionProvider.qm.dox.h:477
ConnectionProvider::ConnectionDataInfo::supports_customization
bool supports_customization
Indicates if the connection supports customization or not.
Definition ConnectionProvider.qm.dox.h:452
ConnectionProvider::ConnectionDataInfo::url
string url
the URL for the connection including the password
Definition ConnectionProvider.qm.dox.h:436
ConnectionProvider::ConnectionDataInfo::status
string status
a string giving the connection's status
Definition ConnectionProvider.qm.dox.h:422
ConnectionProvider::ConnectionDataInfo::short_desc
string short_desc
the connection short description in plain text
Definition ConnectionProvider.qm.dox.h:404
ConnectionProvider::ConnectionDataInfo::locked
bool locked
a boolean value indicating whether the connection is locked or not
Definition ConnectionProvider.qm.dox.h:449
ConnectionProvider::ConnectionDataInfo::type
string type
the connection type
Definition ConnectionProvider.qm.dox.h:425
ConnectionProvider::ConnectionDataInfo::children_can_support_apis
bool children_can_support_apis
if the data provider or any of its children support requests (APIs)
Definition ConnectionProvider.qm.dox.h:488
ConnectionProvider::ConnectionDataInfo::last_check
*date last_check
the date/time value of the last connection check (or NOTHING if not checked)
Definition ConnectionProvider.qm.dox.h:410
ConnectionProvider::ConnectionDataInfo::up
bool up
a boolean vaue indicating the connection is known to be up (will be False if not checked)
Definition ConnectionProvider.qm.dox.h:428
ConnectionProvider::ConnectionDataInfo::children_can_support_records
bool children_can_support_records
if the data provider or any of its children support records
Definition ConnectionProvider.qm.dox.h:491
ConnectionProvider::ConnectionDataInfo::updated
*date updated
the date/time value of the update (or NOTHING if not updated)
Definition ConnectionProvider.qm.dox.h:431
ConnectionProvider::ConnectionDataInfo::children_can_support_observers
bool children_can_support_observers
if the data provider or any of its children support events
Definition ConnectionProvider.qm.dox.h:494
ConnectionProvider::ConnectionDataInfo::debug_data
bool debug_data
a boolean value indicating whether the connection should be subject to data debugging
Definition ConnectionProvider.qm.dox.h:465
ConnectionProvider::ConnectionDataInfo::name
string name
the connection name
Definition ConnectionProvider.qm.dox.h:398
ConnectionProvider::ConnectionDataInfo::opts
*hash opts
the original options used to create the object
Definition ConnectionProvider.qm.dox.h:419
ConnectionProvider::ConnectionDataInfo::desc
string desc
the connection description
Definition ConnectionProvider.qm.dox.h:407
ConnectionProvider::ConnectionDataInfo::dataprovider_subtypes
*hash< string, *hash< string, hash< auto > > > dataprovider_subtypes
Data provider subtype information.
Definition ConnectionProvider.qm.dox.h:474
ConnectionProvider::ConnectionDataInfo::features
*hash< string, bool > features
connection-defined feature hash
Definition ConnectionProvider.qm.dox.h:471
ConnectionProvider::ConnectionDataInfo::monitor
bool monitor
a boolean vaue indicating if the connection should be monitored or not
Definition ConnectionProvider.qm.dox.h:416
ConnectionProvider::ConnectionDataInfo::url_hash
hash url_hash
a hash of URL information as returned by parse_url()
Definition ConnectionProvider.qm.dox.h:439
ConnectionProvider::ConnectionDataInfo::children_can_support_transactions
bool children_can_support_transactions
if the data provider or any of its children support transaction management
Definition ConnectionProvider.qm.dox.h:500
ConnectionProvider::ConnectionDataInfo::has_provider
bool has_provider
if the connection supports the data provider API
Definition ConnectionProvider.qm.dox.h:485
ConnectionProvider::ConnectionDataInfo::loopback
bool loopback
a boolean vaue indicating if the connection is a loopback connection
Definition ConnectionProvider.qm.dox.h:413
ConnectionProvider::ConnectionDataInfo::enabled
bool enabled
a boolean value indicating if the connection should be enabled or not
Definition ConnectionProvider.qm.dox.h:444
ConnectionProvider::ConnectionDataInfo::customization_timestamp
*date customization_timestamp
The timestamp of the last customization for the connection.
Definition ConnectionProvider.qm.dox.h:460
ConnectionProvider::ConnectionDataInfo::children_can_support_messages
bool children_can_support_messages
if the data provider or any of its children support messages
Definition ConnectionProvider.qm.dox.h:497
ConnectionProvider::ConnectionDataInfo::tags
hash< auto > tags
user-defined key-value pairs associated with the connection
Definition ConnectionProvider.qm.dox.h:468
ConnectionProvider::ConnectionDataInfo::customization_status
string customization_status
The current customization status for the connection.
Definition ConnectionProvider.qm.dox.h:457
ConnectionProvider::ConnectionDataInfo::display_name
string display_name
the display name
Definition ConnectionProvider.qm.dox.h:401
ConnectionProvider::ConnectionDataInfo::needs_auth
bool needs_auth
True if the connection requires OAuth2 authorization before it can be used
Definition ConnectionProvider.qm.dox.h:482
ConnectionProvider::ConnectionInfo
Connection information hash.
Definition ConnectionProvider.qm.dox.h:284
ConnectionProvider::ConnectionInfo::tags
hash< auto > tags
user-defined key-value pairs associated with the connection
Definition ConnectionProvider.qm.dox.h:356
ConnectionProvider::ConnectionInfo::children_can_support_records
bool children_can_support_records
if the data provider or any of its children support records
Definition ConnectionProvider.qm.dox.h:379
ConnectionProvider::ConnectionInfo::loopback
bool loopback
a boolean vaue indicating if the connection is a loopback connection
Definition ConnectionProvider.qm.dox.h:301
ConnectionProvider::ConnectionInfo::has_provider
bool has_provider
if the connection supports the data provider API
Definition ConnectionProvider.qm.dox.h:373
ConnectionProvider::ConnectionInfo::last_check
*date last_check
the date/time value of the last connection check (or NOTHING if not checked)
Definition ConnectionProvider.qm.dox.h:298
ConnectionProvider::ConnectionInfo::customization_status
string customization_status
The current customization status for the connection.
Definition ConnectionProvider.qm.dox.h:345
ConnectionProvider::ConnectionInfo::opts
*hash opts
the original options used to create the object
Definition ConnectionProvider.qm.dox.h:307
ConnectionProvider::ConnectionInfo::short_desc
string short_desc
the connection short description in plain text
Definition ConnectionProvider.qm.dox.h:292
ConnectionProvider::ConnectionInfo::children_can_support_apis
bool children_can_support_apis
if the data provider or any of its children support requests (APIs)
Definition ConnectionProvider.qm.dox.h:376
ConnectionProvider::ConnectionInfo::monitor
bool monitor
a boolean vaue indicating if the connection should be monitored or not
Definition ConnectionProvider.qm.dox.h:304
ConnectionProvider::ConnectionInfo::up
bool up
a boolean vaue indicating the connection is known to be up (will be False if not checked)
Definition ConnectionProvider.qm.dox.h:316
ConnectionProvider::ConnectionInfo::supports_customization
bool supports_customization
Indicates if the connection supports customization or not.
Definition ConnectionProvider.qm.dox.h:340
ConnectionProvider::ConnectionInfo::children_can_support_messages
bool children_can_support_messages
if the data provider or any of its children support messages
Definition ConnectionProvider.qm.dox.h:385
ConnectionProvider::ConnectionInfo::locked
bool locked
a boolean value indicating whether the connection is locked or not
Definition ConnectionProvider.qm.dox.h:337
ConnectionProvider::ConnectionInfo::app
*string app
Any application name associated with the connection.
Definition ConnectionProvider.qm.dox.h:365
ConnectionProvider::ConnectionInfo::features
*hash< string, bool > features
connection-defined feature hash
Definition ConnectionProvider.qm.dox.h:359
ConnectionProvider::ConnectionInfo::name
string name
the connection name
Definition ConnectionProvider.qm.dox.h:286
ConnectionProvider::ConnectionInfo::children_can_support_transactions
bool children_can_support_transactions
if the data provider or any of its children support transaction management
Definition ConnectionProvider.qm.dox.h:388
ConnectionProvider::ConnectionInfo::type
string type
the connection type
Definition ConnectionProvider.qm.dox.h:313
ConnectionProvider::ConnectionInfo::needs_auth
bool needs_auth
True if the connection requires OAuth2 authorization before it can be used
Definition ConnectionProvider.qm.dox.h:370
ConnectionProvider::ConnectionInfo::updated
*date updated
the date/time value of the update (or NOTHING if not updated)
Definition ConnectionProvider.qm.dox.h:319
ConnectionProvider::ConnectionInfo::enabled
bool enabled
a boolean value indicating if the connection should be enabled or not
Definition ConnectionProvider.qm.dox.h:332
ConnectionProvider::ConnectionInfo::dataprovider_subtypes
*hash< string, *hash< string, hash< DataProviderOptionInfo > > > dataprovider_subtypes
Data provider subtype information.
Definition ConnectionProvider.qm.dox.h:362
ConnectionProvider::ConnectionInfo::debug_data
bool debug_data
a boolean value indicating whether the connection should be subject to data debugging
Definition ConnectionProvider.qm.dox.h:353
ConnectionProvider::ConnectionInfo::children_can_support_observers
bool children_can_support_observers
if the data provider or any of its children support events
Definition ConnectionProvider.qm.dox.h:382
ConnectionProvider::ConnectionInfo::display_name
string display_name
the display name
Definition ConnectionProvider.qm.dox.h:289
ConnectionProvider::ConnectionInfo::status
string status
a string giving the connection's status
Definition ConnectionProvider.qm.dox.h:310
ConnectionProvider::ConnectionInfo::customization_timestamp
*date customization_timestamp
The timestamp of the last customization for the connection.
Definition ConnectionProvider.qm.dox.h:348
ConnectionProvider::ConnectionInfo::desc
string desc
the connection description in markdown
Definition ConnectionProvider.qm.dox.h:295
ConnectionProvider::ConnectionInfo::url
string url
the URL for the connection including the password
Definition ConnectionProvider.qm.dox.h:324
ConnectionProvider::ConnectionInfo::url_hash
hash url_hash
a hash of URL information as returned by parse_url()
Definition ConnectionProvider.qm.dox.h:327
ConnectionProvider::PingInfo
ping response info
Definition ConnectionProvider.qm.dox.h:516
ConnectionProvider::PingInfo::time
date time
a relative date/time value giving the elapsed time of the ping operation
Definition ConnectionProvider.qm.dox.h:533
ConnectionProvider::PingInfo::desc
string desc
the description
Definition ConnectionProvider.qm.dox.h:521
ConnectionProvider::PingInfo::ping_info
*hash ping_info
an optional free-form hash giving additional info regarding ping operation or the remote system
Definition ConnectionProvider.qm.dox.h:542
ConnectionProvider::PingInfo::ok
bool ok
a boolean value giving the result of the ping
Definition ConnectionProvider.qm.dox.h:530
ConnectionProvider::PingInfo::ex
*hash< ExceptionInfo > ex
if an exception occured, all exception info will be returned here
Definition ConnectionProvider.qm.dox.h:545
ConnectionProvider::PingInfo::opts
*hash opts
the options set on the connection
Definition ConnectionProvider.qm.dox.h:524
ConnectionProvider::PingInfo::url
string url
a safe version of the URL (without passwords)
Definition ConnectionProvider.qm.dox.h:527
ConnectionProvider::PingInfo::name
string name
the name of the connection
Definition ConnectionProvider.qm.dox.h:518
ConnectionProvider::PingInfo::ping_flags
int ping_flags
Ping flags used for the ping.
Definition ConnectionProvider.qm.dox.h:539
ConnectionProvider::PingInfo::info
string info
a string giving the result of the ping ("OK" or an error message)
Definition ConnectionProvider.qm.dox.h:536