sys-cache-api.ts 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655
  1. /* tslint:disable */
  2. /* eslint-disable */
  3. /**
  4. * Admin.NET 通用权限开发平台
  5. * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
  6. *
  7. * OpenAPI spec version: 1.0.0
  8. *
  9. *
  10. * NOTE: This class is auto generated by the swagger code generator program.
  11. * https://github.com/swagger-api/swagger-codegen.git
  12. * Do not edit the class manually.
  13. */
  14. import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
  15. import { Configuration } from '../configuration';
  16. // Some imports not used depending on template conditions
  17. // @ts-ignore
  18. import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
  19. import { AdminResultIDisposable } from '../models';
  20. import { AdminResultInt32 } from '../models';
  21. import { AdminResultListString } from '../models';
  22. import { AdminResultObject } from '../models';
  23. /**
  24. * SysCacheApi - axios parameter creator
  25. * @export
  26. */
  27. export const SysCacheApiAxiosParamCreator = function (configuration?: Configuration) {
  28. return {
  29. /**
  30. *
  31. * @summary 申请分布式锁
  32. * @param {string} key 要锁定的key
  33. * @param {number} msTimeout 申请锁等待的时间,单位毫秒
  34. * @param {number} msExpire 锁过期时间,超过该时间没有主动是放则自动是放,必须整数秒,单位毫秒
  35. * @param {boolean} throwOnFailure 失败时是否抛出异常,如不抛出异常,可通过判断返回null得知申请锁失败
  36. * @param {*} [options] Override http request option.
  37. * @throws {RequiredError}
  38. */
  39. apiSysCacheBeginCacheLockKeyMsTimeoutMsExpireThrowOnFailurePost: async (key: string, msTimeout: number, msExpire: number, throwOnFailure: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  40. // verify required parameter 'key' is not null or undefined
  41. if (key === null || key === undefined) {
  42. throw new RequiredError('key','Required parameter key was null or undefined when calling apiSysCacheBeginCacheLockKeyMsTimeoutMsExpireThrowOnFailurePost.');
  43. }
  44. // verify required parameter 'msTimeout' is not null or undefined
  45. if (msTimeout === null || msTimeout === undefined) {
  46. throw new RequiredError('msTimeout','Required parameter msTimeout was null or undefined when calling apiSysCacheBeginCacheLockKeyMsTimeoutMsExpireThrowOnFailurePost.');
  47. }
  48. // verify required parameter 'msExpire' is not null or undefined
  49. if (msExpire === null || msExpire === undefined) {
  50. throw new RequiredError('msExpire','Required parameter msExpire was null or undefined when calling apiSysCacheBeginCacheLockKeyMsTimeoutMsExpireThrowOnFailurePost.');
  51. }
  52. // verify required parameter 'throwOnFailure' is not null or undefined
  53. if (throwOnFailure === null || throwOnFailure === undefined) {
  54. throw new RequiredError('throwOnFailure','Required parameter throwOnFailure was null or undefined when calling apiSysCacheBeginCacheLockKeyMsTimeoutMsExpireThrowOnFailurePost.');
  55. }
  56. const localVarPath = `/api/sysCache/beginCacheLock/{key}/{msTimeout}/{msExpire}/{throwOnFailure}`
  57. .replace(`{${"key"}}`, encodeURIComponent(String(key)))
  58. .replace(`{${"msTimeout"}}`, encodeURIComponent(String(msTimeout)))
  59. .replace(`{${"msExpire"}}`, encodeURIComponent(String(msExpire)))
  60. .replace(`{${"throwOnFailure"}}`, encodeURIComponent(String(throwOnFailure)));
  61. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  62. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  63. let baseOptions;
  64. if (configuration) {
  65. baseOptions = configuration.baseOptions;
  66. }
  67. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  68. const localVarHeaderParameter = {} as any;
  69. const localVarQueryParameter = {} as any;
  70. // authentication Bearer required
  71. // http bearer authentication required
  72. if (configuration && configuration.accessToken) {
  73. const accessToken = typeof configuration.accessToken === 'function'
  74. ? await configuration.accessToken()
  75. : await configuration.accessToken;
  76. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  77. }
  78. const query = new URLSearchParams(localVarUrlObj.search);
  79. for (const key in localVarQueryParameter) {
  80. query.set(key, localVarQueryParameter[key]);
  81. }
  82. for (const key in options.params) {
  83. query.set(key, options.params[key]);
  84. }
  85. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  86. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  87. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  88. return {
  89. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  90. options: localVarRequestOptions,
  91. };
  92. },
  93. /**
  94. *
  95. * @summary 清空所有缓存 🔖
  96. * @param {*} [options] Override http request option.
  97. * @throws {RequiredError}
  98. */
  99. apiSysCacheClearPost: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  100. const localVarPath = `/api/sysCache/clear`;
  101. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  102. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  103. let baseOptions;
  104. if (configuration) {
  105. baseOptions = configuration.baseOptions;
  106. }
  107. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  108. const localVarHeaderParameter = {} as any;
  109. const localVarQueryParameter = {} as any;
  110. // authentication Bearer required
  111. // http bearer authentication required
  112. if (configuration && configuration.accessToken) {
  113. const accessToken = typeof configuration.accessToken === 'function'
  114. ? await configuration.accessToken()
  115. : await configuration.accessToken;
  116. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  117. }
  118. const query = new URLSearchParams(localVarUrlObj.search);
  119. for (const key in localVarQueryParameter) {
  120. query.set(key, localVarQueryParameter[key]);
  121. }
  122. for (const key in options.params) {
  123. query.set(key, options.params[key]);
  124. }
  125. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  126. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  127. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  128. return {
  129. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  130. options: localVarRequestOptions,
  131. };
  132. },
  133. /**
  134. *
  135. * @summary 根据键名前缀删除缓存 🔖
  136. * @param {string} prefixKey 键名前缀
  137. * @param {*} [options] Override http request option.
  138. * @throws {RequiredError}
  139. */
  140. apiSysCacheDeleteByPreKeyPrefixKeyPost: async (prefixKey: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  141. // verify required parameter 'prefixKey' is not null or undefined
  142. if (prefixKey === null || prefixKey === undefined) {
  143. throw new RequiredError('prefixKey','Required parameter prefixKey was null or undefined when calling apiSysCacheDeleteByPreKeyPrefixKeyPost.');
  144. }
  145. const localVarPath = `/api/sysCache/deleteByPreKey/{prefixKey}`
  146. .replace(`{${"prefixKey"}}`, encodeURIComponent(String(prefixKey)));
  147. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  148. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  149. let baseOptions;
  150. if (configuration) {
  151. baseOptions = configuration.baseOptions;
  152. }
  153. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  154. const localVarHeaderParameter = {} as any;
  155. const localVarQueryParameter = {} as any;
  156. // authentication Bearer required
  157. // http bearer authentication required
  158. if (configuration && configuration.accessToken) {
  159. const accessToken = typeof configuration.accessToken === 'function'
  160. ? await configuration.accessToken()
  161. : await configuration.accessToken;
  162. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  163. }
  164. const query = new URLSearchParams(localVarUrlObj.search);
  165. for (const key in localVarQueryParameter) {
  166. query.set(key, localVarQueryParameter[key]);
  167. }
  168. for (const key in options.params) {
  169. query.set(key, options.params[key]);
  170. }
  171. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  172. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  173. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  174. return {
  175. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  176. options: localVarRequestOptions,
  177. };
  178. },
  179. /**
  180. *
  181. * @summary 删除缓存 🔖
  182. * @param {string} key
  183. * @param {*} [options] Override http request option.
  184. * @throws {RequiredError}
  185. */
  186. apiSysCacheDeleteKeyPost: async (key: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  187. // verify required parameter 'key' is not null or undefined
  188. if (key === null || key === undefined) {
  189. throw new RequiredError('key','Required parameter key was null or undefined when calling apiSysCacheDeleteKeyPost.');
  190. }
  191. const localVarPath = `/api/sysCache/delete/{key}`
  192. .replace(`{${"key"}}`, encodeURIComponent(String(key)));
  193. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  194. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  195. let baseOptions;
  196. if (configuration) {
  197. baseOptions = configuration.baseOptions;
  198. }
  199. const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
  200. const localVarHeaderParameter = {} as any;
  201. const localVarQueryParameter = {} as any;
  202. // authentication Bearer required
  203. // http bearer authentication required
  204. if (configuration && configuration.accessToken) {
  205. const accessToken = typeof configuration.accessToken === 'function'
  206. ? await configuration.accessToken()
  207. : await configuration.accessToken;
  208. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  209. }
  210. const query = new URLSearchParams(localVarUrlObj.search);
  211. for (const key in localVarQueryParameter) {
  212. query.set(key, localVarQueryParameter[key]);
  213. }
  214. for (const key in options.params) {
  215. query.set(key, options.params[key]);
  216. }
  217. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  218. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  219. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  220. return {
  221. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  222. options: localVarRequestOptions,
  223. };
  224. },
  225. /**
  226. *
  227. * @summary 获取缓存键名集合 🔖
  228. * @param {*} [options] Override http request option.
  229. * @throws {RequiredError}
  230. */
  231. apiSysCacheKeyListGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  232. const localVarPath = `/api/sysCache/keyList`;
  233. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  234. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  235. let baseOptions;
  236. if (configuration) {
  237. baseOptions = configuration.baseOptions;
  238. }
  239. const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
  240. const localVarHeaderParameter = {} as any;
  241. const localVarQueryParameter = {} as any;
  242. // authentication Bearer required
  243. // http bearer authentication required
  244. if (configuration && configuration.accessToken) {
  245. const accessToken = typeof configuration.accessToken === 'function'
  246. ? await configuration.accessToken()
  247. : await configuration.accessToken;
  248. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  249. }
  250. const query = new URLSearchParams(localVarUrlObj.search);
  251. for (const key in localVarQueryParameter) {
  252. query.set(key, localVarQueryParameter[key]);
  253. }
  254. for (const key in options.params) {
  255. query.set(key, options.params[key]);
  256. }
  257. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  258. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  259. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  260. return {
  261. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  262. options: localVarRequestOptions,
  263. };
  264. },
  265. /**
  266. *
  267. * @summary 根据键名前缀获取键名集合 🔖
  268. * @param {string} prefixKey 键名前缀
  269. * @param {*} [options] Override http request option.
  270. * @throws {RequiredError}
  271. */
  272. apiSysCacheKeysByPrefixKeyPrefixKeyGet: async (prefixKey: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  273. // verify required parameter 'prefixKey' is not null or undefined
  274. if (prefixKey === null || prefixKey === undefined) {
  275. throw new RequiredError('prefixKey','Required parameter prefixKey was null or undefined when calling apiSysCacheKeysByPrefixKeyPrefixKeyGet.');
  276. }
  277. const localVarPath = `/api/sysCache/keysByPrefixKey/{prefixKey}`
  278. .replace(`{${"prefixKey"}}`, encodeURIComponent(String(prefixKey)));
  279. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  280. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  281. let baseOptions;
  282. if (configuration) {
  283. baseOptions = configuration.baseOptions;
  284. }
  285. const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
  286. const localVarHeaderParameter = {} as any;
  287. const localVarQueryParameter = {} as any;
  288. // authentication Bearer required
  289. // http bearer authentication required
  290. if (configuration && configuration.accessToken) {
  291. const accessToken = typeof configuration.accessToken === 'function'
  292. ? await configuration.accessToken()
  293. : await configuration.accessToken;
  294. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  295. }
  296. const query = new URLSearchParams(localVarUrlObj.search);
  297. for (const key in localVarQueryParameter) {
  298. query.set(key, localVarQueryParameter[key]);
  299. }
  300. for (const key in options.params) {
  301. query.set(key, options.params[key]);
  302. }
  303. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  304. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  305. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  306. return {
  307. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  308. options: localVarRequestOptions,
  309. };
  310. },
  311. /**
  312. *
  313. * @summary 获取缓存值 🔖
  314. * @param {string} key
  315. * @param {*} [options] Override http request option.
  316. * @throws {RequiredError}
  317. */
  318. apiSysCacheValueKeyGet: async (key: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  319. // verify required parameter 'key' is not null or undefined
  320. if (key === null || key === undefined) {
  321. throw new RequiredError('key','Required parameter key was null or undefined when calling apiSysCacheValueKeyGet.');
  322. }
  323. const localVarPath = `/api/sysCache/value/{key}`
  324. .replace(`{${"key"}}`, encodeURIComponent(String(key)));
  325. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  326. const localVarUrlObj = new URL(localVarPath, 'https://example.com');
  327. let baseOptions;
  328. if (configuration) {
  329. baseOptions = configuration.baseOptions;
  330. }
  331. const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
  332. const localVarHeaderParameter = {} as any;
  333. const localVarQueryParameter = {} as any;
  334. // authentication Bearer required
  335. // http bearer authentication required
  336. if (configuration && configuration.accessToken) {
  337. const accessToken = typeof configuration.accessToken === 'function'
  338. ? await configuration.accessToken()
  339. : await configuration.accessToken;
  340. localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
  341. }
  342. const query = new URLSearchParams(localVarUrlObj.search);
  343. for (const key in localVarQueryParameter) {
  344. query.set(key, localVarQueryParameter[key]);
  345. }
  346. for (const key in options.params) {
  347. query.set(key, options.params[key]);
  348. }
  349. localVarUrlObj.search = (new URLSearchParams(query)).toString();
  350. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  351. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  352. return {
  353. url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
  354. options: localVarRequestOptions,
  355. };
  356. },
  357. }
  358. };
  359. /**
  360. * SysCacheApi - functional programming interface
  361. * @export
  362. */
  363. export const SysCacheApiFp = function(configuration?: Configuration) {
  364. return {
  365. /**
  366. *
  367. * @summary 申请分布式锁
  368. * @param {string} key 要锁定的key
  369. * @param {number} msTimeout 申请锁等待的时间,单位毫秒
  370. * @param {number} msExpire 锁过期时间,超过该时间没有主动是放则自动是放,必须整数秒,单位毫秒
  371. * @param {boolean} throwOnFailure 失败时是否抛出异常,如不抛出异常,可通过判断返回null得知申请锁失败
  372. * @param {*} [options] Override http request option.
  373. * @throws {RequiredError}
  374. */
  375. async apiSysCacheBeginCacheLockKeyMsTimeoutMsExpireThrowOnFailurePost(key: string, msTimeout: number, msExpire: number, throwOnFailure: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultIDisposable>>> {
  376. const localVarAxiosArgs = await SysCacheApiAxiosParamCreator(configuration).apiSysCacheBeginCacheLockKeyMsTimeoutMsExpireThrowOnFailurePost(key, msTimeout, msExpire, throwOnFailure, options);
  377. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  378. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  379. return axios.request(axiosRequestArgs);
  380. };
  381. },
  382. /**
  383. *
  384. * @summary 清空所有缓存 🔖
  385. * @param {*} [options] Override http request option.
  386. * @throws {RequiredError}
  387. */
  388. async apiSysCacheClearPost(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
  389. const localVarAxiosArgs = await SysCacheApiAxiosParamCreator(configuration).apiSysCacheClearPost(options);
  390. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  391. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  392. return axios.request(axiosRequestArgs);
  393. };
  394. },
  395. /**
  396. *
  397. * @summary 根据键名前缀删除缓存 🔖
  398. * @param {string} prefixKey 键名前缀
  399. * @param {*} [options] Override http request option.
  400. * @throws {RequiredError}
  401. */
  402. async apiSysCacheDeleteByPreKeyPrefixKeyPost(prefixKey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultInt32>>> {
  403. const localVarAxiosArgs = await SysCacheApiAxiosParamCreator(configuration).apiSysCacheDeleteByPreKeyPrefixKeyPost(prefixKey, options);
  404. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  405. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  406. return axios.request(axiosRequestArgs);
  407. };
  408. },
  409. /**
  410. *
  411. * @summary 删除缓存 🔖
  412. * @param {string} key
  413. * @param {*} [options] Override http request option.
  414. * @throws {RequiredError}
  415. */
  416. async apiSysCacheDeleteKeyPost(key: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultInt32>>> {
  417. const localVarAxiosArgs = await SysCacheApiAxiosParamCreator(configuration).apiSysCacheDeleteKeyPost(key, options);
  418. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  419. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  420. return axios.request(axiosRequestArgs);
  421. };
  422. },
  423. /**
  424. *
  425. * @summary 获取缓存键名集合 🔖
  426. * @param {*} [options] Override http request option.
  427. * @throws {RequiredError}
  428. */
  429. async apiSysCacheKeyListGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListString>>> {
  430. const localVarAxiosArgs = await SysCacheApiAxiosParamCreator(configuration).apiSysCacheKeyListGet(options);
  431. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  432. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  433. return axios.request(axiosRequestArgs);
  434. };
  435. },
  436. /**
  437. *
  438. * @summary 根据键名前缀获取键名集合 🔖
  439. * @param {string} prefixKey 键名前缀
  440. * @param {*} [options] Override http request option.
  441. * @throws {RequiredError}
  442. */
  443. async apiSysCacheKeysByPrefixKeyPrefixKeyGet(prefixKey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListString>>> {
  444. const localVarAxiosArgs = await SysCacheApiAxiosParamCreator(configuration).apiSysCacheKeysByPrefixKeyPrefixKeyGet(prefixKey, options);
  445. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  446. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  447. return axios.request(axiosRequestArgs);
  448. };
  449. },
  450. /**
  451. *
  452. * @summary 获取缓存值 🔖
  453. * @param {string} key
  454. * @param {*} [options] Override http request option.
  455. * @throws {RequiredError}
  456. */
  457. async apiSysCacheValueKeyGet(key: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultObject>>> {
  458. const localVarAxiosArgs = await SysCacheApiAxiosParamCreator(configuration).apiSysCacheValueKeyGet(key, options);
  459. return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
  460. const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
  461. return axios.request(axiosRequestArgs);
  462. };
  463. },
  464. }
  465. };
  466. /**
  467. * SysCacheApi - factory interface
  468. * @export
  469. */
  470. export const SysCacheApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
  471. return {
  472. /**
  473. *
  474. * @summary 申请分布式锁
  475. * @param {string} key 要锁定的key
  476. * @param {number} msTimeout 申请锁等待的时间,单位毫秒
  477. * @param {number} msExpire 锁过期时间,超过该时间没有主动是放则自动是放,必须整数秒,单位毫秒
  478. * @param {boolean} throwOnFailure 失败时是否抛出异常,如不抛出异常,可通过判断返回null得知申请锁失败
  479. * @param {*} [options] Override http request option.
  480. * @throws {RequiredError}
  481. */
  482. async apiSysCacheBeginCacheLockKeyMsTimeoutMsExpireThrowOnFailurePost(key: string, msTimeout: number, msExpire: number, throwOnFailure: boolean, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultIDisposable>> {
  483. return SysCacheApiFp(configuration).apiSysCacheBeginCacheLockKeyMsTimeoutMsExpireThrowOnFailurePost(key, msTimeout, msExpire, throwOnFailure, options).then((request) => request(axios, basePath));
  484. },
  485. /**
  486. *
  487. * @summary 清空所有缓存 🔖
  488. * @param {*} [options] Override http request option.
  489. * @throws {RequiredError}
  490. */
  491. async apiSysCacheClearPost(options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
  492. return SysCacheApiFp(configuration).apiSysCacheClearPost(options).then((request) => request(axios, basePath));
  493. },
  494. /**
  495. *
  496. * @summary 根据键名前缀删除缓存 🔖
  497. * @param {string} prefixKey 键名前缀
  498. * @param {*} [options] Override http request option.
  499. * @throws {RequiredError}
  500. */
  501. async apiSysCacheDeleteByPreKeyPrefixKeyPost(prefixKey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultInt32>> {
  502. return SysCacheApiFp(configuration).apiSysCacheDeleteByPreKeyPrefixKeyPost(prefixKey, options).then((request) => request(axios, basePath));
  503. },
  504. /**
  505. *
  506. * @summary 删除缓存 🔖
  507. * @param {string} key
  508. * @param {*} [options] Override http request option.
  509. * @throws {RequiredError}
  510. */
  511. async apiSysCacheDeleteKeyPost(key: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultInt32>> {
  512. return SysCacheApiFp(configuration).apiSysCacheDeleteKeyPost(key, options).then((request) => request(axios, basePath));
  513. },
  514. /**
  515. *
  516. * @summary 获取缓存键名集合 🔖
  517. * @param {*} [options] Override http request option.
  518. * @throws {RequiredError}
  519. */
  520. async apiSysCacheKeyListGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListString>> {
  521. return SysCacheApiFp(configuration).apiSysCacheKeyListGet(options).then((request) => request(axios, basePath));
  522. },
  523. /**
  524. *
  525. * @summary 根据键名前缀获取键名集合 🔖
  526. * @param {string} prefixKey 键名前缀
  527. * @param {*} [options] Override http request option.
  528. * @throws {RequiredError}
  529. */
  530. async apiSysCacheKeysByPrefixKeyPrefixKeyGet(prefixKey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListString>> {
  531. return SysCacheApiFp(configuration).apiSysCacheKeysByPrefixKeyPrefixKeyGet(prefixKey, options).then((request) => request(axios, basePath));
  532. },
  533. /**
  534. *
  535. * @summary 获取缓存值 🔖
  536. * @param {string} key
  537. * @param {*} [options] Override http request option.
  538. * @throws {RequiredError}
  539. */
  540. async apiSysCacheValueKeyGet(key: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultObject>> {
  541. return SysCacheApiFp(configuration).apiSysCacheValueKeyGet(key, options).then((request) => request(axios, basePath));
  542. },
  543. };
  544. };
  545. /**
  546. * SysCacheApi - object-oriented interface
  547. * @export
  548. * @class SysCacheApi
  549. * @extends {BaseAPI}
  550. */
  551. export class SysCacheApi extends BaseAPI {
  552. /**
  553. *
  554. * @summary 申请分布式锁
  555. * @param {string} key 要锁定的key
  556. * @param {number} msTimeout 申请锁等待的时间,单位毫秒
  557. * @param {number} msExpire 锁过期时间,超过该时间没有主动是放则自动是放,必须整数秒,单位毫秒
  558. * @param {boolean} throwOnFailure 失败时是否抛出异常,如不抛出异常,可通过判断返回null得知申请锁失败
  559. * @param {*} [options] Override http request option.
  560. * @throws {RequiredError}
  561. * @memberof SysCacheApi
  562. */
  563. public async apiSysCacheBeginCacheLockKeyMsTimeoutMsExpireThrowOnFailurePost(key: string, msTimeout: number, msExpire: number, throwOnFailure: boolean, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultIDisposable>> {
  564. return SysCacheApiFp(this.configuration).apiSysCacheBeginCacheLockKeyMsTimeoutMsExpireThrowOnFailurePost(key, msTimeout, msExpire, throwOnFailure, options).then((request) => request(this.axios, this.basePath));
  565. }
  566. /**
  567. *
  568. * @summary 清空所有缓存 🔖
  569. * @param {*} [options] Override http request option.
  570. * @throws {RequiredError}
  571. * @memberof SysCacheApi
  572. */
  573. public async apiSysCacheClearPost(options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
  574. return SysCacheApiFp(this.configuration).apiSysCacheClearPost(options).then((request) => request(this.axios, this.basePath));
  575. }
  576. /**
  577. *
  578. * @summary 根据键名前缀删除缓存 🔖
  579. * @param {string} prefixKey 键名前缀
  580. * @param {*} [options] Override http request option.
  581. * @throws {RequiredError}
  582. * @memberof SysCacheApi
  583. */
  584. public async apiSysCacheDeleteByPreKeyPrefixKeyPost(prefixKey: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultInt32>> {
  585. return SysCacheApiFp(this.configuration).apiSysCacheDeleteByPreKeyPrefixKeyPost(prefixKey, options).then((request) => request(this.axios, this.basePath));
  586. }
  587. /**
  588. *
  589. * @summary 删除缓存 🔖
  590. * @param {string} key
  591. * @param {*} [options] Override http request option.
  592. * @throws {RequiredError}
  593. * @memberof SysCacheApi
  594. */
  595. public async apiSysCacheDeleteKeyPost(key: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultInt32>> {
  596. return SysCacheApiFp(this.configuration).apiSysCacheDeleteKeyPost(key, options).then((request) => request(this.axios, this.basePath));
  597. }
  598. /**
  599. *
  600. * @summary 获取缓存键名集合 🔖
  601. * @param {*} [options] Override http request option.
  602. * @throws {RequiredError}
  603. * @memberof SysCacheApi
  604. */
  605. public async apiSysCacheKeyListGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListString>> {
  606. return SysCacheApiFp(this.configuration).apiSysCacheKeyListGet(options).then((request) => request(this.axios, this.basePath));
  607. }
  608. /**
  609. *
  610. * @summary 根据键名前缀获取键名集合 🔖
  611. * @param {string} prefixKey 键名前缀
  612. * @param {*} [options] Override http request option.
  613. * @throws {RequiredError}
  614. * @memberof SysCacheApi
  615. */
  616. public async apiSysCacheKeysByPrefixKeyPrefixKeyGet(prefixKey: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListString>> {
  617. return SysCacheApiFp(this.configuration).apiSysCacheKeysByPrefixKeyPrefixKeyGet(prefixKey, options).then((request) => request(this.axios, this.basePath));
  618. }
  619. /**
  620. *
  621. * @summary 获取缓存值 🔖
  622. * @param {string} key
  623. * @param {*} [options] Override http request option.
  624. * @throws {RequiredError}
  625. * @memberof SysCacheApi
  626. */
  627. public async apiSysCacheValueKeyGet(key: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultObject>> {
  628. return SysCacheApiFp(this.configuration).apiSysCacheValueKeyGet(key, options).then((request) => request(this.axios, this.basePath));
  629. }
  630. }