0.0.2 • Published 5 years ago

deepexi-platform-sdk v0.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

egg-deepexi-platform-sdk

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Install

$ npm i deepexi-platform-sdk --save

Usage

// {app_root}/config/plugin.js
exports.deepexiPlatformSdk = {
  enable: true,
  package: 'deepexi-platform-sdk',
};

Configuration

// {app_root}/config/config.default.js
exports.deepexiPlatformSdk = {
  logCenter: {
    moduleName: '中台名称',                    // 中台中心名称
    rocketmqServer: 'x.x.x.x:9876',    // 日志中心rocketmq地址
    producerGroup: 'operation-log-producer', // 日志中心生产者组
    topic: 'OPERATION_TASK',                 // 日志中心接收消息topic组
  }
};

see config/config.default.js for more detail.

Dependency

SDK对接spaas部分接口,由于抓取当前登录人信息,需要依赖egg-authorization插件,需要确认检查: egg-authorization插件已整合进项目,并且处于enable状态 访问接口时,带有Authorization认证头部

Example

  /**
   * @OpertionLogAop 
   * @featureDescription  方法描述
   * @functionName  功能模块名称 
   * ...其他文档注释
   */
  async deployment() {
    ...
    const ctx = this.ctx
  }

Questions & Suggestions

...

License

MIT