Qore CdsRestDataProvider Module Reference 1.0.0
Loading...
Searching...
No Matches
CdsRestDataProvider.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
26namespace CdsRestDataProvider {
29
30public:
33
35 const ProviderInfo = <DataProviderInfo>{
36 "type": "CdsRestDataProvider",
37 "supports_children": True,
38 "constructor_options": ConstructorOptions,
39 "children_can_support_apis": False,
40 "children_can_support_records": True,
41 "children_can_support_observers": False,
42 };
43
45 const ConstructorOptions = {
46 "api": <DataProviderOptionInfo>{
47 "type": AbstractDataProviderType::get(StringType),
48 "desc": "the CDS API version to use",
49 },
50 "cdsrestclient_options": <DataProviderOptionInfo>{
51 "type": AbstractDataProviderType::get(AutoHashType),
52 "desc": "options to the CdsRestClient constructor",
53 },
54 "client_id": <DataProviderOptionInfo>{
55 "type": AbstractDataProviderType::get(StringType),
56 "desc": "the client ID (required if 'client_secret' provided)",
57 },
58 "client_secret": <DataProviderOptionInfo>{
59 "type": AbstractDataProviderType::get(StringType),
60 "desc": "the client secret (required if 'client_id' provided)",
61 },
62 "scope": <DataProviderOptionInfo>{
63 "type": AbstractDataProviderType::get(StringType),
64 "desc": "the scope string",
65 },
66 "tenant": <DataProviderOptionInfo>{
67 "type": AbstractDataProviderType::get(StringType),
68 "desc": "the tenant string",
69 },
70 "url": <DataProviderOptionInfo>{
71 "type": AbstractDataProviderType::get(StringType),
72 "desc": "the URL to the CDS server",
73 "required": True,
74 },
75 };
76
78 const EnvOptions = {
79 "url": "CDS_URL",
80 "client_id": "CDS_CLIENT_ID",
81 "client_secret": "CDS_CLIENT_SECRET",
82 "tenant": "CDS_TENANT",
83 "scope": "CDS_SCOPE",
84 };
85
87 const HttpMethods = {
88 "GET": True,
89 "PUT": True,
90 "PATCH": True,
91 "POST": True,
92 "DELETE": True,
93 };
94
95protected:
97 *hash<auto> meta;
98
101
102public:
103
106
107
109 constructor(*hash<auto> options);
110
111
113 string getName();
114
115
117
119protected:
121public:
122
123
125
129protected:
131public:
132
133
135protected:
136 *hash<auto> getMetadata();
137public:
138
139
141protected:
142 hash<DataProvider::DataProviderInfo> getStaticInfoImpl();
143public:
144
145
147protected:
148 static *hash<auto> getClientOptions(*hash<auto> copts);
149public:
150
151};
152};
static *hash< auto > getClientOptions(*hash< auto > copts)
Returns options for the CdsRestClient.
constructor(CdsRestClient::CdsRestClient rest)
Creates the object from the arguments.
CdsRestClient::CdsRestClient rest
The REST client object for API calls.
Definition: CdsRestDataProvider.qc.dox.h:32
*DataProvider::AbstractDataProvider getChildProviderImpl(string name)
Returns the given child provider or NOTHING if the given child is unknown.
hash< DataProvider::DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
*list< string > getChildProviderNamesImpl()
Returns a list of child data provider names, if any.
string getName()
Returns the data provider name.
*hash< auto > meta
Metadata keyed by entity type.
Definition: CdsRestDataProvider.qc.dox.h:97
constructor(*hash< auto > options)
Creates the object from constructor options.
Qore::Thread::Mutex lck()
Metadata mutex.
*hash< auto > getMetadata()
Returns metadata.
Qore CdsRestDataProvider module definition.
Definition: CdsEntityDataProvider.qc.dox.h:26