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
232
234namespace ConnectionProvider {
236
242 *string module;
243
246
248 *softlist<auto> args;
249
251
262
264
275};
276
278
280public hashdecl ConnectionInfo {
282 string name;
283
286
289
291 string desc;
292
295
298
301
303 *hash opts;
304
306 string status;
307
309 string type;
310
312 bool up = False;
313
315 *date updated;
316
318
320 string url;
321
324
326
329
331
333 bool locked;
334
337
339
342
345
347
350
352 hash<auto> tags;
353
355 *hash<string, bool> features;
356
358 *hash<string, *hash<string, hash<DataProviderOptionInfo>>> dataprovider_subtypes;
359
361
364
366 bool has_provider = False;
367
370
373
376
379
382};
383
385
389public hashdecl ConnectionDataInfo {
391 string name;
392
395
398
400 string desc;
401
404
407
410
412 *hash opts;
413
415 string status;
416
418 string type;
419
421 bool up = False;
422
424 *date updated;
425
427
429 string url;
430
433
435
438
440
442 bool locked;
443
446
448
451
454
456
459
461 hash<auto> tags;
462
464 *hash<string, bool> features;
465
467 *hash<string, *hash<string, hash<auto>>> dataprovider_subtypes;
468
470
473
475 bool has_provider = False;
476
479
482
485
488
491};
492
494
496public hashdecl ConfigInfo {
497 string name;
498 string desc;
499 string url;
500 *hash opts;
501};
502
504
506public hashdecl PingInfo {
508 string name;
509
511 string desc;
512
514 *hash opts;
515
517 string url;
518
520 bool ok;
521
523 date time;
524
526 string info;
527
530
533
535 *hash<ExceptionInfo> ex;
536};
537
539
554 string get_connection_url(string str);
555
556
558
574
575
577
592 *hash<string, AbstractConnection> get_connections(*bool verbose);
593
594
596
611 *hash<string, hash<ConnectionInfo>> get_connection_hash(*bool verbose);
612
613}; // ConnectionProvider namespace
614
615// private, non-exported namespace
616namespace Priv {
617*hash priv_try_get_connections(string mod);
618
619
620ConnectionProvider::AbstractConnection priv_try_get_connection(string mod, string conn);
621
622}; // 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:496
*hash opts
the options set on the connection
Definition ConnectionProvider.qm.dox.h:500
string name
the name of the connection
Definition ConnectionProvider.qm.dox.h:497
string desc
the description
Definition ConnectionProvider.qm.dox.h:498
string url
the full URL (including any username & password)
Definition ConnectionProvider.qm.dox.h:499
information that can be used to dynamically construct a connection object
Definition ConnectionProvider.qm.dox.h:240
*string string class_name
any module required to be loaded for the constructor call
Definition ConnectionProvider.qm.dox.h:245
*string pre_processing
code to execute before construction to preprocess the constructor arguments
Definition ConnectionProvider.qm.dox.h:274
*string post_processing
code to execute after construction
Definition ConnectionProvider.qm.dox.h:261
*softlist< auto > args
the constructor arguments
Definition ConnectionProvider.qm.dox.h:248
Connection information hash containing only serializable data.
Definition ConnectionProvider.qm.dox.h:389
bool supports_customization
Indicates if the connection supports customization or not.
Definition ConnectionProvider.qm.dox.h:445
string url
the URL for the connection including the password
Definition ConnectionProvider.qm.dox.h:429
string status
a string giving the connection's status
Definition ConnectionProvider.qm.dox.h:415
string short_desc
the connection short description in plain text
Definition ConnectionProvider.qm.dox.h:397
bool locked
a boolean value indicating whether the connection is locked or not
Definition ConnectionProvider.qm.dox.h:442
string type
the connection type
Definition ConnectionProvider.qm.dox.h:418
bool children_can_support_apis
if the data provider or any of its children support requests (APIs)
Definition ConnectionProvider.qm.dox.h:478
*date last_check
the date/time value of the last connection check (or NOTHING if not checked)
Definition ConnectionProvider.qm.dox.h:403
bool up
a boolean vaue indicating the connection is known to be up (will be False if not checked)
Definition ConnectionProvider.qm.dox.h:421
bool children_can_support_records
if the data provider or any of its children support records
Definition ConnectionProvider.qm.dox.h:481
*date updated
the date/time value of the update (or NOTHING if not updated)
Definition ConnectionProvider.qm.dox.h:424
bool children_can_support_observers
if the data provider or any of its children support events
Definition ConnectionProvider.qm.dox.h:484
bool debug_data
a boolean value indicating whether the connection should be subject to data debugging
Definition ConnectionProvider.qm.dox.h:458
string name
the connection name
Definition ConnectionProvider.qm.dox.h:391
*hash opts
the original options used to create the object
Definition ConnectionProvider.qm.dox.h:412
string desc
the connection description
Definition ConnectionProvider.qm.dox.h:400
*hash< string, *hash< string, hash< auto > > > dataprovider_subtypes
Data provider subtype information.
Definition ConnectionProvider.qm.dox.h:467
*hash< string, bool > features
connection-defined feature hash
Definition ConnectionProvider.qm.dox.h:464
bool monitor
a boolean vaue indicating if the connection should be monitored or not
Definition ConnectionProvider.qm.dox.h:409
hash url_hash
a hash of URL information as returned by parse_url()
Definition ConnectionProvider.qm.dox.h:432
bool children_can_support_transactions
if the data provider or any of its children support transaction management
Definition ConnectionProvider.qm.dox.h:490
bool has_provider
if the connection supports the data provider API
Definition ConnectionProvider.qm.dox.h:475
bool loopback
a boolean vaue indicating if the connection is a loopback connection
Definition ConnectionProvider.qm.dox.h:406
bool enabled
a boolean value indicating if the connection should be enabled or not
Definition ConnectionProvider.qm.dox.h:437
*date customization_timestamp
The timestamp of the last customization for the connection.
Definition ConnectionProvider.qm.dox.h:453
bool children_can_support_messages
if the data provider or any of its children support messages
Definition ConnectionProvider.qm.dox.h:487
hash< auto > tags
user-defined key-value pairs associated with the connection
Definition ConnectionProvider.qm.dox.h:461
string customization_status
The current customization status for the connection.
Definition ConnectionProvider.qm.dox.h:450
string display_name
the display name
Definition ConnectionProvider.qm.dox.h:394
bool needs_auth
True if the connection requires OAuth2 authorization before it can be used
Definition ConnectionProvider.qm.dox.h:472
Connection information hash.
Definition ConnectionProvider.qm.dox.h:280
hash< auto > tags
user-defined key-value pairs associated with the connection
Definition ConnectionProvider.qm.dox.h:352
bool children_can_support_records
if the data provider or any of its children support records
Definition ConnectionProvider.qm.dox.h:372
bool loopback
a boolean vaue indicating if the connection is a loopback connection
Definition ConnectionProvider.qm.dox.h:297
bool has_provider
if the connection supports the data provider API
Definition ConnectionProvider.qm.dox.h:366
*date last_check
the date/time value of the last connection check (or NOTHING if not checked)
Definition ConnectionProvider.qm.dox.h:294
string customization_status
The current customization status for the connection.
Definition ConnectionProvider.qm.dox.h:341
*hash opts
the original options used to create the object
Definition ConnectionProvider.qm.dox.h:303
string short_desc
the connection short description in plain text
Definition ConnectionProvider.qm.dox.h:288
bool children_can_support_apis
if the data provider or any of its children support requests (APIs)
Definition ConnectionProvider.qm.dox.h:369
bool monitor
a boolean vaue indicating if the connection should be monitored or not
Definition ConnectionProvider.qm.dox.h:300
bool up
a boolean vaue indicating the connection is known to be up (will be False if not checked)
Definition ConnectionProvider.qm.dox.h:312
bool supports_customization
Indicates if the connection supports customization or not.
Definition ConnectionProvider.qm.dox.h:336
bool children_can_support_messages
if the data provider or any of its children support messages
Definition ConnectionProvider.qm.dox.h:378
bool locked
a boolean value indicating whether the connection is locked or not
Definition ConnectionProvider.qm.dox.h:333
*hash< string, bool > features
connection-defined feature hash
Definition ConnectionProvider.qm.dox.h:355
string name
the connection name
Definition ConnectionProvider.qm.dox.h:282
bool children_can_support_transactions
if the data provider or any of its children support transaction management
Definition ConnectionProvider.qm.dox.h:381
string type
the connection type
Definition ConnectionProvider.qm.dox.h:309
bool needs_auth
True if the connection requires OAuth2 authorization before it can be used
Definition ConnectionProvider.qm.dox.h:363
*date updated
the date/time value of the update (or NOTHING if not updated)
Definition ConnectionProvider.qm.dox.h:315
bool enabled
a boolean value indicating if the connection should be enabled or not
Definition ConnectionProvider.qm.dox.h:328
*hash< string, *hash< string, hash< DataProviderOptionInfo > > > dataprovider_subtypes
Data provider subtype information.
Definition ConnectionProvider.qm.dox.h:358
bool debug_data
a boolean value indicating whether the connection should be subject to data debugging
Definition ConnectionProvider.qm.dox.h:349
bool children_can_support_observers
if the data provider or any of its children support events
Definition ConnectionProvider.qm.dox.h:375
string display_name
the display name
Definition ConnectionProvider.qm.dox.h:285
string status
a string giving the connection's status
Definition ConnectionProvider.qm.dox.h:306
*date customization_timestamp
The timestamp of the last customization for the connection.
Definition ConnectionProvider.qm.dox.h:344
string desc
the connection description in markdown
Definition ConnectionProvider.qm.dox.h:291
string url
the URL for the connection including the password
Definition ConnectionProvider.qm.dox.h:320
hash url_hash
a hash of URL information as returned by parse_url()
Definition ConnectionProvider.qm.dox.h:323
ping response info
Definition ConnectionProvider.qm.dox.h:506
date time
a relative date/time value giving the elapsed time of the ping operation
Definition ConnectionProvider.qm.dox.h:523
string desc
the description
Definition ConnectionProvider.qm.dox.h:511
*hash ping_info
an optional free-form hash giving additional info regarding ping operation or the remote system
Definition ConnectionProvider.qm.dox.h:532
bool ok
a boolean value giving the result of the ping
Definition ConnectionProvider.qm.dox.h:520
*hash< ExceptionInfo > ex
if an exception occured, all exception info will be returned here
Definition ConnectionProvider.qm.dox.h:535
*hash opts
the options set on the connection
Definition ConnectionProvider.qm.dox.h:514
string url
a safe version of the URL (without passwords)
Definition ConnectionProvider.qm.dox.h:517
string name
the name of the connection
Definition ConnectionProvider.qm.dox.h:508
int ping_flags
Ping flags used for the ping.
Definition ConnectionProvider.qm.dox.h:529
string info
a string giving the result of the ping ("OK" or an error message)
Definition ConnectionProvider.qm.dox.h:526