milestone 11: systemd and docker packaging, operator and architecture docs, config and api reference, docs drift guards
This commit is contained in:
@@ -189,7 +189,6 @@ fn newPassword(patch: Patch) ?[]const u8 {
|
||||
// the read shape
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const RuntimeView = struct { io_backend: []const u8 };
|
||||
const BlockingView = struct { response: []const u8, ttl: u32 };
|
||||
const EdnsView = struct { ecs_mode: []const u8 };
|
||||
|
||||
@@ -219,7 +218,6 @@ const WebView = struct {
|
||||
};
|
||||
|
||||
pub const View = struct {
|
||||
runtime: RuntimeView,
|
||||
upstream: model.Upstream,
|
||||
dns: model.Dns,
|
||||
blocking: BlockingView,
|
||||
@@ -235,7 +233,6 @@ pub const View = struct {
|
||||
|
||||
pub fn view(cfg: model.Config) View {
|
||||
return .{
|
||||
.runtime = .{ .io_backend = cfg.runtime.io_backend.toDb() },
|
||||
.upstream = cfg.upstream,
|
||||
.dns = cfg.dns,
|
||||
.blocking = .{ .response = cfg.blocking.response.toDb(), .ttl = cfg.blocking.ttl },
|
||||
@@ -469,13 +466,11 @@ test "the read shape spells every enum the way the database does" {
|
||||
.logging = .{ .level = .err, .output = .file },
|
||||
.blocking = .{ .response = .nxdomain },
|
||||
.edns = .{ .ecs_mode = .forward },
|
||||
.runtime = .{ .io_backend = .evented },
|
||||
});
|
||||
try testing.expectEqualStrings("error", rendered.logging.level);
|
||||
try testing.expectEqualStrings("file", rendered.logging.output);
|
||||
try testing.expectEqualStrings("nxdomain", rendered.blocking.response);
|
||||
try testing.expectEqualStrings("forward", rendered.edns.ecs_mode);
|
||||
try testing.expectEqualStrings("evented", rendered.runtime.io_backend);
|
||||
try testing.expect(!rendered.web.auth_enabled);
|
||||
|
||||
const with_password = view(.{ .web = .{ .password_hash = "$argon2id$v=19$m=19456,t=2,p=1$a$b" } });
|
||||
|
||||
+2
-15
@@ -2088,20 +2088,12 @@ components:
|
||||
|
||||
Settings:
|
||||
type: object
|
||||
required: [runtime, upstream, dns, blocking, cache, web, doh_server, dot_server, edns, logging, disk, blocklist_update]
|
||||
required: [upstream, dns, blocking, cache, web, doh_server, dot_server, edns, logging, disk, blocklist_update]
|
||||
properties:
|
||||
runtime:
|
||||
type: object
|
||||
required: [io_backend]
|
||||
properties:
|
||||
io_backend:
|
||||
type: string
|
||||
enum: [threaded, evented]
|
||||
upstream:
|
||||
type: object
|
||||
required: [connect_timeout_ms, read_timeout_ms, total_timeout_ms]
|
||||
required: [read_timeout_ms, total_timeout_ms]
|
||||
properties:
|
||||
connect_timeout_ms: { type: integer }
|
||||
read_timeout_ms: { type: integer }
|
||||
total_timeout_ms: { type: integer }
|
||||
dns:
|
||||
@@ -2213,14 +2205,9 @@ components:
|
||||
the write-only `web.password`. `web.password_hash` is rejected as
|
||||
an unknown field.
|
||||
properties:
|
||||
runtime:
|
||||
type: object
|
||||
properties:
|
||||
io_backend: { type: string }
|
||||
upstream:
|
||||
type: object
|
||||
properties:
|
||||
connect_timeout_ms: { type: integer }
|
||||
read_timeout_ms: { type: integer }
|
||||
total_timeout_ms: { type: integer }
|
||||
dns:
|
||||
|
||||
@@ -525,8 +525,7 @@ const TlsEndpointView = struct {
|
||||
/// response never carries `web.password` or `web.password_hash` (ruling 16).
|
||||
const SettingsView = struct {
|
||||
settings: struct {
|
||||
runtime: struct { io_backend: []const u8 },
|
||||
upstream: struct { connect_timeout_ms: u32, read_timeout_ms: u32, total_timeout_ms: u32 },
|
||||
upstream: struct { read_timeout_ms: u32, total_timeout_ms: u32 },
|
||||
dns: struct {
|
||||
bind_ipv4: []const u8,
|
||||
bind_ipv6: []const u8,
|
||||
|
||||
Reference in New Issue
Block a user