0.0.4 • Published 6 years ago

lambda-docs-2md v0.0.4

Weekly downloads
16
License
-
Repository
-
Last release
6 years ago

λ Lambda Docs ⇒ Markdown

Using jsdoc comments, this module creates docs for your aws lambda folder according to this format:


http ⇒ λ getKeys ⇒ cb

Gets authorization keys to subscribe to an IoT Topic

Callback / External Call:

cb(null, body:{ endpointAddress, ...{Credentials} })
arg / paramtypepath
endpointAddressStringaws.iot.describeEndpoint()
CredentialsObjectaws.sts.assumeRole()

Install

yarn add comoponent-docs-2md --dev

Usage

You must add you jsdoc comments tat the very top. The parse does not search past the top.

For example:

/**
 * Gets authorization keys to subscribe to IoT Topic
 * @summary http ⇒ λ getKeys ⇒ cb
 * @param {string} key - event.Records[0].s3.object.key
 * @callback  cb(null, body:{ host, accessKeyId, secretKey, sessionToken  })
 */

const {ElasticTranscoder} = require('aws-sdk')
const et = new ElasticTranscoder({region: 'us-east-1'})

exports.getKeys = (
  { Records:[ { s3: { object: { key } } } ] },
  _,
  cb) => {

  ...

}

In package.json

"scripts":{
  "lambdaDocs": "lambda-docs-2md ./services"
}

TODO

  • ability to add multiple main @external and/or @callback and render by type
0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago

0.0.0

6 years ago