Struct google_api_proto::grafeas::v1::grafeas_client::GrafeasClient
source · pub struct GrafeasClient<T> { /* private fields */ }
Expand description
Grafeas API.
Retrieves analysis results of Cloud components such as Docker container images.
Analysis results are stored as a series of occurrences. An Occurrence
contains information about a specific analysis instance on a resource. An
occurrence refers to a Note
. A note contains details describing the
analysis and is generally stored in a separate project, called a Provider
.
Multiple occurrences can refer to the same note.
For example, an SSL vulnerability could affect multiple images. In this case, there would be one note for the vulnerability and an occurrence for each image with the vulnerability referring to that note.
Implementations§
source§impl<T> GrafeasClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> GrafeasClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> GrafeasClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
sourcepub async fn get_occurrence(
&mut self,
request: impl IntoRequest<GetOccurrenceRequest>,
) -> Result<Response<Occurrence>, Status>
pub async fn get_occurrence( &mut self, request: impl IntoRequest<GetOccurrenceRequest>, ) -> Result<Response<Occurrence>, Status>
Gets the specified occurrence.
sourcepub async fn list_occurrences(
&mut self,
request: impl IntoRequest<ListOccurrencesRequest>,
) -> Result<Response<ListOccurrencesResponse>, Status>
pub async fn list_occurrences( &mut self, request: impl IntoRequest<ListOccurrencesRequest>, ) -> Result<Response<ListOccurrencesResponse>, Status>
Lists occurrences for the specified project.
sourcepub async fn delete_occurrence(
&mut self,
request: impl IntoRequest<DeleteOccurrenceRequest>,
) -> Result<Response<()>, Status>
pub async fn delete_occurrence( &mut self, request: impl IntoRequest<DeleteOccurrenceRequest>, ) -> Result<Response<()>, Status>
Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource.
sourcepub async fn create_occurrence(
&mut self,
request: impl IntoRequest<CreateOccurrenceRequest>,
) -> Result<Response<Occurrence>, Status>
pub async fn create_occurrence( &mut self, request: impl IntoRequest<CreateOccurrenceRequest>, ) -> Result<Response<Occurrence>, Status>
Creates a new occurrence.
sourcepub async fn batch_create_occurrences(
&mut self,
request: impl IntoRequest<BatchCreateOccurrencesRequest>,
) -> Result<Response<BatchCreateOccurrencesResponse>, Status>
pub async fn batch_create_occurrences( &mut self, request: impl IntoRequest<BatchCreateOccurrencesRequest>, ) -> Result<Response<BatchCreateOccurrencesResponse>, Status>
Creates new occurrences in batch.
sourcepub async fn update_occurrence(
&mut self,
request: impl IntoRequest<UpdateOccurrenceRequest>,
) -> Result<Response<Occurrence>, Status>
pub async fn update_occurrence( &mut self, request: impl IntoRequest<UpdateOccurrenceRequest>, ) -> Result<Response<Occurrence>, Status>
Updates the specified occurrence.
sourcepub async fn get_occurrence_note(
&mut self,
request: impl IntoRequest<GetOccurrenceNoteRequest>,
) -> Result<Response<Note>, Status>
pub async fn get_occurrence_note( &mut self, request: impl IntoRequest<GetOccurrenceNoteRequest>, ) -> Result<Response<Note>, Status>
Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project.
sourcepub async fn get_note(
&mut self,
request: impl IntoRequest<GetNoteRequest>,
) -> Result<Response<Note>, Status>
pub async fn get_note( &mut self, request: impl IntoRequest<GetNoteRequest>, ) -> Result<Response<Note>, Status>
Gets the specified note.
sourcepub async fn list_notes(
&mut self,
request: impl IntoRequest<ListNotesRequest>,
) -> Result<Response<ListNotesResponse>, Status>
pub async fn list_notes( &mut self, request: impl IntoRequest<ListNotesRequest>, ) -> Result<Response<ListNotesResponse>, Status>
Lists notes for the specified project.
sourcepub async fn delete_note(
&mut self,
request: impl IntoRequest<DeleteNoteRequest>,
) -> Result<Response<()>, Status>
pub async fn delete_note( &mut self, request: impl IntoRequest<DeleteNoteRequest>, ) -> Result<Response<()>, Status>
Deletes the specified note.
sourcepub async fn create_note(
&mut self,
request: impl IntoRequest<CreateNoteRequest>,
) -> Result<Response<Note>, Status>
pub async fn create_note( &mut self, request: impl IntoRequest<CreateNoteRequest>, ) -> Result<Response<Note>, Status>
Creates a new note.
sourcepub async fn batch_create_notes(
&mut self,
request: impl IntoRequest<BatchCreateNotesRequest>,
) -> Result<Response<BatchCreateNotesResponse>, Status>
pub async fn batch_create_notes( &mut self, request: impl IntoRequest<BatchCreateNotesRequest>, ) -> Result<Response<BatchCreateNotesResponse>, Status>
Creates new notes in batch.
sourcepub async fn update_note(
&mut self,
request: impl IntoRequest<UpdateNoteRequest>,
) -> Result<Response<Note>, Status>
pub async fn update_note( &mut self, request: impl IntoRequest<UpdateNoteRequest>, ) -> Result<Response<Note>, Status>
Updates the specified note.
sourcepub async fn list_note_occurrences(
&mut self,
request: impl IntoRequest<ListNoteOccurrencesRequest>,
) -> Result<Response<ListNoteOccurrencesResponse>, Status>
pub async fn list_note_occurrences( &mut self, request: impl IntoRequest<ListNoteOccurrencesRequest>, ) -> Result<Response<ListNoteOccurrencesResponse>, Status>
Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note.
Trait Implementations§
source§impl<T: Clone> Clone for GrafeasClient<T>
impl<T: Clone> Clone for GrafeasClient<T>
source§fn clone(&self) -> GrafeasClient<T>
fn clone(&self) -> GrafeasClient<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<T> !Freeze for GrafeasClient<T>
impl<T> RefUnwindSafe for GrafeasClient<T>where
T: RefUnwindSafe,
impl<T> Send for GrafeasClient<T>where
T: Send,
impl<T> Sync for GrafeasClient<T>where
T: Sync,
impl<T> Unpin for GrafeasClient<T>where
T: Unpin,
impl<T> UnwindSafe for GrafeasClient<T>where
T: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request