ws_store.ecm 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. /*##############################################################################
  2. HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. ############################################################################## */
  13. ESPStruct KVPair
  14. {
  15. string Key;
  16. string Value;
  17. };
  18. ESPStruct NamespaceSet
  19. {
  20. string Namespace;
  21. ESParray<ESPStruct KVPair, Entry> Entries;
  22. };
  23. ESPStruct StoreInfo
  24. {
  25. string Name;
  26. string Type;
  27. string Description;
  28. string Owner;
  29. string CreateTime;
  30. string MaxValSize;
  31. bool IsDefault(false);
  32. };
  33. ESPrequest ListKeysRequest
  34. {
  35. string StoreName;
  36. string Namespace;
  37. bool UserSpecific(false);
  38. };
  39. ESPresponse [exceptions_inline] ListKeysResponse
  40. {
  41. string StoreName;
  42. string Namespace;
  43. ESParray<string, Key> KeySet;
  44. };
  45. ESPrequest ListStoresRequest
  46. {
  47. string NameFilter;
  48. string TypeFilter;
  49. string OwnerFilter;
  50. };
  51. ESPresponse [exceptions_inline] ListStoresResponse
  52. {
  53. ESParray<ESPStruct StoreInfo, Store> Stores;
  54. };
  55. ESPrequest ListNamespacesRequest
  56. {
  57. string StoreName;
  58. bool UserSpecific(false);
  59. };
  60. ESPresponse [exceptions_inline] ListNamespacesResponse
  61. {
  62. string StoreName;
  63. ESParray<string, Namespace> Namespaces;
  64. };
  65. ESPrequest DeleteNamespaceRequest
  66. {
  67. string StoreName;
  68. string Namespace;
  69. bool UserSpecific(false);
  70. string TargetUser;
  71. };
  72. ESPresponse [exceptions_inline] DeleteNamespaceResponse
  73. {
  74. bool Success;
  75. };
  76. ESPrequest DeleteRequest
  77. {
  78. string StoreName;
  79. string Namespace;
  80. string Key;
  81. bool UserSpecific(false);
  82. string TargetUser;
  83. };
  84. ESPresponse [exceptions_inline] DeleteResponse
  85. {
  86. bool Success;
  87. };
  88. ESPrequest FetchRequest
  89. {
  90. string StoreName;
  91. string Namespace;
  92. string Key;
  93. bool UserSpecific(false);
  94. };
  95. ESPresponse [exceptions_inline] FetchResponse
  96. {
  97. string Value;
  98. };
  99. ESPrequest FetchAllRequest
  100. {
  101. string StoreName;
  102. string Namespace;
  103. bool UserSpecific(false);
  104. };
  105. ESPrequest FetchKeyMDRequest
  106. {
  107. string StoreName;
  108. string Namespace;
  109. string Key;
  110. bool UserSpecific(false);
  111. };
  112. ESPresponse [exceptions_inline] FetchKeyMDResponse
  113. {
  114. string StoreName;
  115. string Namespace;
  116. string Key;
  117. ESParray<ESPStruct KVPair, Pair> Pairs;
  118. };
  119. ESPresponse [exceptions_inline] FetchAllResponse
  120. {
  121. string Namespace;
  122. ESParray<ESPStruct KVPair, Pair> Pairs;
  123. };
  124. ESPrequest SetRequest
  125. {
  126. string StoreName;
  127. string Namespace;
  128. string Key;
  129. string Value;
  130. bool UserSpecific(false);
  131. };
  132. ESPresponse [exceptions_inline] SetResponse
  133. {
  134. bool Success;
  135. };
  136. ESPrequest CreateStoreRequest
  137. {
  138. string Name;
  139. string Type;
  140. string Description;
  141. [depr_ver("1.01")] bool UserSpecific(false);
  142. [min_ver("1.02")] int MaxValueSize(1024);
  143. };
  144. ESPresponse [exceptions_inline] CreateStoreResponse
  145. {
  146. string Name;
  147. string Type;
  148. string Description;
  149. string Owner;
  150. [min_ver("1.01")] bool Success;
  151. };
  152. ESPservice [version("1.02"), default_client_version("1.02"), auth_feature("WsStoreAccess:READ"), exceptions_inline("./smc_xslt/exceptions.xslt")] wsstore
  153. {
  154. ESPmethod [auth_feature("WsStoreAccess:READ"), min_ver("1.02")] ListStores(ListStoresRequest, ListStoresResponse);
  155. ESPmethod [auth_feature("WsStoreAccess:FULL")] Delete(DeleteRequest, DeleteResponse);
  156. ESPmethod [auth_feature("WsStoreAccess:FULL")] DeleteNamespace(DeleteNamespaceRequest, DeleteNamespaceResponse);
  157. ESPmethod [auth_feature("WsStoreAccess:WRITE")] Set(SetRequest, SetResponse);
  158. ESPmethod [auth_feature("WsStoreAccess:READ")] Fetch(FetchRequest, FetchResponse);
  159. ESPmethod [auth_feature("WsStoreAccess:READ")] FetchAll(FetchAllRequest, FetchAllResponse);
  160. ESPmethod [auth_feature("WsStoreAccess:FULL")] FetchKeyMetadata(FetchKeyMDRequest, FetchKeyMDResponse);
  161. ESPmethod [auth_feature("WsStoreAccess:READ")] ListKeys(ListKeysRequest, ListKeysResponse);
  162. ESPmethod [auth_feature("WsStoreAccess:READ")] ListNamespaces(ListNamespacesRequest, ListNamespacesResponse);
  163. ESPmethod [auth_feature("WsStoreAccess:FULL")] CreateStore(CreateStoreRequest, CreateStoreResponse);
  164. };
  165. SCMexportdef(wsstore);
  166. SCMapi(wsstore) IClientwsstore *createwsstoreClient();