Skip to content

Commit

Permalink
Rename PAWS interface functions. Rename extensions->collectors (#3)
Browse files Browse the repository at this point in the history
* Rename PAWS interface fucntions. Rename extensions->collectors

* Update deps

* Fix deps makefile target
  • Loading branch information
kkuzmin authored Nov 27, 2019
1 parent 3c7907f commit c716205
Show file tree
Hide file tree
Showing 19 changed files with 17 additions and 19 deletions.
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ AWS_LAMBDA_PAWS_PACKAGE_NAME ?= al-paws-collector.zip

all: test package package.zip

deps: node_modules

node_modules:
deps:
npm install

compile: deps
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ $ make deps test package
Clone this repository and build a lambda package by executing:
```
$ git clone https://github.com/alertlogic/paws-collector.git
$ cd paws-collector/extensions/okta
$ cd paws-collector/collectors/okta
$ make deps test package
```

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class OktaCollector extends PawsCollector {
super(context, creds, 'okta');
}

extensionInitCollectionState(event, callback) {
pawsInitCollectionState(event, callback) {
const startTs = process.env.paws_collection_start_ts ?
process.env.paws_collection_start_ts :
moment().toISOString();
Expand All @@ -43,7 +43,7 @@ class OktaCollector extends PawsCollector {
return callback(null, initialState, 1);
}

extensionGetLogs(state, callback) {
pawsGetLogs(state, callback) {
let collector = this;
const oktaClient = new okta.Client({
orgUrl: process.env.paws_endpoint,
Expand Down Expand Up @@ -89,7 +89,7 @@ class OktaCollector extends PawsCollector {
};
}

extensionFormatLog(msg) {
pawsFormatLog(msg) {
const ts = parse.getMsgTs(msg, tsPaths);
const typeId = parse.getMsgTypeId(msg, typeIdPaths);

Expand Down
4 changes: 2 additions & 2 deletions extensions/okta/package.json → collectors/okta/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "okta-collector",
"version": "0.1.0",
"description": "Alert Logic AWS based Okta Log Collector extension",
"description": "Alert Logic AWS based Okta Log Collector",
"repository": {},
"private": true,
"scripts": {
Expand All @@ -19,7 +19,7 @@
"dependencies": {
"@okta/okta-sdk-nodejs": "3.1.0",
"@alertlogic/al-collector-js": "1.3.4",
"@alertlogic/paws-collector": "1.0.0",
"@alertlogic/paws-collector": "1.0.1",
"async": "3.1.0",
"debug": "4.1.1",
"moment": "2.24.0"
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@alertlogic/paws-collector",
"version": "1.0.0",
"version": "1.0.1",
"description": "Alert Logic AWS based API Poll Log Collector Library",
"repository": {
"type": "git",
Expand Down Expand Up @@ -29,7 +29,7 @@
"sinon": "^7.5.0"
},
"dependencies": {
"@alertlogic/al-aws-collector-js": "2.0.0",
"@alertlogic/al-aws-collector-js": "2.0.1",
"async": "3.1.0",
"debug": "4.1.1",
"moment": "2.24.0"
Expand Down
16 changes: 8 additions & 8 deletions paws_collector.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ class PawsCollector extends AlAwsCollector {
* @returns callback - (error, stateObject, nextInvocationTimeoutSec)
*
*/
extensionInitCollectionState(event, callback) {
throw Error("not implemented extensionInitCollectionState()");
pawsInitCollectionState(event, callback) {
throw Error("not implemented pawsInitCollectionState()");
}

/**
Expand All @@ -142,8 +142,8 @@ class PawsCollector extends AlAwsCollector {
* @returns callback - (error, logsArray, stateObject, nextInvocationTimeoutSec)
*
*/
extensionGetLogs(state, callback) {
throw Error("not implemented extensionGetLogs()");
pawsGetLogs(state, callback) {
throw Error("not implemented pawsGetLogs()");
};

/**
Expand All @@ -153,16 +153,16 @@ class PawsCollector extends AlAwsCollector {
* @returns callback - (error, objectWithRegistrationProperties)
*
*/
extensionGetRegisterParameters(event, callback) {
return callback(null, {});;
pawsGetRegisterParameters(event, callback) {
return callback(null, {});
};

/**
* @function extension callback to format received data
* Refer to al-collector-js.buildPayload parseCallback param
*/
extensionFormatLog() {
throw Error("not implemented extensionFormatLog()");
pawsFormatLog() {
throw Error("not implemented pawsFormatLog()");
};
}

Expand Down

0 comments on commit c716205

Please sign in to comment.