Skip to content

Commit

Permalink
feat(general): add $id handing
Browse files Browse the repository at this point in the history
  • Loading branch information
wzr1337 committed Feb 1, 2018
1 parent c388d1b commit 6482e89
Show file tree
Hide file tree
Showing 17 changed files with 590 additions and 601 deletions.
4 changes: 2 additions & 2 deletions dist/cdn/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/cdn/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 33 additions & 31 deletions dist/rsi.server.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,53 +14,55 @@ export declare class RsiServer {
private elementUtil;
private port;
private serviceRegistry;
/** the servers id */
private ID;
constructor();
stop(): void;
run(options?: RunOptions): Promise<any>;
addService(service: Service): void;
announceService(service: Service): void;
/**
* retrieve all resources of a service
*
* @param service the service to discover
*
* returns an express route callback
*/
* retrieve all resources of a service
*
* @param service the service to discover
*
* returns an express route callback
*/
private serviceGET(service);
/**
* handling GET requests on element level (retrieve element details).
*
* @param service The service name.
* @param resource The resource name.
*/
* handling GET requests on element level (retrieve element details).
*
* @param service The service name.
* @param resource The resource name.
*/
private elementGET(service, resource);
/**
* handling GET requests on resource level (element listing).
*
* @param service The service name.
* @param resource The resource name.
*/
* handling GET requests on resource level (element listing).
*
* @param service The service name.
* @param resource The resource name.
*/
resourceGET(service: Service, resource: Resource): (req: express.Request, res: express.Response, next: express.NextFunction) => void;
/**
* handling POST requests on resource level (elment creation).
*
* @param service The service name.
* @param resource The resource name.
*/
* handling POST requests on resource level (elment creation).
*
* @param service The service name.
* @param resource The resource name.
*/
resourcePOST: (service: Service, resource: Resource) => (req: express.Request, res: express.Response, next: express.NextFunction) => void;
serviceGETSpec: (service: Service) => (req: express.Request, res: express.Response, next: express.NextFunction) => void;
/**
* handling DELETE requests on element level (element removal or property reset).
*
* @param service The service name.
* @param resource The resource name.
*/
* handling DELETE requests on element level (element removal or property reset).
*
* @param service The service name.
* @param resource The resource name.
*/
elementDELETE: (service: Service, resource: Resource) => (req: express.Request, res: express.Response, next: express.NextFunction) => void;
/**
* handling POST requests on element level (modify an existing element).
*
* @param service The service name.
* @param resource The resource name.
*/
* handling POST requests on element level (modify an existing element).
*
* @param service The service name.
* @param resource The resource name.
*/
private elementPOST(service, resource);
}
Loading

0 comments on commit 6482e89

Please sign in to comment.