Options
All
  • Public
  • Public/Protected
  • All
Menu

MAGE API Documentation

MAGE logo

Here you will find both the API documentation for MAGE.

New to MAGE? Looking for a list of features or configuration options? You should have a look at the user documentation first.

Frequently Used APIs

Name Description
MAGE MAGE general APIs (start, stop, initialization and configuration)
State Transactional state object (mostly provided by user commands)
Archivist Database access layer
Logger Logging and log levels
Configuration Configuration access
Core MAGE Core APIs (HTTP Server, MsgServer, etc.)

See also

Index

Type aliases

AuthenticateCallback

AuthenticateCallback: function

Auth callbacks

Type declaration

    • (error: Error | null, userId: string | number, acl: string[]): void
    • Parameters

      • error: Error | null
      • userId: string | number
      • acl: string[]

      Returns void

BanCallback

BanCallback: function

Type declaration

    • (error: Error | null): void
    • Parameters

      • error: Error | null

      Returns void

ChangePasswordCallback

ChangePasswordCallback: function

Type declaration

    • (error: Error | null): void
    • Parameters

      • error: Error | null

      Returns void

ConfigurationLabel

ConfigurationLabel: string | string[]

Configuration labels can take one of the following formats:

  • 'a.b.c'
  • ['a', 'b', 'c']

LoginCallback

LoginCallback: function

Type declaration

    • (error: Error | null, session: Session): void
    • Parameters

      • error: Error | null
      • session: Session

      Returns void

MmrpEnvelopeFlag

MmrpEnvelopeFlag: "NONE" | "TRACK_ROUTE" | number

There is currently only 1 flag, namely ‘TRACK_ROUTE’.

When this flag is active, the returnRoute must be kept around in the envelope as it travels across the network.

MmrpEnvelopeMessage

MmrpEnvelopeMessage: string | Buffer

Data which may be put into an MMRP envelope

MmrpEnvelopeRoute

MmrpEnvelopeRoute: string[]

RegisterCallback

RegisterCallback: function

Type declaration

    • (error: Error | null, userId: string): void
    • Parameters

      • error: Error | null
      • userId: string

      Returns void

ServiceErrorEventHandler

ServiceErrorEventHandler: function

Service discovery callback function for 'error' events

Type declaration

    • (error: Error): void
    • Parameters

      • error: Error

      Returns void

ServiceEventHandler

ServiceEventHandler: function

Service discovery callback function for 'up' and 'down' events

Type declaration

ServiceEventName

ServiceEventName: "up" | "down" | "error"

Service discovery service events

TimeConfig

TimeConfig: object

Type declaration

  • accelerationFactor: number

    How fast or slow should time fast? Values smaller than 1 slow down time, and values higher than 1 accelerate time.

    type

    {number}

  • offset: number

    By how much time, in milliseconds, should time be offset?

    type

    {number}

  • startAt: number

    From which point in time should we consider time accelerated?

    type

    {number}

UnbanCallback

UnbanCallback: function

Type declaration

    • (error: Error | null): void
    • Parameters

      • error: Error | null

      Returns void

VaultOperation

VaultOperation: "add" | "set" | "del" | "touch"

Variables

Export assignment config

config: Config