hippofish/src/config/types.ts
2019-05-24 03:26:56 +09:00

60 lines
996 B
TypeScript

/**
* ユーザーが設定する必要のある情報
*/
export type Source = {
repository_url?: string;
feedback_url?: string;
url: string;
port: number;
https?: { [x: string]: string };
disableHsts?: boolean;
db: {
host: string;
port: number;
db: string;
user: string;
pass: string;
extra?: { [x: string]: string };
};
redis: {
host: string;
port: number;
pass: string;
db?: number;
prefix?: string;
};
elasticsearch: {
host: string;
port: number;
pass: string;
};
autoAdmin?: boolean;
proxy?: string;
accesslog?: string;
clusterLimit?: number;
id: string;
outgoingAddressFamily?: 'ipv4' | 'ipv6' | 'dual';
};
/**
* Misskeyが自動的に(ユーザーが設定した情報から推論して)設定する情報
*/
export type Mixin = {
host: string;
hostname: string;
scheme: string;
wsScheme: string;
apiUrl: string;
wsUrl: string;
authUrl: string;
driveUrl: string;
userAgent: string;
};
export type Config = Source & Mixin;