api

package
v1.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2021 License: AGPL-3.0 Imports: 30 Imported by: 0

Documentation

Overview

Package api defines CRUD actions for the Panther alerts database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

API has all of the handlers as receiver methods.

func Setup

func Setup() *API

Setup - parses the environment and builds the AWS and http clients.

func (*API) GetAlert

func (api *API) GetAlert(input *models.GetAlertInput) (*models.GetAlertOutput, error)

GetAlert retrieves details for a given alert

func (*API) ListAlerts

func (api *API) ListAlerts(input *models.ListAlertsInput) (result *models.ListAlertsOutput, err error)

ListAlerts retrieves alert and event details.

func (*API) UpdateAlertDelivery added in v1.8.0

func (api *API) UpdateAlertDelivery(input *models.UpdateAlertDeliveryInput) (result *models.UpdateAlertDeliveryOutput, err error)

UpdateAlertDelivery modifies an alert's attributes.

func (*API) UpdateAlertStatus added in v1.6.0

func (api *API) UpdateAlertStatus(input *models.UpdateAlertStatusInput) (models.UpdateAlertStatusOutput, error)

UpdateAlertStatus modifies an alert's attributes.

type Event added in v1.14.3

type Event struct {
	// contains filtered or unexported fields
}

type EventPaginationToken added in v1.0.0

type EventPaginationToken struct {
	LogTypeToToken map[string]*LogTypeToken `json:"logTypeToToken"`
}

EventPaginationToken - token used for paginating through the events in an alert

type LogTypeToken added in v1.0.0

type LogTypeToken struct {
	S3ObjectKey string `json:"s3ObjectKey"`
	EventIndex  int    `json:"eventIndex"`
}

LogTypeToken - token used for paginating in the events of a specific log type

type S3Search added in v1.14.3

type S3Search struct {
	// contains filtered or unexported fields
}

func (*S3Search) Do added in v1.14.3

func (s *S3Search) Do(ctx context.Context) (*S3SearchResult, error)

Do runs the search for the objects specified It will retrieve results by query each S3 object in parallel, using S3 Select

type S3SearchResult added in v1.14.3

type S3SearchResult struct {
	// contains filtered or unexported fields
}

type S3Select added in v1.14.3

type S3Select struct {
	// contains filtered or unexported fields
}

func (*S3Select) Query added in v1.14.3

func (s *S3Select) Query(ctx context.Context) (*S3SelectResult, error)

Queries a specific S3 object events associated to `alertID`. Returns : 1. The events that are associated to the given alertID that are present in that S3 object. It will return maximum `maxResults` events 2. The index of the last event returned. This will be used as a pagination token - future queries to the same S3 object can start listing after that.

func (*S3Select) QueryAsync added in v1.14.3

func (s *S3Select) QueryAsync(ctx context.Context, outChan chan<- *S3SelectResult) error

Same as above, but writes the results in a channel

type S3SelectResult added in v1.14.3

type S3SelectResult struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL