Skip to main content

Module models

Module models 

Source
Expand description

Wire shapes of Core resources (../core/src/models.ts). Enums are string labels on the wire (../core/src/api/enum_labels.ts); unknown labels must not fail deserialization. Timestamps are Unix seconds unless a field says otherwise.

Structs§

AuditLog
One audit log entry: who did what to which resource, and how it ended (AuditLogs). Fields Core does not know, or does not show the caller, are None. Enum values are kept as strings (forward compatibility); the known ones are listed per field.
Certificate
A TLS certificate Relay serves for the names in it, picked by SNI (exact name, then a one-label wildcard). Core never returns the private key; the details are read from the stored chain.
CertificateRenewal
PUT /certificates/:uuid body: a renewal (new chain and key under the same id). Debug does not show the key.
ClientIdentity
A client that Relay recognises (by source IP, DoT hostname or DoH path), so that sinkhole lists can be linked to it.
ClientIdentityPatch
PATCH /client-identities/:uuid body; None fields stay unchanged.
CreatedSinkholeList
What SinkholeLists::create returns: the list and the links made from NewSinkholeList::link_to.
Discovery
What Zones::discover found.
FreeDomainList
The platform’s free domains (GET /free-domains): below each, any user can lease one subdomain as their own zone, with Zones::create.
FreeLabelAvailability
Whether <label>.<domain> can be leased now (GET /free-domains/:domain/available).
GeoBan
A geo ban on one record value: Relay does not answer with that value to clients in the area. Applies to A and AAAA values only; Relay ignores bans on other types.
GeoCatalog
The regions, sub-regions and countries a geo ban can name (ISO 3166-1 + UN M49), as Core serves them from Relay’s country table (GET /api/v1/geo). A geo ban code is valid only if it is in here at its level.
GeoCountry
A country or territory.
GeoRegion
A UN M49 region.
GeoSubregion
A UN M49 sub-region.
Health
GET /api/health (../core/src/status.ts). Values are kept as strings so a new state never breaks parsing.
HealthCheck
A health check on one record value (record_id is its key: one check per value). Durations are seconds, as on the wire. It runs only while the value’s host_health is Auto; there is no separate on/off switch.
HealthCheckPatch
PATCH /health-checks/:record_id body; None fields stay unchanged. config, when given, replaces the whole config and must match the existing type (the type cannot change). Core checks the run-length rule of NewHealthCheck against the patch combined with the stored values.
HttpCheck
Settings of an http check.
ImportIssue
One remark of an ImportReport.
ImportRecordsReport
Records of an ImportReport.
ImportRedirectsReport
Redirects of an ImportReport (dinio-zone documents only).
ImportReport
What an import did, or would do (Zones::import).
NewCertificate
POST /certificates body for a zone certificate. Debug does not show the key.
NewClientIdentity
POST /client-identities body.
NewHealthCheck
POST /health-checks body. Besides the ranges below, Core requires one run to end before the next is due: timeout × (retries + 1) + retry_interval × retries < interval (with retry_interval 5 when None), otherwise ErrorCode::Validation.
NewRecordValue
POST /records body. ttl is required when the group does not exist yet (also after its last value was deleted), and must match the group’s TTL otherwise.
NewRedirect
POST /redirects body.
NewSinkholeList
POST /sinkhole-lists body. A list starts without rules; add them with SinkholeRoles::create.
NewSinkholeRole
POST /sinkhole-roles body.
PingCheck
Settings of a ping check.
RecordSet
An RRset (“group”): every value with the same (zone_id, name, type), all with the same ttl. Core stores no RRset of its own (no uuid, no timestamps); it assembles one for Records::get and Records::set_ttl, and ops::group_values does the same for a list of values. name is the full owner name, lowercase, without trailing dot.
RecordValue
One member of an RRset, with its own uuid. data is in Core’s canonical text form (e.g. names inside rdata as FQDNs with a trailing dot, TXT quoted).
RecordValuePatch
PATCH /records/:uuid body; None fields are left unchanged. TTL, name and type cannot be changed here.
Redirect
An HTTP(S) redirect that Relay answers for a host name inside one of the caller’s zones.
RedirectCertificate
The automatic certificate of a redirect with tls = Auto.
RedirectPatch
PATCH /redirects/:name body; None fields stay unchanged. The name (and so the zone) cannot change.
SinkholeLink
A sinkhole list applied to a client identity. Identified by the pair of ids (there is no link id). Cannot be changed: delete it and create another.
SinkholeList
A list of sinkhole rules (names to block or to allow). It applies to the client identities linked to it (SinkholeLink).
SinkholeListPatch
PATCH /sinkhole-lists/:uuid body; None fields stay unchanged, at least one must be set.
SinkholeRole
One rule of a sinkhole list (Core calls rules “roles”).
SinkholeRolePatch
PATCH /sinkhole-roles/:uuid body; None fields stay unchanged. The result must still fit together (see NewSinkholeRole::pattern). The list cannot change.
StatsPeak
The busiest step of a StatsSeries.
StatsSeries
One series of a StatsSeriesResult.
StatsSeriesResult
A chart-ready set of series over one time range (zone queries, client events and rcodes).
StatsTopItem
One entry of a StatsTopList. Counts are estimates summed over Relays and windows.
StatsTopList
A top list (non-existent names of a zone, names blocked for clients).
TcpCheck
Settings of a tcp check.
User
A Dinio user account. A non-Admin can read only their own (Users::get).
Zone
A DNS zone (example.com).
ZoneDocGeoBan
A geo ban inside a ZoneDocRecord.
ZoneDocHealthCheck
A health check inside a ZoneDocRecord: POST /health-checks without record_id, same limits.
ZoneDocRecord
One record value of a ZoneDocument.
ZoneDocRedirect
A redirect inside a ZoneDocument.
ZoneDocument
The dinio-zone document (format: "dinio-zone", version: 1): Core’s own export format, and what Zones::discover proposes.
ZoneMember
A user’s access to a zone. The creator of a zone is its only Owner; the Owner delegates Administrator access to others. Both manage the zone’s records; only the Owner deletes the zone and manages its members.
ZoneNameStats
One name of ZoneNamesStats.
ZoneNamesStats
A zone’s busiest names (Stats::zone_names).
ZoneNxStats
NXDOMAIN answers under a zone (Stats::zone_nx).

Enums§

AcmeStatus
State of an automatically issued certificate (RedirectCertificate.status).
CertificateSource
Where a certificate comes from (Certificate.source).
ClientIdentityType
How Relay recognises a client (ClientIdentity.id_type, ../core/src/api/enum_labels.ts).
HealthCheckConfig
What to check. Serialized as "type" + "config" (../core/src/api/health_checks.ts).
HostHealthMode
How Relay decides whether a record value is healthy (RecordValue.host_health). An unhealthy value is left out of answers.
RecordManager
Who keeps a record value on the user’s behalf (RecordValue.managed_by).
RedirectTls
Where the HTTPS certificate of a redirect comes from (Redirect.tls).
SinkholeListType
Kind of sinkhole list (SinkholeList.type, ../core/src/api/enum_labels.ts).
SinkholeRoleType
How a rule’s pattern matches a name (SinkholeRole.sinkhole_type).
ZoneDocHostHealth
host_health of a ZoneDocRecord. Core exports a mode label; documents exported before 2026-10-28 carry a boolean, which Core still imports.
ZoneFileFormat
File format of a zone export or import (?format=).

Constants§

REDIRECT_CODES
Status codes Core accepts for a redirect.