EventService

Trait EventService 

Source
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§

Source

fn create_event( &self, auth_: BearerToken, request: CreateEvent, ) -> Result<Event, Error>

Creates an event.

Source

fn get_events( &self, auth_: BearerToken, request: GetEvents, ) -> Result<BTreeSet<Event>, Error>

Gets a set of events by UUIDs

Source

fn batch_get_events( &self, auth_: BearerToken, request: BTreeSet<EventRid>, ) -> Result<BTreeSet<Event>, Error>

Gets a set of events by RID.

Source

fn update_event( &self, auth_: BearerToken, request: UpdateEvent, ) -> Result<Event, Error>

Updates the fields of an event. Empty fields are left unchanged.

Source

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.

Source

fn batch_update_disposition( &self, auth_: BearerToken, request: BatchUpdateDispositionRequest, ) -> Result<BatchUpdateDispositionResponse, Error>

Updates the disposition of an event.

Source

fn archive_event( &self, auth_: BearerToken, request: ArchiveEvent, ) -> Result<(), Error>

Archives an event

Source

fn batch_archive_event( &self, auth_: BearerToken, request: BTreeSet<EventRid>, ) -> Result<(), Error>

Archives a set of events

Source

fn batch_unarchive_event( &self, auth_: BearerToken, request: BTreeSet<EventRid>, ) -> Result<(), Error>

Unarchives a set of events

Source

fn search_events( &self, auth_: BearerToken, request: SearchEventsRequest, ) -> Result<SearchEventsResponse, Error>

Searches for events that match the given filters.

Source

fn get_events_histogram( &self, auth_: BearerToken, request: EventsHistogramRequest, ) -> Result<EventsHistogramResponse, Error>

Gets a histogram of events that match the given filters.

Source

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.

Implementors§