pub struct SqliteStore { /* private fields */ }Implementations§
Source§impl SqliteStore
impl SqliteStore
Sourcepub async fn open_default() -> Result<Self, StoreError>
pub async fn open_default() -> Result<Self, StoreError>
~/.zopp/store.db (creates dir with 0700 perms on unix)
pub async fn open_in_memory() -> Result<Self, StoreError>
pub async fn open(url: &str) -> Result<Self, StoreError>
Trait Implementations§
Source§impl Store for SqliteStore
impl Store for SqliteStore
Source§fn create_user<'life0, 'life1, 'async_trait>(
&'life0 self,
params: &'life1 CreateUserParams,
) -> Pin<Box<dyn Future<Output = Result<(UserId, Option<PrincipalId>), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_user<'life0, 'life1, 'async_trait>(
&'life0 self,
params: &'life1 CreateUserParams,
) -> Pin<Box<dyn Future<Output = Result<(UserId, Option<PrincipalId>), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a new user (returns generated ID, and optional principal ID if principal was provided).
If params.principal is provided, atomically creates the user, principal, and adds principal to workspaces.
Source§fn get_user_by_email<'life0, 'life1, 'async_trait>(
&'life0 self,
email: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<User, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_user_by_email<'life0, 'life1, 'async_trait>(
&'life0 self,
email: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<User, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get user by email.
Source§fn get_user_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: &'life1 UserId,
) -> Pin<Box<dyn Future<Output = Result<User, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_user_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: &'life1 UserId,
) -> Pin<Box<dyn Future<Output = Result<User, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get user by ID.
Source§fn create_principal<'life0, 'life1, 'async_trait>(
&'life0 self,
params: &'life1 CreatePrincipalParams,
) -> Pin<Box<dyn Future<Output = Result<PrincipalId, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_principal<'life0, 'life1, 'async_trait>(
&'life0 self,
params: &'life1 CreatePrincipalParams,
) -> Pin<Box<dyn Future<Output = Result<PrincipalId, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a new principal (device) for a user.
Source§fn get_principal<'life0, 'life1, 'async_trait>(
&'life0 self,
principal_id: &'life1 PrincipalId,
) -> Pin<Box<dyn Future<Output = Result<Principal, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_principal<'life0, 'life1, 'async_trait>(
&'life0 self,
principal_id: &'life1 PrincipalId,
) -> Pin<Box<dyn Future<Output = Result<Principal, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get principal by ID.
Source§fn rename_principal<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
principal_id: &'life1 PrincipalId,
new_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn rename_principal<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
principal_id: &'life1 PrincipalId,
new_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Rename a principal.
Source§fn list_principals<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: &'life1 UserId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Principal>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_principals<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: &'life1 UserId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Principal>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List all principals for a user.
Source§fn create_invite<'life0, 'life1, 'async_trait>(
&'life0 self,
params: &'life1 CreateInviteParams,
) -> Pin<Box<dyn Future<Output = Result<Invite, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_invite<'life0, 'life1, 'async_trait>(
&'life0 self,
params: &'life1 CreateInviteParams,
) -> Pin<Box<dyn Future<Output = Result<Invite, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create an invite token (returns generated ID and token).
Source§fn get_invite_by_token<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Invite, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_invite_by_token<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Invite, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get invite by token.
Source§fn list_invites<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: Option<&'life1 UserId>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Invite>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_invites<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: Option<&'life1 UserId>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Invite>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List all active invites for a user (None = server invites).
Source§fn revoke_invite<'life0, 'life1, 'async_trait>(
&'life0 self,
invite_id: &'life1 InviteId,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn revoke_invite<'life0, 'life1, 'async_trait>(
&'life0 self,
invite_id: &'life1 InviteId,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Revoke an invite.
Source§fn create_workspace<'life0, 'life1, 'async_trait>(
&'life0 self,
params: &'life1 CreateWorkspaceParams,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceId, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_workspace<'life0, 'life1, 'async_trait>(
&'life0 self,
params: &'life1 CreateWorkspaceParams,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceId, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a new workspace (returns its generated ID).
Source§fn list_workspaces<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: &'life1 UserId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Workspace>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_workspaces<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: &'life1 UserId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Workspace>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List all workspaces for a user (via their principals).
Source§fn get_workspace<'life0, 'life1, 'async_trait>(
&'life0 self,
ws: &'life1 WorkspaceId,
) -> Pin<Box<dyn Future<Output = Result<Workspace, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_workspace<'life0, 'life1, 'async_trait>(
&'life0 self,
ws: &'life1 WorkspaceId,
) -> Pin<Box<dyn Future<Output = Result<Workspace, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get workspace by ID.
Source§fn get_workspace_by_name<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 UserId,
name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Workspace, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_workspace_by_name<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 UserId,
name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Workspace, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get workspace by name for a user (user must have access).
Source§fn get_workspace_by_name_for_principal<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
principal_id: &'life1 PrincipalId,
name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Workspace, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_workspace_by_name_for_principal<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
principal_id: &'life1 PrincipalId,
name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Workspace, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get workspace by name for a principal (principal must have access).
Source§fn add_workspace_principal<'life0, 'life1, 'async_trait>(
&'life0 self,
params: &'life1 AddWorkspacePrincipalParams,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add_workspace_principal<'life0, 'life1, 'async_trait>(
&'life0 self,
params: &'life1 AddWorkspacePrincipalParams,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Add a principal to a workspace with wrapped KEK.
Source§fn get_workspace_principal<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workspace_id: &'life1 WorkspaceId,
principal_id: &'life2 PrincipalId,
) -> Pin<Box<dyn Future<Output = Result<WorkspacePrincipal, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_workspace_principal<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workspace_id: &'life1 WorkspaceId,
principal_id: &'life2 PrincipalId,
) -> Pin<Box<dyn Future<Output = Result<WorkspacePrincipal, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get workspace principal (to access wrapped KEK).
Source§fn list_workspace_principals<'life0, 'life1, 'async_trait>(
&'life0 self,
workspace_id: &'life1 WorkspaceId,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkspacePrincipal>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_workspace_principals<'life0, 'life1, 'async_trait>(
&'life0 self,
workspace_id: &'life1 WorkspaceId,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkspacePrincipal>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List all principals in a workspace (with their wrapped KEKs).
Source§fn add_user_to_workspace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workspace_id: &'life1 WorkspaceId,
user_id: &'life2 UserId,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn add_user_to_workspace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workspace_id: &'life1 WorkspaceId,
user_id: &'life2 UserId,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Add a user to a workspace (user-level membership).
Source§fn create_project<'life0, 'life1, 'async_trait>(
&'life0 self,
params: &'life1 CreateProjectParams,
) -> Pin<Box<dyn Future<Output = Result<ProjectId, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_project<'life0, 'life1, 'async_trait>(
&'life0 self,
params: &'life1 CreateProjectParams,
) -> Pin<Box<dyn Future<Output = Result<ProjectId, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a project within a workspace (returns generated ID).
Source§fn list_projects<'life0, 'life1, 'async_trait>(
&'life0 self,
workspace_id: &'life1 WorkspaceId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Project>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_projects<'life0, 'life1, 'async_trait>(
&'life0 self,
workspace_id: &'life1 WorkspaceId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Project>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List all projects in a workspace.
Source§fn get_project<'life0, 'life1, 'async_trait>(
&'life0 self,
project_id: &'life1 ProjectId,
) -> Pin<Box<dyn Future<Output = Result<Project, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_project<'life0, 'life1, 'async_trait>(
&'life0 self,
project_id: &'life1 ProjectId,
) -> Pin<Box<dyn Future<Output = Result<Project, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a project by ID.
Source§fn get_project_by_name<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workspace_id: &'life1 WorkspaceId,
name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Project, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_project_by_name<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workspace_id: &'life1 WorkspaceId,
name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Project, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get a project by name within a workspace.
Source§fn delete_project<'life0, 'life1, 'async_trait>(
&'life0 self,
project_id: &'life1 ProjectId,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_project<'life0, 'life1, 'async_trait>(
&'life0 self,
project_id: &'life1 ProjectId,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a project (and all its environments and secrets).
Source§fn create_env<'life0, 'life1, 'async_trait>(
&'life0 self,
params: &'life1 CreateEnvParams,
) -> Pin<Box<dyn Future<Output = Result<EnvironmentId, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_env<'life0, 'life1, 'async_trait>(
&'life0 self,
params: &'life1 CreateEnvParams,
) -> Pin<Box<dyn Future<Output = Result<EnvironmentId, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create an environment within a project (returns generated ID).
Source§fn list_environments<'life0, 'life1, 'async_trait>(
&'life0 self,
project_id: &'life1 ProjectId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Environment>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_environments<'life0, 'life1, 'async_trait>(
&'life0 self,
project_id: &'life1 ProjectId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Environment>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List all environments in a project.
Source§fn get_environment<'life0, 'life1, 'async_trait>(
&'life0 self,
env_id: &'life1 EnvironmentId,
) -> Pin<Box<dyn Future<Output = Result<Environment, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_environment<'life0, 'life1, 'async_trait>(
&'life0 self,
env_id: &'life1 EnvironmentId,
) -> Pin<Box<dyn Future<Output = Result<Environment, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get an environment by ID.
Source§fn get_environment_by_name<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 ProjectId,
name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Environment, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_environment_by_name<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 ProjectId,
name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Environment, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get an environment by name within a project.
Source§fn delete_environment<'life0, 'life1, 'async_trait>(
&'life0 self,
env_id: &'life1 EnvironmentId,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_environment<'life0, 'life1, 'async_trait>(
&'life0 self,
env_id: &'life1 EnvironmentId,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete an environment (and all its secrets).
Source§fn get_env_wrap<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ws: &'life1 WorkspaceId,
project: &'life2 ProjectName,
env: &'life3 EnvName,
) -> Pin<Box<dyn Future<Output = Result<(Vec<u8>, Vec<u8>), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get_env_wrap<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ws: &'life1 WorkspaceId,
project: &'life2 ProjectName,
env: &'life3 EnvName,
) -> Pin<Box<dyn Future<Output = Result<(Vec<u8>, Vec<u8>), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Fetch the (wrapped_dek, dek_nonce) pair for an environment so core can unwrap it (legacy name-based).
Source§fn upsert_secret<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
env_id: &'life1 EnvironmentId,
key: &'life2 str,
nonce: &'life3 [u8],
ciphertext: &'life4 [u8],
) -> Pin<Box<dyn Future<Output = Result<i64, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn upsert_secret<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
env_id: &'life1 EnvironmentId,
key: &'life2 str,
nonce: &'life3 [u8],
ciphertext: &'life4 [u8],
) -> Pin<Box<dyn Future<Output = Result<i64, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Upsert a secret value (AEAD ciphertext + nonce) in an environment.
Returns the new environment version after the update.
Source§fn get_secret<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
env_id: &'life1 EnvironmentId,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<SecretRow, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_secret<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
env_id: &'life1 EnvironmentId,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<SecretRow, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Fetch a secret row (nonce + ciphertext).
Source§fn list_secret_keys<'life0, 'life1, 'async_trait>(
&'life0 self,
env_id: &'life1 EnvironmentId,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_secret_keys<'life0, 'life1, 'async_trait>(
&'life0 self,
env_id: &'life1 EnvironmentId,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List all secret keys in an environment.
Source§fn delete_secret<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
env_id: &'life1 EnvironmentId,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<i64, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_secret<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
env_id: &'life1 EnvironmentId,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<i64, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Delete a secret from an environment.
Returns the new environment version after the deletion.
Auto Trait Implementations§
impl !RefUnwindSafe for SqliteStore
impl !UnwindSafe for SqliteStore
impl Freeze for SqliteStore
impl Send for SqliteStore
impl Sync for SqliteStore
impl Unpin for SqliteStore
impl UnsafeUnpin for SqliteStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more