pub struct FileClient<'a> { /* private fields */ }
Implementations§
Source§impl<'a> FileClient<'a>
impl<'a> FileClient<'a>
pub async fn get(&self, file_id: &str) -> Result<File>
pub async fn get_with_relationships( &self, file_id: &str, relationships: &[&str], ) -> Result<File>
pub async fn upload( &self, file_path: impl AsRef<Path>, ) -> Result<AnalysisResponse>
pub async fn upload_with_password( &self, file_path: impl AsRef<Path>, password: Option<&str>, ) -> Result<AnalysisResponse>
pub async fn upload_bytes( &self, bytes: Vec<u8>, filename: &str, ) -> Result<AnalysisResponse>
pub async fn upload_bytes_with_password( &self, bytes: Vec<u8>, filename: &str, password: Option<&str>, ) -> Result<AnalysisResponse>
pub async fn get_upload_url(&self) -> Result<String>
pub async fn get_download_url(&self, file_id: &str) -> Result<String>
pub async fn download(&self, file_id: &str) -> Result<Vec<u8>>
pub async fn get_behavior_summary( &self, file_id: &str, ) -> Result<FileBehaviorSummaryResponse>
pub async fn get_mitre_attack_techniques( &self, file_id: &str, ) -> Result<MitreTrees>
pub async fn get_behavior_report( &self, sandbox_id: &str, ) -> Result<FileBehavior>
pub async fn get_comments_iterator(&self, file_id: &str) -> CommentIterator<'_>
pub fn get_relationship_iterator<T>(
&self,
file_id: &str,
relationship: &str,
) -> CollectionIterator<'_, T>where
T: for<'de> Deserialize<'de> + Clone,
Source§impl<'a> FileClient<'a>
File-specific convenience methods for relationships
impl<'a> FileClient<'a>
File-specific convenience methods for relationships
pub async fn get_behaviours(&self, file_id: &str) -> Result<Collection<Value>>
pub async fn get_bundled_files( &self, file_id: &str, ) -> Result<Collection<Value>>
pub async fn get_carbonblack_children( &self, file_id: &str, ) -> Result<Collection<Value>>
pub async fn get_carbonblack_parents( &self, file_id: &str, ) -> Result<Collection<Value>>
pub async fn get_compressed_parents( &self, file_id: &str, ) -> Result<Collection<Value>>
pub async fn get_contacted_domains( &self, file_id: &str, ) -> Result<Collection<Value>>
pub async fn get_contacted_ips( &self, file_id: &str, ) -> Result<Collection<Value>>
pub async fn get_contacted_urls( &self, file_id: &str, ) -> Result<Collection<Value>>
pub async fn get_dropped_files( &self, file_id: &str, ) -> Result<Collection<Value>>
pub async fn get_execution_parents( &self, file_id: &str, ) -> Result<Collection<Value>>
pub async fn get_itw_urls(&self, file_id: &str) -> Result<Collection<Value>>
pub async fn get_overlay_parents( &self, file_id: &str, ) -> Result<Collection<Value>>
pub async fn get_pcap_parents(&self, file_id: &str) -> Result<Collection<Value>>
pub async fn get_pe_resource_parents( &self, file_id: &str, ) -> Result<Collection<Value>>
pub async fn get_similar_files( &self, file_id: &str, ) -> Result<Collection<Value>>
Source§impl<'a> FileClient<'a>
impl<'a> FileClient<'a>
pub fn new(client: &'a Client) -> Self
pub async fn get_comments(&self, id: &str) -> Result<Collection<Comment>>
pub async fn get_comments_with_limit( &self, id: &str, limit: u32, ) -> Result<Collection<Comment>>
pub async fn add_comment( &self, id: &str, text: impl Into<String> + Send, ) -> Result<Comment>
pub async fn get_votes(&self, id: &str) -> Result<VoteCollection>
pub async fn add_vote(&self, id: &str, verdict: VoteVerdict) -> Result<Vote>
pub async fn analyse(&self, id: &str) -> Result<AnalysisResponse>
pub async fn get_analysis(&self, analysis_id: &str) -> Result<Analysis>
pub async fn get_relationship<T>(
&self,
id: &str,
relationship: &str,
) -> Result<Collection<T>>where
T: for<'de> Deserialize<'de> + Send,
pub async fn get_relationship_with_limit<T>(
&self,
id: &str,
relationship: &str,
limit: u32,
) -> Result<Collection<T>>where
T: for<'de> Deserialize<'de> + Send,
pub async fn get_relationship_descriptors( &self, id: &str, relationship: &str, ) -> Result<Collection<ObjectDescriptor>>
pub async fn get_relationship_descriptors_with_limit( &self, id: &str, relationship: &str, limit: u32, ) -> Result<Collection<ObjectDescriptor>>
Auto Trait Implementations§
impl<'a> Freeze for FileClient<'a>
impl<'a> !RefUnwindSafe for FileClient<'a>
impl<'a> Send for FileClient<'a>
impl<'a> Sync for FileClient<'a>
impl<'a> Unpin for FileClient<'a>
impl<'a> !UnwindSafe for FileClient<'a>
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