@anlix-io/flashaudit-node-client
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

flashaudit-node-client

A package used in our products to send audit and in the future general logs to a central & monitorable endpoint

javascript usage:

const FlashAudit = require('@anlix-io/flashaudit-node-client')

const flashAudit = new FlashAudit.FlashAudit({
  client: 'anlix',
  product: 'flashman',
  serverBrokers: ['mycompany.kafka.net:8082'],
  sslEnabled: true,
  auth: {
    username: 'myuser',
    password: 'mypassword'
  },
  runtimeValidation: true,
})

flashAudit.sendCreate({
  user: {
    id: 'ABCdefGHI',
    name: 'foobar',
  },
  object: 'cpe',
  searchable: ['abc', 'myssid', 'myverysecretpassword'],
  values: {
    'whateveritis': 1111,
    'wifi_config.ssid': 'myssid',
    'wifi_config.password': 'myverysecretpassword',
    'mysubobject': {
      'subkey0': {
        'name': 'name0',
        'key': 'subkey0',
        'timestamp': 1000,
      },
      'subkey1': {
        'name': 'name1',
        'key': 'subkey1',
        'timestamp': 2000,
      }
    }
  }
})
.then( function(err) {
  if (err) {
    console.error(err);
  }
})

Readme

Keywords

none

Package Sidebar

Install

npm i @anlix-io/flashaudit-node-client

Weekly Downloads

106

Version

0.1.0

License

ISC

Unpacked Size

190 kB

Total Files

38

Last publish

Collaborators

  • anlix-io