microgateway-plugins
Plugins for Apige Edge Microgateway
Last updated a month ago by keyurkarnik .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install microgateway-plugins 
SYNC missed versions from official npm registry.

Build Status

Plugins

Overview

This repo contains plugins for the microgateway-core project.

These plugins can be loaded into the microgateway calling the load plugin method

Building a plugin

must contain an init method which returns an object literal with all of the handlers

{
  init:function(config,logger,stats){
    return {
    onrequest:function(req,res,[options],next){
    },
    ...
    }
  }
}

init method must return an object with handler methods for each event

the available handlers are

  • on_request
  • ondata_request
  • onend_request
  • on_response
  • ondata_response
  • onend_response
  • onclose_response
  • onerror_response

The handler signature will look like :

function(sourceRequest,sourceResponse,[options],next){}
  • sourceRequest: the request from the northbound server;

  • sourceResponse the response to the northbound server;

  • options: are the full scope of fields you might need to operate on.

    	const options = {
        targetResponse: options.targetResponse,
        targetRequest: options.targetRequest,
        sourceRequest: options.sourceRequest,
        sourceResponse: options.sourceResponse,
        data: data
      };
    
  • you must call next with an error if you errored out like

next([err])

Current Tags

  • 3.0.14                                ...           latest (a month ago)
  • 3.0.1                                ...           pre (a year ago)

72 Versions

  • 3.0.14                                ...           a month ago
  • 3.0.13                                ...           3 months ago
  • 3.0.12                                ...           4 months ago
  • 3.0.11                                ...           7 months ago
  • 3.0.10                                ...           8 months ago
  • 3.0.9                                ...           8 months ago
  • 3.0.8                                ...           9 months ago
  • 3.0.7                                ...           9 months ago
  • 3.0.6                                ...           9 months ago
  • 3.0.5                                ...           9 months ago
  • 3.0.4                                ...           10 months ago
  • 3.0.3                                ...           10 months ago
  • 3.0.2                                ...           10 months ago
  • 3.0.1                                ...           a year ago
  • 3.0.0                                ...           a year ago
  • 2.6.0 [deprecated]           ...           a year ago
  • 2.5.39                                ...           a year ago
  • 2.5.38                                ...           a year ago
  • 2.5.37                                ...           a year ago
  • 2.5.36                                ...           a year ago
  • 2.5.35                                ...           a year ago
  • 2.5.34                                ...           a year ago
  • 2.5.3-3.1                                ...           a year ago
  • 2.5.33                                ...           a year ago
  • 2.5.31-beta                                ...           a year ago
  • 2.5.32-beta                                ...           a year ago
  • 2.3.31                                ...           2 years ago
  • 2.3.30                                ...           2 years ago
  • 2.3.30-beta                                ...           2 years ago
  • 2.3.29                                ...           2 years ago
  • 2.3.28                                ...           2 years ago
  • 2.3.27                                ...           2 years ago
  • 2.3.27-beta                                ...           2 years ago
  • 2.3.26-beta                                ...           2 years ago
  • 2.3.25-beta                                ...           2 years ago
  • 2.3.24                                ...           2 years ago
  • 2.3.24-beta                                ...           2 years ago
  • 2.3.23-beta                                ...           2 years ago
  • 2.3.22                                ...           2 years ago
  • 2.3.21                                ...           2 years ago
  • 2.3.20                                ...           2 years ago
  • 2.3.19                                ...           2 years ago
  • 2.3.19-beta                                ...           2 years ago
  • 2.3.18                                ...           2 years ago
  • 2.3.17                                ...           3 years ago
  • 2.3.16                                ...           3 years ago
  • 2.3.15                                ...           3 years ago
  • 2.3.14                                ...           3 years ago
  • 2.3.12                                ...           3 years ago
  • 2.3.13-beta                                ...           3 years ago
  • 2.3.12-beta                                ...           3 years ago
  • 2.3.11-beta                                ...           3 years ago
  • 2.3.10-beta                                ...           3 years ago
  • 2.3.9-beta                                ...           3 years ago
  • 2.3.8-beta                                ...           3 years ago
  • 2.3.7-beta                                ...           3 years ago
  • 2.3.6-beta                                ...           3 years ago
  • 2.3.5                                ...           3 years ago
  • 3.0.3-early-access                                ...           3 years ago
  • 2.3.5-beta                                ...           3 years ago
  • 3.0.2-early-access                                ...           3 years ago
  • 3.0.1-early-access                                ...           3 years ago
  • 2.3.4-beta                                ...           3 years ago
  • 3.0.0-early-access                                ...           3 years ago
  • 2.3.3                                ...           3 years ago
  • 2.3.2-beta                                ...           3 years ago
  • 2.3.1                                ...           3 years ago
  • 2.0.5                                ...           4 years ago
  • 2.0.4                                ...           4 years ago
  • 2.0.3                                ...           4 years ago
  • 2.0.2                                ...           4 years ago
  • 2.0.1                                ...           4 years ago
Downloads
Today 0
This Week 2
This Month 3
Last Day 2
Last Week 0
Last Month 88
Dependencies (20)
Dev Dependencies (12)

Copyright 2014 - 2016 © taobao.org |