1.1.5 • Published 6 years ago

egg-plugin-acm v1.1.5

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

egg-hello

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

Install

$ npm i egg-plugin-acm --save

Usage

// {app_root}/config/plugin.js
exports.eggPluginAcm = {
  enable: true,
  package: 'egg-plugin-acm',
};

Configuration

// {app_root}/config/config.default.js
exports.acm = {
  endpoint: '',
  namespace: '',
  accessKey: '',
  secretKey: '',
  requestTimeout: 6000,
  group: '',
  dataId: '',
};

// or
exports.acm = {
  endpoint: '',
  namespace: '',
  accessKey: '',
  secretKey: '',
  requestTimeout: 6000,
  clients: [
    {
      key: 'acm1',
      group: '',
      dataId: '',
    },
    {
      key: 'acm2',
      group: '',
      dataId: '',
    },
  ],
};

Controller

// 在application中可以这样调用
ctx.app.acm.getAcm(key1, key2 ...);

// or
ctx.app.acm.getAcm([key1, key2 ...]);

// or 如果配置多个使用get获取
ctx.app.acm.acm1.getAcm(key1, key2 ...);

// or
ctx.app.acm.acm2.getAcm([key1, key2 ...]);

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

Example

Questions & Suggestions

Please open an issue here.

License

MIT

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago