Struct buildsrs_database::Database
source · pub struct Database<T = Client> { /* private fields */ }
Expand description
Database wrapper
This precompiles statements and offers wrappers for all mutations and queries. The wrappers are
partly automatically generated by the statements!
macro.
Implementations§
source§impl Database<Transaction<'_>>
impl Database<Transaction<'_>>
sourcepub async fn builder_register(
&self,
uuid: Uuid,
pubkey: i64
) -> Result<(), Error>
pub async fn builder_register( &self, uuid: Uuid, pubkey: i64 ) -> Result<(), Error>
Register new builder by SSH pubkey and comment.
sourcepub async fn fingerprint_add(
&self,
pubkey: i64,
fingerprint: &str
) -> Result<(), Error>
pub async fn fingerprint_add( &self, pubkey: i64, fingerprint: &str ) -> Result<(), Error>
Add a fingerprint to a registered builder.
sourcepub async fn builder_set_enabled(
&self,
uuid: Uuid,
enabled: bool
) -> Result<(), Error>
pub async fn builder_set_enabled( &self, uuid: Uuid, enabled: bool ) -> Result<(), Error>
Set builder enabled
sourcepub async fn builder_set_comment(
&self,
uuid: Uuid,
commend: &str
) -> Result<(), Error>
pub async fn builder_set_comment( &self, uuid: Uuid, commend: &str ) -> Result<(), Error>
Set builder comment
sourcepub async fn builder_triple_add(
&self,
builder: Uuid,
triple: &str
) -> Result<(), Error>
pub async fn builder_triple_add( &self, builder: Uuid, triple: &str ) -> Result<(), Error>
Add an allowed triple for a builder
sourcepub async fn builder_triple_remove(
&self,
builder: Uuid,
triple: &str
) -> Result<(), Error>
pub async fn builder_triple_remove( &self, builder: Uuid, triple: &str ) -> Result<(), Error>
Remove an allowed triple for a builder
sourcepub async fn builder_request(
&self,
builder: Uuid,
triple: &str
) -> Result<(), Error>
pub async fn builder_request( &self, builder: Uuid, triple: &str ) -> Result<(), Error>
Request a job for a builder.
sourcepub async fn triple_enabled(
&self,
name: &str,
enabled: bool
) -> Result<(), Error>
pub async fn triple_enabled( &self, name: &str, enabled: bool ) -> Result<(), Error>
Set triple enabled or disabled
sourcepub async fn triple_rename(&self, triple: &str, name: &str) -> Result<(), Error>
pub async fn triple_rename(&self, triple: &str, name: &str) -> Result<(), Error>
Set triple enabled or disabled
sourcepub async fn crate_version_add(
&self,
krate: &str,
version: &str,
url: &str,
checksum: &str,
yanked: bool
) -> Result<(), Error>
pub async fn crate_version_add( &self, krate: &str, version: &str, url: &str, checksum: &str, yanked: bool ) -> Result<(), Error>
Add a crate version to the database.
source§impl<T: GenericClient> Database<T>
impl<T: GenericClient> Database<T>
pub async fn builder_lookup(&self, fingerprint: &str) -> Result<Uuid, Error>
pub async fn builder_get(&self, builder: Uuid) -> Result<Builder, Error>
pub async fn builder_list(&self) -> Result<Vec<Uuid>, Error>
pub async fn builder_triples( &self, builder: Uuid ) -> Result<BTreeSet<String>, Error>
pub async fn triple_list(&self) -> Result<BTreeSet<String>, Error>
pub async fn triple_info(&self, triple: &str) -> Result<TargetInfo, Error>
pub async fn task_list( &self, krate: Option<&str>, version: Option<&str>, task: Option<&str>, triple: Option<&str> ) -> Result<Vec<Task>, Error>
pub async fn job_request(&self, builder: Uuid) -> Result<Uuid, Error>
pub async fn job_info(&self, job: Uuid) -> Result<JobInfo, Error>
sourcepub async fn crate_versions(&self, name: &str) -> Result<Vec<String>, Error>
pub async fn crate_versions(&self, name: &str) -> Result<Vec<String>, Error>
Get a list of versions for a crate
sourcepub async fn crate_version_info(
&self,
name: &str,
version: &str
) -> Result<VersionInfo, Error>
pub async fn crate_version_info( &self, name: &str, version: &str ) -> Result<VersionInfo, Error>
Get info on a crate version
Trait Implementations§
Auto Trait Implementations§
impl<T = Client> !RefUnwindSafe for Database<T>
impl<T> Send for Database<T>where
T: Send,
impl<T> Sync for Database<T>where
T: Sync,
impl<T> Unpin for Database<T>where
T: Unpin,
impl<T = Client> !UnwindSafe for Database<T>
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