DNS Record types
This commit is contained in:
parent
fe00e7d50b
commit
13c0a76e97
49
Lib/src/types/dns.d.ts
vendored
Normal file
49
Lib/src/types/dns.d.ts
vendored
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
/**
|
||||||
|
* An A record.
|
||||||
|
*/
|
||||||
|
interface ARecord extends DNSRecord {
|
||||||
|
/**
|
||||||
|
* The address of this record, undefined if unresolved.
|
||||||
|
*/
|
||||||
|
address?: string | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An SRV record.
|
||||||
|
*/
|
||||||
|
interface SRVRecord extends DNSRecord {
|
||||||
|
/**
|
||||||
|
* The priority of this record.
|
||||||
|
*/
|
||||||
|
priority: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The weight of this record.
|
||||||
|
*/
|
||||||
|
weight: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The port of this record.
|
||||||
|
*/
|
||||||
|
port: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The target of this record.
|
||||||
|
*/
|
||||||
|
target: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A representation of a DNS record.
|
||||||
|
*/
|
||||||
|
type DNSRecord = {
|
||||||
|
/**
|
||||||
|
* The type of this record.
|
||||||
|
*/
|
||||||
|
type: RecordType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The TTL (Time To Live) of this record.
|
||||||
|
*/
|
||||||
|
ttl: number;
|
||||||
|
};
|
17
Lib/src/types/server.d.ts
vendored
17
Lib/src/types/server.d.ts
vendored
@ -20,7 +20,7 @@ type MinecraftServer = {
|
|||||||
/**
|
/**
|
||||||
* The DNS records resolved for this server.
|
* The DNS records resolved for this server.
|
||||||
*/
|
*/
|
||||||
records: DNSRecord[];
|
records: ARecord | SRVRecord[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The player counts of this server.
|
* The player counts of this server.
|
||||||
@ -33,21 +33,6 @@ type MinecraftServer = {
|
|||||||
motd: MOTD;
|
motd: MOTD;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* A representation of a DNS record.
|
|
||||||
*/
|
|
||||||
type DNSRecord = {
|
|
||||||
/**
|
|
||||||
* The type of this record.
|
|
||||||
*/
|
|
||||||
type: RecordType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The TTL (Time To Live) of this record.
|
|
||||||
*/
|
|
||||||
ttl: number;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Player count data for a server.
|
* Player count data for a server.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user