qredisclient
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
RedisClient::ConnectionConfig Class Reference

The ConnectionConfig class Supports loading settigns from JSON objects. More...

#include <connectionconfig.h>

Public Member Functions

 ConnectionConfig (const QString &host="", const QString &auth="", const uint port=DEFAULT_REDIS_PORT, const QString &name="")
 Default constructor for local connections. More...
 
ConnectionConfigoperator= (const ConnectionConfig &other)
 
 ConnectionConfig (const QVariantHash &options)
 
QString name () const
 
QString host () const
 
QString auth () const
 
uint port () const
 
void setName (QString name)
 
void setAuth (QString auth)
 
void setHost (QString host)
 
void setPort (uint port)
 
bool isNull () const
 
bool useAuth () const
 
bool isValid () const
 
uint executeTimeout () const
 
uint connectionTimeout () const
 
void setExecutionTimeout (uint timeout)
 
void setConnectionTimeout (uint timeout)
 
void setTimeouts (uint connectionTimeout, uint commandExecutionTimeout)
 
bool useSsl () const
 
void setSsl (bool enabled)
 
QList< QSslCertificate > sslCaCertificates () const
 
QString sslCaCertPath () const
 
QString sslPrivateKeyPath () const
 
QString sslLocalCertPath () const
 
void setSslCaCertPath (QString path)
 
void setSslPrivateKeyPath (QString path)
 
void setSslLocalCertPath (QString path)
 
void setSslSettigns (QString sslCaCertPath, QString sslPrivateKeyPath="", QString sslLocalCertPath="")
 
bool useSshTunnel () const
 
bool isSshPasswordUsed () const
 
QString sshPassword () const
 
QString sshUser () const
 
QString sshHost () const
 
uint sshPort () const
 
QString getSshPrivateKey () const
 getSshPrivateKey from specified path More...
 
QString getSshPrivateKeyPath () const
 
void setSshPassword (QString pass)
 
void setSshHost (QString host)
 
void setSshPrivateKeyPath (QString path)
 
void setSshUser (QString user)
 
void setSshPort (uint port)
 
void setSshTunnelSettings (QString host, QString user, QString pass, uint port=DEFAULT_SSH_PORT, QString sshPrivatekeyPath="")
 setSshTunnelSettings - Set SSH settings More...
 
QJsonObject toJsonObject ()
 
QWeakPointer< ConnectiongetOwner () const
 
void setOwner (QWeakPointer< Connection >)
 
QVariantHash getInternalParameters () const
 

Static Public Member Functions

static ConnectionConfig fromJsonObject (const QJsonObject &config)
 

Static Public Attributes

static const uint DEFAULT_REDIS_PORT = 6379
 
static const uint DEFAULT_SSH_PORT = 22
 
static const uint DEFAULT_TIMEOUT_IN_MS = 60000
 

Protected Member Functions

template<class T >
param (const QString &p) const
 
template<class T >
void setParam (const QString &key, T p)
 
QString getValidPathFromParameter (const QString &param) const
 

Protected Attributes

QWeakPointer< Connectionm_owner
 
QVariantHash m_parameters
 

Detailed Description

The ConnectionConfig class Supports loading settigns from JSON objects.

Constructor & Destructor Documentation

RedisClient::ConnectionConfig::ConnectionConfig ( const QString &  host = "",
const QString &  auth = "",
const uint  port = DEFAULT_REDIS_PORT,
const QString &  name = "" 
)

Default constructor for local connections.

Parameters
host
name
port

Member Function Documentation

QString RedisClient::ConnectionConfig::getSshPrivateKey ( ) const

getSshPrivateKey from specified path

Returns
QString with ssh key
void RedisClient::ConnectionConfig::setSshTunnelSettings ( QString  host,
QString  user,
QString  pass,
uint  port = DEFAULT_SSH_PORT,
QString  sshPrivatekeyPath = "" 
)

setSshTunnelSettings - Set SSH settings

Parameters
host
user
pass
port
sshPrivatekeyPath

The documentation for this class was generated from the following files: