Skip to main content

reifydb_core/interface/
auth.rs

1// SPDX-License-Identifier: AGPL-3.0-or-later
2// Copyright (c) 2025 ReifyDB
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}