Skip to content

Instantly share code, notes, and snippets.

@nothingismagick
Last active May 22, 2018 16:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nothingismagick/0d724e234e51e85ca9c4b35c4b952c6d to your computer and use it in GitHub Desktop.
Save nothingismagick/0d724e234e51e85ca9c4b35c4b952c6d to your computer and use it in GitHub Desktop.
Spec description for AXIOM°
/**
* module registration
**/
"modules" : {
$moduleName : {
"description" : String,
"commands" : [
$commandName : [
"values": Array, // array is a list of values accepted by this command
"interface" : one.of.interfaceTypes
],
"which" : "filelocation" // this should be an absolute path to the binary / memory location
} ...
}
/**
* ws:// WebRemote registration with DAEMON either it gets an answer, or it receives an error code "500"
**/
"message:WebRemote:whoami": {
"sender" : UUID, // WebRemote's UUID / cli wrapper
"modules" : modules.all,
"status" : one.of(messages.status)
}
/**
* ws:// DAEMON response to whoami
**/
"message:WebRemote:whoami" : {
"DAEMON_UUID": UUID,
"ACCESS" : one.of(messages.access)
}
/**
* ws:// control communication from WebRemote
**/
"message:WebRemote:CMD": {
"sender" : UUID, // WebRemote's UUID / cli wrapper
"module" : $moduleName,
"command" : one.of($moduleName.commands),
"value" : one.of($moduleName.command(this).values),
"timestamp" : timestamp
}
/**
* ws:// communication from DAEMON
**/
"message:DAEMON": {
"sender" : UUID, // DAEMON's UUID
"access" : one.of(messages.access)
"module" : $moduleName
"response" : one.of(messages),
"timestamp" : timestamp
}
/**
* messages
**/
"messages" : {
"access" : ["access permitted", "access denied"]
"status" : ["online", "working", err]
"success" : $moduleName + "succeeded",
"error" : "error: " + err,
"malformed" : "command " + cmd + " malformed" ,
"shutdown": "shutting down, see ya"
}
/**
* WebInterface types
**/
"interfaceTypes" : array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment