mirror of
https://github.com/unraid/api.git
synced 2026-01-10 18:50:11 -06:00
30 lines
482 B
TypeScript
30 lines
482 B
TypeScript
import NodeCache from 'node-cache';
|
|
|
|
export const userCache = new NodeCache();
|
|
|
|
type URL = string;
|
|
type IpAddress = string;
|
|
type Status = 'online' | 'offline';
|
|
|
|
export interface Owner {
|
|
username: string;
|
|
url: URL;
|
|
avatar: URL;
|
|
}
|
|
|
|
export interface CachedServer {
|
|
owner: Owner;
|
|
guid: string;
|
|
apikey: string;
|
|
name: string;
|
|
status: Status;
|
|
wanip: IpAddress;
|
|
lanip: IpAddress;
|
|
localurl: URL;
|
|
remoteurl: string;
|
|
}
|
|
|
|
export interface CachedServers {
|
|
servers: CachedServer[];
|
|
}
|