Loading...
Searching...
No Matches
ConnectionSchemeCache.qc.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
namespace ConnectionProvider {
public struct AllowedValueInfo {
auto value;
string desc;
};
public struct ConnectionOptionInfo {
string type;
string desc;
bool sensitive = False;
*softlist<hash<AllowedValueInfo>> allowed_values;
auto default_value;
bool subst_env_vars = False;
bool freeform = False;
};
public struct ConnectionSchemeInfo {
Class cls;
*hash<string, hash<ConnectionOptionInfo>> options;
*string required_options;
};
class ConnectionSchemeCache {
public:
const SchemeMap = {
"awsrests": "AwsRestClient",
"billwerkrest": "BillwerkRestClient",
"billwerkrests": "BillwerkRestClient",
"cdsrests": "CdsRestClient",
"grests": "GoogleRestClient",
"hue": "HueRestClient",
"jsonrpc": "JsonRpcClient",
"jsonrpcs": "JsonRpcClient",
"pop3": "Pop3Client",
"pop3s": "Pop3Client",
"rest": "RestClient",
"rests": "RestClient",
"sewiorest": "SewioRestClient",
"sewiorests": "SewioRestClient",
"sfrests": "SalesforceRestClient",
"sfsoap": "SalesforceSoapClient",
"sfsoaps": "SalesforceSoapClient",
"sap4hanarests": "Sap4HanaRestClient",
"snrests": "ServiceNowRestClient",
"sewiows": "SewioWebSocketClient",
"sewiowss": "SewioWebSocketClient",
"soap": "SoapClient",
"soaps": "SoapClient",
"sftp": "Ssh2Connections",
"ssh": "Ssh2Connections",
"smtp": "SmtpClient",
"smtps": "SmtpClient",
"smtptls": "SmtpClient",
"esmtp": "SmtpClient",
"esmtps": "SmtpClient",
"esmtptls": "SmtpClient",
"telnet": "TelnetClient",
"ws": "WebSocketClient",
"wss": "WebSocketClient",
"xmlrpc": "XmlRpcClient",
"xmlrpcs": "XmlRpcClient",
"yamlrpc": "YamlRpcClient",
"yamlrpcs": "YamlRpcClient",
"zeyosrest": "ZeyosRestClient",
"zeyosrests": "ZeyosRestClient",
};
protected:
static hash<string, hash<ConnectionSchemeInfo>> cache = {
"ftp": FtpConnection::ConnectionScheme,
"ftps": FtpConnection::ConnectionScheme,
"dir": FilesystemConnection::ConnectionScheme,
"file": FilesystemConnection::ConnectionScheme,
"http": HttpConnection::ConnectionScheme,
"https": HttpConnection::ConnectionScheme,
};
static Mutex lck();
static bool load_all;
public:
static bool registerScheme(string scheme, hash<ConnectionSchemeInfo> entry);
static hash<string, hash<ConnectionSchemeInfo>> getLoadAll();
static hash<string, hash<ConnectionSchemeInfo>> get();
static int size();
static bool empty();
static *list<string> listSchemes();
static *hash<ConnectionSchemeInfo> getScheme(string scheme);
static hash<ConnectionSchemeInfo> getSchemeEx(string scheme);
static *hash<ConnectionSchemeInfo> getSchemeImpl(string scheme, bool throw_exception, *code scheme_loader);
protected:
static bool tryLoadModule(string mod, bool throw_exception);
public:
};
};
ConnectionProvider::ConnectionSchemeCache
Connection provider type cache class.
Definition: ConnectionSchemeCache.qc.dox.h:79
ConnectionProvider::ConnectionSchemeCache::listSchemes
static *list< string > listSchemes()
Returns a list of all cached schemes.
ConnectionProvider::ConnectionSchemeCache::getScheme
static *hash< ConnectionSchemeInfo > getScheme(string scheme)
Returns info for the given connection scheme or NOTHING if not present.
ConnectionProvider::ConnectionSchemeCache::tryLoadModule
static bool tryLoadModule(string mod, bool throw_exception)
Try to load the given module.
ConnectionProvider::ConnectionSchemeCache::getSchemeImpl
static *hash< ConnectionSchemeInfo > getSchemeImpl(string scheme, bool throw_exception, *code scheme_loader)
Returns info for the given connection scheme; either throws an exception if not present or returns NO...
ConnectionProvider::ConnectionSchemeCache::getSchemeEx
static hash< ConnectionSchemeInfo > getSchemeEx(string scheme)
Returns info for the given connection scheme or throws an exception if not present.
ConnectionProvider::ConnectionSchemeCache::SchemeMap
const SchemeMap
Map of known connection schemes to modules.
Definition: ConnectionSchemeCache.qc.dox.h:83
ConnectionProvider::ConnectionSchemeCache::get
static hash< string, hash< ConnectionSchemeInfo > > get()
Returns the entire cache.
ConnectionProvider::ConnectionSchemeCache::cache
static hash< string, hash< ConnectionSchemeInfo > > cache
Connection provider cache.
Definition: ConnectionSchemeCache.qc.dox.h:150
ConnectionProvider::ConnectionSchemeCache::registerScheme
static bool registerScheme(string scheme, hash< ConnectionSchemeInfo > entry)
Register a new connection provider in the cache.
ConnectionProvider::ConnectionSchemeCache::load_all
static bool load_all
Load all flag.
Definition: ConnectionSchemeCache.qc.dox.h:165
ConnectionProvider::ConnectionSchemeCache::size
static int size()
Returns the number of types in the cache.
ConnectionProvider::ConnectionSchemeCache::getLoadAll
static hash< string, hash< ConnectionSchemeInfo > > getLoadAll()
Loads all possible schemes and returns the entire cache.
ConnectionProvider::ConnectionSchemeCache::empty
static bool empty()
Returns True if the cache is empty, False if not.
ConnectionProvider::ConnectionSchemeCache::lck
static Mutex lck()
Connection provider cache lock.
ConnectionProvider::FilesystemConnection::ConnectionScheme
const ConnectionScheme
Connection entry info.
Definition: FilesystemConnection.qc.dox.h:40
ConnectionProvider::FtpConnection::ConnectionScheme
const ConnectionScheme
Connection entry info.
Definition: FtpConnection.qc.dox.h:37
ConnectionProvider::HttpConnection::ConnectionScheme
const ConnectionScheme
Connection entry info.
Definition: HttpConnection.qc.dox.h:59
ConnectionProvider
The ConnectionProvider namespace.
Definition: AbstractConnection.qc.dox.h:28
ConnectionProvider::AllowedValueInfo
Allowed value hash.
Definition: ConnectionSchemeCache.qc.dox.h:29
ConnectionProvider::AllowedValueInfo::desc
string desc
Description for the value.
Definition: ConnectionSchemeCache.qc.dox.h:34
ConnectionProvider::AllowedValueInfo::value
auto value
The value.
Definition: ConnectionSchemeCache.qc.dox.h:31
ConnectionProvider::ConnectionOptionInfo
Connection option information.
Definition: ConnectionSchemeCache.qc.dox.h:38
ConnectionProvider::ConnectionOptionInfo::subst_env_vars
bool subst_env_vars
Do environment variable substitution on the value?
Definition: ConnectionSchemeCache.qc.dox.h:55
ConnectionProvider::ConnectionOptionInfo::default_value
auto default_value
Any default value.
Definition: ConnectionSchemeCache.qc.dox.h:52
ConnectionProvider::ConnectionOptionInfo::type
string type
Option value type.
Definition: ConnectionSchemeCache.qc.dox.h:40
ConnectionProvider::ConnectionOptionInfo::desc
string desc
Description.
Definition: ConnectionSchemeCache.qc.dox.h:43
ConnectionProvider::ConnectionOptionInfo::allowed_values
*softlist< hash< AllowedValueInfo > > allowed_values
List of allowed values (enum)
Definition: ConnectionSchemeCache.qc.dox.h:49
ConnectionProvider::ConnectionOptionInfo::freeform
bool freeform
Modifier for the "file-as-string" type; can a freeform location option be returned?
Definition: ConnectionSchemeCache.qc.dox.h:58
ConnectionProvider::ConnectionOptionInfo::sensitive
bool sensitive
Is the value sensitive? (password or other authentication info)
Definition: ConnectionSchemeCache.qc.dox.h:46
ConnectionProvider::ConnectionSchemeInfo
Connection provider information.
Definition: ConnectionSchemeCache.qc.dox.h:62
ConnectionProvider::ConnectionSchemeInfo::required_options
*string required_options
Required option string.
Definition: ConnectionSchemeCache.qc.dox.h:75
ConnectionProvider::ConnectionSchemeInfo::options
*hash< string, hash< ConnectionOptionInfo > > options
Connection options: name -> option info.
Definition: ConnectionSchemeCache.qc.dox.h:67
ConnectionProvider::ConnectionSchemeInfo::cls
Class cls
The connection class.
Definition: ConnectionSchemeCache.qc.dox.h:64