pub struct NeonCli { /* private fields */ }Available on crate feature
neon only.Expand description
The Neon CLI (neon, or neonctl), run with --output json. Signed in the way the CLI is
(~/.config/neon, shared with the terminal) or with NEON_API_KEY.
Implementations§
Trait Implementations§
Source§impl NeonControl for NeonCli
impl NeonControl for NeonCli
Source§fn auth_status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn auth_status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Who the CLI is signed in as (an error when it isn’t).
Source§fn branches<'life0, 'life1, 'async_trait>(
&'life0 self,
project: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Branch>, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn branches<'life0, 'life1, 'async_trait>(
&'life0 self,
project: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Branch>, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The project’s branches, with their annotations.
Source§fn create_branch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
spec: &'life2 CreateBranch,
) -> Pin<Box<dyn Future<Output = Result<Branch, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn create_branch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
spec: &'life2 CreateBranch,
) -> Pin<Box<dyn Future<Output = Result<Branch, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Create a branch (never printing its credentials).
Source§fn delete_branch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_branch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Delete the branch
id.Source§fn reset_branch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn reset_branch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Reset the branch
id to its parent’s current state.Source§fn connection<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
database: Option<&'life3 str>,
pooled: bool,
) -> Pin<Box<dyn Future<Output = Result<Connection, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn connection<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
database: Option<&'life3 str>,
pooled: bool,
) -> Pin<Box<dyn Future<Output = Result<Connection, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
The branch’s Postgres connection to
database (the default one when None), through
the connection pooler when pooled.Source§fn databases<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn databases<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The branch’s databases.
Source§fn create_database<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn create_database<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Create the database
name on the branch.Source§fn functions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Function>, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn functions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Function>, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The functions deployed on the branch.
Source§fn storage<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Storage, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn storage<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Storage, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The branch’s object storage.
Source§fn buckets<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn buckets<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The branch’s buckets.
Source§fn create_bucket<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn create_bucket<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Create the bucket
name on the branch.Source§fn create_credential<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<StorageCredential, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn create_credential<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<StorageCredential, NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Mint a storage credential (read and write) called
name on the branch.Source§fn revoke_credential<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
token_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn revoke_credential<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
branch: &'life2 str,
token_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), NeonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Revoke the credential
token_id on the branch.Auto Trait Implementations§
impl Freeze for NeonCli
impl RefUnwindSafe for NeonCli
impl Send for NeonCli
impl Sync for NeonCli
impl Unpin for NeonCli
impl UnsafeUnpin for NeonCli
impl UnwindSafe for NeonCli
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