FileClient

Struct FileClient 

Source
pub struct FileClient<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> FileClient<'a>

Source

pub async fn get(&self, file_id: &str) -> Result<File>

Source

pub async fn get_with_relationships( &self, file_id: &str, relationships: &[&str], ) -> Result<File>

Source

pub async fn upload( &self, file_path: impl AsRef<Path>, ) -> Result<AnalysisResponse>

Source

pub async fn upload_with_password( &self, file_path: impl AsRef<Path>, password: Option<&str>, ) -> Result<AnalysisResponse>

Source

pub async fn upload_bytes( &self, bytes: Vec<u8>, filename: &str, ) -> Result<AnalysisResponse>

Source

pub async fn upload_bytes_with_password( &self, bytes: Vec<u8>, filename: &str, password: Option<&str>, ) -> Result<AnalysisResponse>

Source

pub async fn get_upload_url(&self) -> Result<String>

Source

pub async fn get_download_url(&self, file_id: &str) -> Result<String>

Source

pub async fn download(&self, file_id: &str) -> Result<Vec<u8>>

Source

pub async fn get_behavior_summary( &self, file_id: &str, ) -> Result<FileBehaviorSummaryResponse>

Source

pub async fn get_mitre_attack_techniques( &self, file_id: &str, ) -> Result<MitreTrees>

Source

pub async fn get_behavior_report( &self, sandbox_id: &str, ) -> Result<FileBehavior>

Source

pub async fn get_comments_iterator(&self, file_id: &str) -> CommentIterator<'_>

Source

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

Source

pub async fn get_behaviours(&self, file_id: &str) -> Result<Collection<Value>>

Source

pub async fn get_bundled_files( &self, file_id: &str, ) -> Result<Collection<Value>>

Source

pub async fn get_carbonblack_children( &self, file_id: &str, ) -> Result<Collection<Value>>

Source

pub async fn get_carbonblack_parents( &self, file_id: &str, ) -> Result<Collection<Value>>

Source

pub async fn get_compressed_parents( &self, file_id: &str, ) -> Result<Collection<Value>>

Source

pub async fn get_contacted_domains( &self, file_id: &str, ) -> Result<Collection<Value>>

Source

pub async fn get_contacted_ips( &self, file_id: &str, ) -> Result<Collection<Value>>

Source

pub async fn get_contacted_urls( &self, file_id: &str, ) -> Result<Collection<Value>>

Source

pub async fn get_dropped_files( &self, file_id: &str, ) -> Result<Collection<Value>>

Source

pub async fn get_execution_parents( &self, file_id: &str, ) -> Result<Collection<Value>>

Source

pub async fn get_itw_urls(&self, file_id: &str) -> Result<Collection<Value>>

Source

pub async fn get_overlay_parents( &self, file_id: &str, ) -> Result<Collection<Value>>

Source

pub async fn get_pcap_parents(&self, file_id: &str) -> Result<Collection<Value>>

Source

pub async fn get_pe_resource_parents( &self, file_id: &str, ) -> Result<Collection<Value>>

Source

pub async fn get_similar_files( &self, file_id: &str, ) -> Result<Collection<Value>>

Source§

impl<'a> FileClient<'a>

Source

pub fn new(client: &'a Client) -> Self

Source

pub async fn get_comments(&self, id: &str) -> Result<Collection<Comment>>

Source

pub async fn get_comments_with_limit( &self, id: &str, limit: u32, ) -> Result<Collection<Comment>>

Source

pub async fn add_comment( &self, id: &str, text: impl Into<String> + Send, ) -> Result<Comment>

Source

pub async fn get_votes(&self, id: &str) -> Result<VoteCollection>

Source

pub async fn add_vote(&self, id: &str, verdict: VoteVerdict) -> Result<Vote>

Source

pub async fn analyse(&self, id: &str) -> Result<AnalysisResponse>

Source

pub async fn get_analysis(&self, analysis_id: &str) -> Result<Analysis>

Source

pub async fn get_relationship<T>( &self, id: &str, relationship: &str, ) -> Result<Collection<T>>
where T: for<'de> Deserialize<'de> + Send,

Source

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,

Source

pub async fn get_relationship_descriptors( &self, id: &str, relationship: &str, ) -> Result<Collection<ObjectDescriptor>>

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,