const std = @import("std"); const Route = @import("Route.zig"); const handler = @import("handler.zig"); const Interface = handler.Interface; const Context = handler.Context; literals: []struct { value: []const u8, node: *@This(), }, identifiers: []@This(), interface: ?Interface, pub fn init(comptime interfaces: []const Interface) @This() { _ = interfaces; return undefined; } pub fn getInterface(self: *const @This(), url: []const u8) ?Interface { _ = self; _ = url; return null; } test "init" { const M = struct { const Response = @import("Response.zig"); const C = Context(.{ "api", "images", .id, "metadata" }); const context: C = .{}; const Query = struct { condition: []const u8, start: usize, length: usize, }; pub fn get(request: C.Request) Response { _ = request; return .ok(.static("hello")); } }; const routes = init(&.{M.context.interface()}); const interface = routes.getInterface("/api/images/123456/metadata"); _ = interface; }