Loading...
Searching...
No Matches
ConnectionProvider.qm.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
/* ConnectionProvider.qm Copyright 2016 - 2024 Qore Technologies, s.r.o.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
// minimum required Qore module
namespace ConnectionProvider {
public struct ConnectionConstructorInfo {
*string module;
string class_name;
*softlist<auto> args;
*string post_processing;
*string pre_processing;
};
public struct ConnectionInfo {
string name;
string display_name;
string short_desc;
string desc;
*date last_check;
bool loopback;
bool monitor;
*hash opts;
string status;
string type;
bool up = False;
*date updated;
string url;
hash url_hash;
bool enabled;
bool locked;
bool supports_customization;
string customization_status;
*date customization_timestamp;
bool debug_data;
hash<auto> tags;
*hash<string, bool> features;
*hash<string, *hash<string, hash<DataProviderOptionInfo>>> dataprovider_subtypes;
bool needs_auth;
bool has_provider = False;
bool children_can_support_apis = False;
bool children_can_support_records = False;
bool children_can_support_observers = False;
bool children_can_support_messages = False;
bool children_can_support_transactions = False;
};
public struct ConnectionDataInfo {
string name;
string display_name;
string short_desc;
string desc;
*date last_check;
bool loopback;
bool monitor;
*hash opts;
string status;
string type;
bool up = False;
*date updated;
string url;
hash url_hash;
bool enabled;
bool locked;
bool supports_customization;
string customization_status;
*date customization_timestamp;
bool debug_data;
hash<auto> tags;
*hash<string, bool> features;
*hash<string, *hash<string, hash<auto>>> dataprovider_subtypes;
bool needs_auth;
bool has_provider = False;
bool children_can_support_apis = False;
bool children_can_support_records = False;
bool children_can_support_observers = False;
bool children_can_support_messages = False;
bool children_can_support_transactions = False;
};
public struct ConfigInfo {
string name;
string desc;
string url;
*hash opts;
};
public struct PingInfo {
string name;
string desc;
*hash opts;
string url;
bool ok;
date time;
string info;
int ping_flags;
*hash ping_info;
*hash<ExceptionInfo> ex;
};
string get_connection_url(string str);
AbstractConnection get_connection(string conn);
*hash<string, AbstractConnection> get_connections(*bool verbose);
*hash<string, hash<ConnectionInfo>> get_connection_hash(*bool verbose);
}; // ConnectionProvider namespace
// private, non-exported namespace
namespace Priv {
*hash priv_try_get_connections(string mod);
ConnectionProvider::AbstractConnection priv_try_get_connection(string mod, string conn);
}; // 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:496
ConnectionProvider::ConfigInfo::opts
*hash opts
the options set on the connection
Definition ConnectionProvider.qm.dox.h:500
ConnectionProvider::ConfigInfo::name
string name
the name of the connection
Definition ConnectionProvider.qm.dox.h:497
ConnectionProvider::ConfigInfo::desc
string desc
the description
Definition ConnectionProvider.qm.dox.h:498
ConnectionProvider::ConfigInfo::url
string url
the full URL (including any username & password)
Definition ConnectionProvider.qm.dox.h:499
ConnectionProvider::ConnectionConstructorInfo
information that can be used to dynamically construct a connection object
Definition ConnectionProvider.qm.dox.h:240
ConnectionProvider::ConnectionConstructorInfo::class_name
string class_name
the name of the constructor's class
Definition ConnectionProvider.qm.dox.h:245
ConnectionProvider::ConnectionConstructorInfo::module
*string module
any module required to be loaded for the constructor call
Definition ConnectionProvider.qm.dox.h:242
ConnectionProvider::ConnectionConstructorInfo::pre_processing
*string pre_processing
code to execute before construction to preprocess the constructor arguments
Definition ConnectionProvider.qm.dox.h:274
ConnectionProvider::ConnectionConstructorInfo::post_processing
*string post_processing
code to execute after construction
Definition ConnectionProvider.qm.dox.h:261
ConnectionProvider::ConnectionConstructorInfo::args
*softlist< auto > args
the constructor arguments
Definition ConnectionProvider.qm.dox.h:248
ConnectionProvider::ConnectionDataInfo
Connection information hash containing only serializable data.
Definition ConnectionProvider.qm.dox.h:389
ConnectionProvider::ConnectionDataInfo::supports_customization
bool supports_customization
Indicates if the connection supports customization or not.
Definition ConnectionProvider.qm.dox.h:445
ConnectionProvider::ConnectionDataInfo::url
string url
the URL for the connection including the password
Definition ConnectionProvider.qm.dox.h:429
ConnectionProvider::ConnectionDataInfo::status
string status
a string giving the connection's status
Definition ConnectionProvider.qm.dox.h:415
ConnectionProvider::ConnectionDataInfo::short_desc
string short_desc
the connection short description in plain text
Definition ConnectionProvider.qm.dox.h:397
ConnectionProvider::ConnectionDataInfo::locked
bool locked
a boolean value indicating whether the connection is locked or not
Definition ConnectionProvider.qm.dox.h:442
ConnectionProvider::ConnectionDataInfo::type
string type
the connection type
Definition ConnectionProvider.qm.dox.h:418
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:478
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:403
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:421
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:481
ConnectionProvider::ConnectionDataInfo::updated
*date updated
the date/time value of the update (or nothing if not updated)
Definition ConnectionProvider.qm.dox.h:424
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:484
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:458
ConnectionProvider::ConnectionDataInfo::name
string name
the connection name
Definition ConnectionProvider.qm.dox.h:391
ConnectionProvider::ConnectionDataInfo::opts
*hash opts
the original options used to create the object
Definition ConnectionProvider.qm.dox.h:412
ConnectionProvider::ConnectionDataInfo::desc
string desc
the connection description
Definition ConnectionProvider.qm.dox.h:400
ConnectionProvider::ConnectionDataInfo::dataprovider_subtypes
*hash< string, *hash< string, hash< auto > > > dataprovider_subtypes
Data provider subtype information.
Definition ConnectionProvider.qm.dox.h:467
ConnectionProvider::ConnectionDataInfo::features
*hash< string, bool > features
connection-defined feature hash
Definition ConnectionProvider.qm.dox.h:464
ConnectionProvider::ConnectionDataInfo::monitor
bool monitor
a boolean vaue indicating if the connection should be monitored or not
Definition ConnectionProvider.qm.dox.h:409
ConnectionProvider::ConnectionDataInfo::url_hash
hash url_hash
a hash of URL information as returned by parse_url()
Definition ConnectionProvider.qm.dox.h:432
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:490
ConnectionProvider::ConnectionDataInfo::has_provider
bool has_provider
if the connection supports the data provider API
Definition ConnectionProvider.qm.dox.h:475
ConnectionProvider::ConnectionDataInfo::loopback
bool loopback
a boolean vaue indicating if the connection is a loopback connection
Definition ConnectionProvider.qm.dox.h:406
ConnectionProvider::ConnectionDataInfo::enabled
bool enabled
a boolean value indicating if the connection should be enabled or not
Definition ConnectionProvider.qm.dox.h:437
ConnectionProvider::ConnectionDataInfo::customization_timestamp
*date customization_timestamp
The timestamp of the last customization for the connection.
Definition ConnectionProvider.qm.dox.h:453
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:487
ConnectionProvider::ConnectionDataInfo::tags
hash< auto > tags
user-defined key-value pairs associated with the connection
Definition ConnectionProvider.qm.dox.h:461
ConnectionProvider::ConnectionDataInfo::customization_status
string customization_status
The current customization status for the connection.
Definition ConnectionProvider.qm.dox.h:450
ConnectionProvider::ConnectionDataInfo::display_name
string display_name
the display name
Definition ConnectionProvider.qm.dox.h:394
ConnectionProvider::ConnectionDataInfo::needs_auth
bool needs_auth
True if the connection requires OAuth2 authorization before it can be used
Definition ConnectionProvider.qm.dox.h:472
ConnectionProvider::ConnectionInfo
Connection information hash.
Definition ConnectionProvider.qm.dox.h:280
ConnectionProvider::ConnectionInfo::tags
hash< auto > tags
user-defined key-value pairs associated with the connection
Definition ConnectionProvider.qm.dox.h:352
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:372
ConnectionProvider::ConnectionInfo::loopback
bool loopback
a boolean vaue indicating if the connection is a loopback connection
Definition ConnectionProvider.qm.dox.h:297
ConnectionProvider::ConnectionInfo::has_provider
bool has_provider
if the connection supports the data provider API
Definition ConnectionProvider.qm.dox.h:366
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:294
ConnectionProvider::ConnectionInfo::customization_status
string customization_status
The current customization status for the connection.
Definition ConnectionProvider.qm.dox.h:341
ConnectionProvider::ConnectionInfo::opts
*hash opts
the original options used to create the object
Definition ConnectionProvider.qm.dox.h:303
ConnectionProvider::ConnectionInfo::short_desc
string short_desc
the connection short description in plain text
Definition ConnectionProvider.qm.dox.h:288
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:369
ConnectionProvider::ConnectionInfo::monitor
bool monitor
a boolean vaue indicating if the connection should be monitored or not
Definition ConnectionProvider.qm.dox.h:300
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:312
ConnectionProvider::ConnectionInfo::supports_customization
bool supports_customization
Indicates if the connection supports customization or not.
Definition ConnectionProvider.qm.dox.h:336
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:378
ConnectionProvider::ConnectionInfo::locked
bool locked
a boolean value indicating whether the connection is locked or not
Definition ConnectionProvider.qm.dox.h:333
ConnectionProvider::ConnectionInfo::features
*hash< string, bool > features
connection-defined feature hash
Definition ConnectionProvider.qm.dox.h:355
ConnectionProvider::ConnectionInfo::name
string name
the connection name
Definition ConnectionProvider.qm.dox.h:282
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:381
ConnectionProvider::ConnectionInfo::type
string type
the connection type
Definition ConnectionProvider.qm.dox.h:309
ConnectionProvider::ConnectionInfo::needs_auth
bool needs_auth
True if the connection requires OAuth2 authorization before it can be used
Definition ConnectionProvider.qm.dox.h:363
ConnectionProvider::ConnectionInfo::updated
*date updated
the date/time value of the update (or nothing if not updated)
Definition ConnectionProvider.qm.dox.h:315
ConnectionProvider::ConnectionInfo::enabled
bool enabled
a boolean value indicating if the connection should be enabled or not
Definition ConnectionProvider.qm.dox.h:328
ConnectionProvider::ConnectionInfo::dataprovider_subtypes
*hash< string, *hash< string, hash< DataProviderOptionInfo > > > dataprovider_subtypes
Data provider subtype information.
Definition ConnectionProvider.qm.dox.h:358
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:349
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:375
ConnectionProvider::ConnectionInfo::display_name
string display_name
the display name
Definition ConnectionProvider.qm.dox.h:285
ConnectionProvider::ConnectionInfo::status
string status
a string giving the connection's status
Definition ConnectionProvider.qm.dox.h:306
ConnectionProvider::ConnectionInfo::customization_timestamp
*date customization_timestamp
The timestamp of the last customization for the connection.
Definition ConnectionProvider.qm.dox.h:344
ConnectionProvider::ConnectionInfo::desc
string desc
the connection description in markdown
Definition ConnectionProvider.qm.dox.h:291
ConnectionProvider::ConnectionInfo::url
string url
the URL for the connection including the password
Definition ConnectionProvider.qm.dox.h:320
ConnectionProvider::ConnectionInfo::url_hash
hash url_hash
a hash of URL information as returned by parse_url()
Definition ConnectionProvider.qm.dox.h:323
ConnectionProvider::PingInfo
ping response info
Definition ConnectionProvider.qm.dox.h:506
ConnectionProvider::PingInfo::time
date time
a relative date/time value giving the elapsed time of the ping operation
Definition ConnectionProvider.qm.dox.h:523
ConnectionProvider::PingInfo::desc
string desc
the description
Definition ConnectionProvider.qm.dox.h:511
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:532
ConnectionProvider::PingInfo::ok
bool ok
a boolean value giving the result of the ping
Definition ConnectionProvider.qm.dox.h:520
ConnectionProvider::PingInfo::ex
*hash< ExceptionInfo > ex
if an exception occured, all exception info will be returned here
Definition ConnectionProvider.qm.dox.h:535
ConnectionProvider::PingInfo::opts
*hash opts
the options set on the connection
Definition ConnectionProvider.qm.dox.h:514
ConnectionProvider::PingInfo::url
string url
a safe version of the URL (without passwords)
Definition ConnectionProvider.qm.dox.h:517
ConnectionProvider::PingInfo::name
string name
the name of the connection
Definition ConnectionProvider.qm.dox.h:508
ConnectionProvider::PingInfo::ping_flags
int ping_flags
Ping flags used for the ping.
Definition ConnectionProvider.qm.dox.h:529
ConnectionProvider::PingInfo::info
string info
a string giving the result of the ping ("OK" or an error message)
Definition ConnectionProvider.qm.dox.h:526