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