╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ User.zig ─────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
236 allocator: std.mem.Allocator, 237 admin_repo_path: []const u8, 238 arena: *std.heap.ArenaAllocator, 239 name: []const u8, 240 ) !?Record { 241 var repo = rp.Repo(.xit, evt.admin_repo_opts).open(io, allocator, .{ .path = admin_repo_path }) catch |err| switch (err) { 242 error.RepoNotFound => return null, 243 else => |e| return e, 244 }; 245 defer repo.deinit(io, allocator); 246 247 const moment = try evt.currentMoment(evt.admin_repo_opts, &repo); 248 249 const user_id = try readIdByName(evt.AdminDB, evt.admin_repo_opts.hash, moment, name) orelse return null; 250 251 return try readById(evt.AdminDB, evt.admin_repo_opts.hash, moment, arena, &user_id); 252 } 253