Expand description
Name-based operations composed from api calls: addressing a record value by
(name, type, data), geo bans by area name, client identities and sinkhole lists by
name, sinkhole rules by pattern, certificates by a name they cover, zone members by
email, the zone of a host name, owner names zone-file style.
Functions that touch several resources are not atomic: Core has no transactions across calls. Each function says what is left behind if it fails midway.
Structs§
- AddValue
- Options for
add_value. - Added
- What
add_valuedid. - Added
GeoBans - What
add_geo_bansdid. - GeoArea
- A resolved area, as Core and Relay identify it. Usually made by
GeoCatalog::parse_area. - Known
Area - One entry of the catalog, for listing (
GeoCatalog::known_areas).
Enums§
- GeoBan
Selector - Which bans of a value
select_geo_banspicks. - GeoLevel
- How large a banned area is (
GeoBan.level,../core/src/api/enum_labels.ts). - Sinkhole
Role Selector - Which rules of a list
select_sinkhole_rolespicks. - Value
Selector - How to pick one value of a group.
Constants§
- DEFAULT_
TTL - TTL for a new group when the caller does not give one.
Functions§
- add_
geo_ bans - Bans
areasforvalue, skipping areas that are already banned. - add_
value - Adds a value to a group, creating the group if needed.
nameis the full owner name (crate::ops::qualify_name). - check_
group_ removable - Whether
remove_groupmay remove the group: refuses groups with values Core keeps for a redirect or a certificate issuance (RecordValue::is_locked). Sends nothing. - find_
certificate - A certificate by uuid, or by a host name it covers (as Relay would pick it).
- find_
client_ identity - A client identity by uuid,
identifyvalue or name, among the caller’s own (seematch_client_identity). A reference that matches none of them is read directly, so an Admin reaches other users’ identities by uuid oridentify. - find_
group - The group (RRset) at a full owner name and type, or
Noneif it does not exist. - find_
member - The zone’s member
referencenames (user uuid or email, seematch_member). Removing a member takes the user uuid, which this finds from an email. - find_
sinkhole_ list - A sinkhole list by uuid or name: first among the caller’s own lists, then, with
include_shared, among lists other users share. A uuid that matches neither is read directly (an Admin reaches other users’ lists that way). Rules are not included. - find_
value - The group and the one value
selectorpoints at. - find_
value_ with_ geo_ bans - Like
find_value, with the value’sgeo_bansfilled in, asadd_geo_bansandselect_geo_bansneed. - find_
zone_ for_ host - The zone
hostbelongs to, among every zone the caller can access (seezone_for_host). Core still checks that the zone serves the name (not delegated away, no more specific zone of someone else). - group_
values - Groups a flat list of values (as from
Records::list_all) into RRsets by (zone, name, type). Groups keep the order in which they first appear, values the order they had; a group’s TTL is taken from its first value (Core keeps them equal). Sends nothing. - infer_
client_ identity_ type - The client identity type that
identifyimplies, if it implies one. - infer_
sinkhole_ role_ type - The rule type a pattern implies:
Wildcardfor*.+ name,Exactotherwise. A regex is never inferred; it has to be asked for. - match_
client_ identity - The identity of
identitiesthatreferencenames: its uuid, itsidentifyvalue, or its name (trimmed, case does not matter), in that order.Ok(None)if none matches. - match_
member - The member
referencenames: a user uuid, or an email compared case-insensitively (as Core does when adding). - match_
sinkhole_ list - The list of
liststhatreferencenames: its uuid, or its name (trimmed, case does not matter).Ok(None)if none matches. - qualify_
name - Full owner name from what a user typed, zone-file style:
@→ the apex; a trailing dot → absolute as given; a name already equal to the zone or ending in.<zone>→ as given; anything else is relative to the zone. - relative_
name - Full owner name → zone-relative form for display (
@for the apex). Names outside the zone are returned unchanged. - remove_
geo_ bans - Removes
bansofvalue, usually the result ofselect_geo_bans. - remove_
group - Removes every value of the group (and so the group). Not atomic: on an error midway the values already removed stay removed. Returns the removed values.
- remove_
value - Removes the value
selectorpoints at, with its geo bans and health check; returns it. The group goes with its last value. - same_
data - Whether
input(as a user would type it) denotes the stored canonicalstoreddata. - select_
geo_ bans - Picks bans of
valuewithout changing anything. Each ban is returned once, even if its area is given more than once. - select_
sinkhole_ roles - Picks rules of
listwithout changing anything. Each rule is returned once, even if its pattern is given more than once. - update_
value - Changes the value
selectorpoints at. - zone_
for_ host - The zone of
zonesthathostis in: the longest zone name equal to the host or a suffix of it at a label boundary. Case and a trailing dot do not matter.