38 lines
722 B
TypeScript
38 lines
722 B
TypeScript
|
|
import { EndpointType } from "$lib/server/enums/endpoints";
|
||
|
|
import type { FileStats } from "$lib/server/utils/filesystem-utils";
|
||
|
|
|
||
|
|
export interface IEndpointFS {
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Specifies which Enpoint this is
|
||
|
|
*/
|
||
|
|
type: EndpointType
|
||
|
|
/** File name */
|
||
|
|
name: string
|
||
|
|
/**
|
||
|
|
* File stats,
|
||
|
|
* useful to understand
|
||
|
|
* whether the file has been actually
|
||
|
|
* parsed by nginx during last reload
|
||
|
|
*/
|
||
|
|
stats: FileStats
|
||
|
|
/** File path */
|
||
|
|
path: string
|
||
|
|
/** Hash of the file */
|
||
|
|
hash: string
|
||
|
|
|
||
|
|
/** converts the IEndpoint to */
|
||
|
|
toConf(): string
|
||
|
|
|
||
|
|
ports(): number[]
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
export type FSHeader = {
|
||
|
|
name: string,
|
||
|
|
stats: FileStats
|
||
|
|
path: string,
|
||
|
|
hash: string
|
||
|
|
}
|
||
|
|
|