pub struct AgentRepo { /* private fields */ }Implementations§
Source§impl AgentRepo
impl AgentRepo
pub fn new(pool: PgPool) -> Self
Sourcepub async fn insert(&self, version: &AgentVersion) -> Result<AgentVersion>
pub async fn insert(&self, version: &AgentVersion) -> Result<AgentVersion>
Insert a new agent version. Returns error if SHA already exists.
pub async fn find_by_id(&self, id: Uuid) -> Result<AgentVersion>
pub async fn find_by_sha(&self, sha: &str) -> Result<Option<AgentVersion>>
pub async fn list_by_name(&self, name: &str) -> Result<Vec<AgentVersion>>
pub async fn list_all( &self, limit: i64, offset: i64, ) -> Result<Vec<AgentVersion>>
pub async fn set_champion(&self, agent_id: Uuid, agent_name: &str) -> Result<()>
pub async fn update_changelog( &self, agent_id: Uuid, changelog: &str, ) -> Result<()>
pub async fn delete(&self, id: Uuid) -> Result<bool>
Auto Trait Implementations§
impl !RefUnwindSafe for AgentRepo
impl !UnwindSafe for AgentRepo
impl Freeze for AgentRepo
impl Send for AgentRepo
impl Sync for AgentRepo
impl Unpin for AgentRepo
impl UnsafeUnpin for AgentRepo
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
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