fediglam/src/db.zig

22 lines
383 B
Zig

pub const Actor = struct {
id: u128,
display_name: ?[]const u8 = null,
handle: []const u8,
host: []const u8,
bio: ?[]const u8 = null,
};
const this_host = "localhost:8080";
const actor = Actor{
.id = 1234,
.handle = "testacct",
.host = this_host,
};
pub fn getActorById(id: u128) !?Actor {
if (id == actor.id) return actor;
return null;
}