update to latest standards
This commit is contained in:
parent
95c5fb7e83
commit
1c8d6bf96e
@ -1,4 +0,0 @@
|
||||
/**
|
||||
* This file contains logic to bridge certain messages into another channel
|
||||
*/
|
||||
export class ChannelBridge {}
|
@ -16,5 +16,7 @@ export class UniverseManager {
|
||||
* @param channelName the name of the channel
|
||||
* @param authSecret the secret against which to verify members of the channel
|
||||
*/
|
||||
public async registerChannel(channelName: string, authSecret: string) {}
|
||||
public async registerChannel(channelName: string, authSecret: string) {
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,8 @@ export interface ISmartUniverseConstructorOptions {
|
||||
}
|
||||
|
||||
export interface IServerGetMessagesRequestBody {
|
||||
channel: string;
|
||||
topic?: string;
|
||||
youngerThan: number;
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,25 @@
|
||||
import * as plugins from './smartuniverse.plugins';
|
||||
|
||||
import { Objectmap } from 'lik';
|
||||
|
||||
/**
|
||||
* enables a set of apps to talk within their own limited borders.
|
||||
* enables messages to stay within a certain scope.
|
||||
*/
|
||||
export class UniverseChannel {
|
||||
topic: string;
|
||||
/**
|
||||
* stores the channels that are available within the universe
|
||||
*/
|
||||
public static channelStore = new Objectmap();
|
||||
|
||||
/**
|
||||
* creates new channels
|
||||
* @param channelArg the name of the topic
|
||||
* @param secretArg the secret thats used for a certain topic.
|
||||
*/
|
||||
public static createChannel = (channelArg: string, secretArg: string) => {
|
||||
|
||||
}
|
||||
|
||||
credentials: {
|
||||
user: string;
|
||||
password: string;
|
||||
|
@ -15,11 +15,19 @@ export class UniverseMessage {
|
||||
*/
|
||||
public id: number;
|
||||
public universeStore: UniverseStore;
|
||||
public timestamp: TimeStamp;
|
||||
public message: string;
|
||||
public attachedPayload: any;
|
||||
public destructionTimer: Timer;
|
||||
public timestamp: TimeStamp; // when has this message been created
|
||||
public topic: string; // enables unprotected grouping of messages for efficiency purposes.
|
||||
public message: string; // the actual message
|
||||
public attachedPayload: any; // any attached payloads. Can be of binary format.
|
||||
public destructionTimer: Timer; // a timer to take care of message destruction
|
||||
|
||||
/**
|
||||
* the constructor to create a universe message
|
||||
* @param parentUniverseStore
|
||||
* @param messageArg
|
||||
* @param attachedPayloadArg
|
||||
* @param selfdestructAfterArg
|
||||
*/
|
||||
constructor(
|
||||
parentUniverseStore: UniverseStore,
|
||||
messageArg: string,
|
||||
|
Loading…
Reference in New Issue
Block a user