CdsRestDataProvider.qc.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
namespace CdsRestDataProvider {
class CdsRestDataProvider : public DataProvider::AbstractDataProvider {
public:
CdsRestClient::CdsRestClient rest;
const ProviderInfo = <DataProviderInfo>{
"type": "CdsRestDataProvider",
"supports_children": True,
"constructor_options": ConstructorOptions,
"children_can_support_apis": False,
"children_can_support_records": True,
"children_can_support_observers": False,
};
const ConstructorOptions = {
"api": <DataProviderOptionInfo>{
"type": AbstractDataProviderType::get(StringType),
"desc": "the CDS API version to use",
},
"cdsrestclient_options": <DataProviderOptionInfo>{
"type": AbstractDataProviderType::get(AutoHashType),
"desc": "options to the CdsRestClient constructor",
},
"client_id": <DataProviderOptionInfo>{
"type": AbstractDataProviderType::get(StringType),
"desc": "the client ID (required if 'client_secret' provided)",
},
"client_secret": <DataProviderOptionInfo>{
"type": AbstractDataProviderType::get(StringType),
"desc": "the client secret (required if 'client_id' provided)",
},
"scope": <DataProviderOptionInfo>{
"type": AbstractDataProviderType::get(StringType),
"desc": "the scope string",
},
"tenant": <DataProviderOptionInfo>{
"type": AbstractDataProviderType::get(StringType),
"desc": "the tenant string",
},
"url": <DataProviderOptionInfo>{
"type": AbstractDataProviderType::get(StringType),
"desc": "the URL to the CDS server",
"required": True,
},
};
const EnvOptions = {
"url": "CDS_URL",
"client_id": "CDS_CLIENT_ID",
"client_secret": "CDS_CLIENT_SECRET",
"tenant": "CDS_TENANT",
"scope": "CDS_SCOPE",
};
const HttpMethods = {
"GET": True,
"PUT": True,
"PATCH": True,
"POST": True,
"DELETE": True,
};
protected:
*hash<auto> meta;
Qore::Thread::Mutex lck();
public:
constructor(CdsRestClient::CdsRestClient rest);
constructor(*hash<auto> options);
string getName();
protected:
*list<string> getChildProviderNamesImpl();
public:
protected:
*DataProvider::AbstractDataProvider getChildProviderImpl(string name);
public:
protected:
*hash<auto> getMetadata();
public:
protected:
hash<DataProvider::DataProviderInfo> getStaticInfoImpl();
public:
protected:
static *hash<auto> getClientOptions(*hash<auto> copts);
public:
};
};
CdsRestDataProvider::CdsRestDataProvider::getClientOptions
static *hash< auto > getClientOptions(*hash< auto > copts)
Returns options for the CdsRestClient.
CdsRestDataProvider::CdsRestDataProvider::getStaticInfoImpl
hash< DataProvider::DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
CdsRestDataProvider::CdsRestDataProvider::constructor
constructor(CdsRestClient::CdsRestClient rest)
Creates the object from the arguments.
CdsRestDataProvider::CdsRestDataProvider::rest
CdsRestClient::CdsRestClient rest
The REST client object for API calls.
Definition: CdsRestDataProvider.qc.dox.h:32
CdsRestDataProvider::CdsRestDataProvider::getChildProviderImpl
*DataProvider::AbstractDataProvider getChildProviderImpl(string name)
Returns the given child provider or NOTHING if the given child is unknown.
CdsRestDataProvider::CdsRestDataProvider::getChildProviderNamesImpl
*list< string > getChildProviderNamesImpl()
Returns a list of child data provider names, if any.
CdsRestDataProvider::CdsRestDataProvider::getName
string getName()
Returns the data provider name.
CdsRestDataProvider::CdsRestDataProvider::meta
*hash< auto > meta
Metadata keyed by entity type.
Definition: CdsRestDataProvider.qc.dox.h:97
CdsRestDataProvider::CdsRestDataProvider::constructor
constructor(*hash< auto > options)
Creates the object from constructor options.
CdsRestDataProvider::CdsRestDataProvider::lck
Qore::Thread::Mutex lck()
Metadata mutex.
CdsRestDataProvider::CdsRestDataProvider::getMetadata
*hash< auto > getMetadata()
Returns metadata.
Qore::Thread::Mutex
True
const True
False
const False
CdsRestDataProvider
Qore CdsRestDataProvider module definition.
Definition: CdsEntityDataProvider.qc.dox.h:26