本文整理汇总了TypeScript中wicked-sdk.ErrorCallback类的典型用法代码示例。如果您正苦于以下问题:TypeScript ErrorCallback类的具体用法?TypeScript ErrorCallback怎么用?TypeScript ErrorCallback使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ErrorCallback类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: updateKongConsumer
function updateKongConsumer(portalConsumer: ConsumerInfo, kongConsumer: ConsumerInfo, callback: ErrorCallback) {
// The only thing which may differ here is the custom_id
if (portalConsumer.consumer.custom_id === kongConsumer.consumer.custom_id) {
debug('Custom ID for consumer username ' + portalConsumer.consumer.username + ' matches: ' + portalConsumer.consumer.custom_id);
return callback(null); // Nothing to do.
}
info('Updating consumer ' + kongConsumer.consumer.id + ' (username ' + kongConsumer.consumer.username + ') with new custom_id: ' + portalConsumer.consumer.custom_id);
utils.kongPatchConsumer(kongConsumer.consumer.id, {
custom_id: portalConsumer.consumer.custom_id
}, callback);
}
开发者ID:Haufe-Lexware,项目名称:wicked.portal-kong-adapter,代码行数:11,代码来源:kong.ts
示例2: callback
}, function (err) {
if (err)
return callback(err);
if (!consumerData.next) // no next link --> we're done
return callback(null);
// Continue with next batch; get fresh, as we deleted the other ones.
wipeConsumerBatch(consumerUrl, callback);
});
开发者ID:Haufe-Lexware,项目名称:wicked.portal-kong-adapter,代码行数:9,代码来源:kong.ts
示例3: done
}, function (err, results) {
if (err)
return done(err);
const portalApis = results.portalApis as ApiDescriptionCollection;
const kongApis = results.kongApis as KongApiConfigCollection;
const todoLists = assembleApiTodoLists(portalApis, kongApis);
debug('Infos on sync APIs todo list:');
debug(' add items: ' + todoLists.addList.length);
debug(' update items: ' + todoLists.updateList.length);
debug(' delete items: ' + todoLists.deleteList.length);
//debug(utils.getText(todoLists));
async.series({
updateApis: function (callback) {
// Will call syncPlugins
kong.updateKongApis(sync, todoLists.updateList, callback);
},
deleteApis: function (callback) {
kong.deleteKongApis(todoLists.deleteList, callback);
},
addApis: function (callback) {
kong.addKongApis(todoLists.addList, callback);
}
}, function (err) {
if (err)
return done(err);
debug("syncApis() finished.");
return done(null);
});
});
开发者ID:Haufe-Lexware,项目名称:wicked.portal-kong-adapter,代码行数:31,代码来源:sync.ts
示例4: callback
kongGetRouteForService(apiId, function (err, route) {
if (err)
return callback(err);
kongDeleteRoute(route.id, function (err) {
if (err)
return callback(err);
kongDeleteService(apiId, callback);
})
});
开发者ID:Haufe-Lexware,项目名称:wicked.portal-kong-adapter,代码行数:9,代码来源:utils.ts
示例5: callback
kong.getKongConsumers(portalConsumers, function (err, resultConsumers) {
if (err)
return callback(err);
const kongConsumers = [] as ConsumerInfo[];
for (let i = 0; i < resultConsumers.length; ++i) {
if (resultConsumers[i])
kongConsumers.push(resultConsumers[i]);
}
syncConsumers(portalConsumers, kongConsumers, callback);
});
开发者ID:Haufe-Lexware,项目名称:wicked.portal-kong-adapter,代码行数:10,代码来源:sync.ts
注:本文中的wicked-sdk.ErrorCallback类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论