Skip to main content

index

Gofer Engine supports a variety of message types. Each one of these message types begins by implementing the IMsg interface. This interface is defined as follows:

IMsg.ts
interface IMsg {
kind: string;
setMsg: (msg: any) => IMsg;
json: (normalized?: boolean) => any;
toString: () => string;
set: (path?: string | undefined, value?: any) => IMsg;
setJSON: (path: string | undefined, json: any) => IMsg;
get: (path: string | undefined) => any;
delete: (path: string) => IMsg;
copy: (path: string, toPath: string) => IMsg;
move: (fromPath: string, toPath: string) => IMsg;
}

This interface provides the basic operations and methods to extrapolate data from the message, transform the message, and serialize the message to the raw format.

The specific message types may provide additional methods and properties to further manipulate the message. The following sections will describe each message type in detail.