reifydb_core/interface/auth.rs
1// Copyright (c) reifydb.com 2025
2// This file is licensed under the AGPL-3.0-or-later, see license.md file
3
4pub type IdentityId = u64;
5
6#[derive(Debug, Clone)]
7pub enum Identity {
8 Anonymous {},
9 System {
10 id: IdentityId,
11 name: String,
12 },
13 User {
14 id: IdentityId,
15 name: String,
16 },
17}
18
19impl Identity {
20 pub fn root() -> Self {
21 Self::System {
22 id: 0,
23 name: "root".to_string(),
24 }
25 }
26}