mirror of
https://github.com/unraid/api.git
synced 2026-01-16 13:39:51 -06:00
25 lines
496 B
TypeScript
25 lines
496 B
TypeScript
import NodeCache from 'node-cache';
|
|
|
|
export const userCache = new NodeCache();
|
|
|
|
type URL = string;
|
|
type IpAddress = string;
|
|
type Status = 'online' | 'offline';
|
|
|
|
export interface CachedUser {
|
|
profile: {
|
|
username: string;
|
|
url: URL;
|
|
avatar: URL;
|
|
},
|
|
servers: [{
|
|
guid: string;
|
|
apikey: string;
|
|
name: string;
|
|
status: Status;
|
|
wanip: IpAddress;
|
|
lanip: IpAddress;
|
|
localurl: URL;
|
|
remoteurl: string
|
|
}]
|
|
}; |