pub trait EventService {
// Required methods
fn create_event(
&self,
auth_: BearerToken,
request: CreateEvent,
) -> Result<Event, Error>;
fn get_events(
&self,
auth_: BearerToken,
request: GetEvents,
) -> Result<BTreeSet<Event>, Error>;
fn batch_get_events(
&self,
auth_: BearerToken,
request: BTreeSet<EventRid>,
) -> Result<BTreeSet<Event>, Error>;
fn update_event(
&self,
auth_: BearerToken,
request: UpdateEvent,
) -> Result<Event, Error>;
fn batch_update_event(
&self,
auth_: BearerToken,
request: BatchUpdateEventRequest,
) -> Result<BatchUpdateEventResponse, Error>;
fn batch_update_disposition(
&self,
auth_: BearerToken,
request: BatchUpdateDispositionRequest,
) -> Result<BatchUpdateDispositionResponse, Error>;
fn archive_event(
&self,
auth_: BearerToken,
request: ArchiveEvent,
) -> Result<(), Error>;
fn batch_archive_event(
&self,
auth_: BearerToken,
request: BTreeSet<EventRid>,
) -> Result<(), Error>;
fn batch_unarchive_event(
&self,
auth_: BearerToken,
request: BTreeSet<EventRid>,
) -> Result<(), Error>;
fn search_events(
&self,
auth_: BearerToken,
request: SearchEventsRequest,
) -> Result<SearchEventsResponse, Error>;
fn get_events_histogram(
&self,
auth_: BearerToken,
request: EventsHistogramRequest,
) -> Result<EventsHistogramResponse, Error>;
fn list_properties_and_labels(
&self,
auth_: BearerToken,
request: ListPropertiesAndLabelsRequest,
) -> Result<ListPropertiesAndLabelsResponse, Error>;
}
Expand description
An Event is an annotated moment or time range. The Event Service is responsible for creating and retrieving events for a particular data source.
Required Methods§
Sourcefn create_event(
&self,
auth_: BearerToken,
request: CreateEvent,
) -> Result<Event, Error>
fn create_event( &self, auth_: BearerToken, request: CreateEvent, ) -> Result<Event, Error>
Creates an event.
Sourcefn get_events(
&self,
auth_: BearerToken,
request: GetEvents,
) -> Result<BTreeSet<Event>, Error>
fn get_events( &self, auth_: BearerToken, request: GetEvents, ) -> Result<BTreeSet<Event>, Error>
Gets a set of events by UUIDs
Sourcefn batch_get_events(
&self,
auth_: BearerToken,
request: BTreeSet<EventRid>,
) -> Result<BTreeSet<Event>, Error>
fn batch_get_events( &self, auth_: BearerToken, request: BTreeSet<EventRid>, ) -> Result<BTreeSet<Event>, Error>
Gets a set of events by RID.
Sourcefn update_event(
&self,
auth_: BearerToken,
request: UpdateEvent,
) -> Result<Event, Error>
fn update_event( &self, auth_: BearerToken, request: UpdateEvent, ) -> Result<Event, Error>
Updates the fields of an event. Empty fields are left unchanged.
Sourcefn batch_update_event(
&self,
auth_: BearerToken,
request: BatchUpdateEventRequest,
) -> Result<BatchUpdateEventResponse, Error>
fn batch_update_event( &self, auth_: BearerToken, request: BatchUpdateEventRequest, ) -> Result<BatchUpdateEventResponse, Error>
Updates the fields of an event specified by each request in the batch. Empty fields in the UpdateEventRequest are left unchanged.
Sourcefn batch_update_disposition(
&self,
auth_: BearerToken,
request: BatchUpdateDispositionRequest,
) -> Result<BatchUpdateDispositionResponse, Error>
fn batch_update_disposition( &self, auth_: BearerToken, request: BatchUpdateDispositionRequest, ) -> Result<BatchUpdateDispositionResponse, Error>
Updates the disposition of an event.
Sourcefn archive_event(
&self,
auth_: BearerToken,
request: ArchiveEvent,
) -> Result<(), Error>
fn archive_event( &self, auth_: BearerToken, request: ArchiveEvent, ) -> Result<(), Error>
Archives an event
Sourcefn batch_archive_event(
&self,
auth_: BearerToken,
request: BTreeSet<EventRid>,
) -> Result<(), Error>
fn batch_archive_event( &self, auth_: BearerToken, request: BTreeSet<EventRid>, ) -> Result<(), Error>
Archives a set of events
Sourcefn batch_unarchive_event(
&self,
auth_: BearerToken,
request: BTreeSet<EventRid>,
) -> Result<(), Error>
fn batch_unarchive_event( &self, auth_: BearerToken, request: BTreeSet<EventRid>, ) -> Result<(), Error>
Unarchives a set of events
Sourcefn search_events(
&self,
auth_: BearerToken,
request: SearchEventsRequest,
) -> Result<SearchEventsResponse, Error>
fn search_events( &self, auth_: BearerToken, request: SearchEventsRequest, ) -> Result<SearchEventsResponse, Error>
Searches for events that match the given filters.
Sourcefn get_events_histogram(
&self,
auth_: BearerToken,
request: EventsHistogramRequest,
) -> Result<EventsHistogramResponse, Error>
fn get_events_histogram( &self, auth_: BearerToken, request: EventsHistogramRequest, ) -> Result<EventsHistogramResponse, Error>
Gets a histogram of events that match the given filters.
Sourcefn list_properties_and_labels(
&self,
auth_: BearerToken,
request: ListPropertiesAndLabelsRequest,
) -> Result<ListPropertiesAndLabelsResponse, Error>
fn list_properties_and_labels( &self, auth_: BearerToken, request: ListPropertiesAndLabelsRequest, ) -> Result<ListPropertiesAndLabelsResponse, Error>
Lists the properties and labels of all events in the provided workspaces.