Documentation
¶
Index ¶
- Constants
- func Validator() (*validator.Validate, error)
- type DeleteIntegrationInput
- type LambdaInput
- type ListIntegrationsInput
- type PutIntegrationInput
- type PutIntegrationSettings
- type SourceIntegration
- type SourceIntegrationMetadata
- type SourceIntegrationScanInformation
- type SourceIntegrationStatus
- type UpdateIntegrationLastScanEndInput
- type UpdateIntegrationLastScanStartInput
- type UpdateIntegrationSettingsInput
Constants ¶
const ( // IntegrationTypeAWSScan is the integration type for snapshots in customer AWS accounts. IntegrationTypeAWSScan = "aws-scan" // IntegrationTypeAWS3 is the integration type for importing data from customer S3 buckets. IntegrationTypeAWS3 = "aws-s3" // StatusError is the string set in the database when an error occurs in a scan. StatusError = "error" // StatusOK is the string set in the database when a scan is successful. StatusOK = "ok" // StatusScanning is the status set while a scan is underway. StatusScanning = "scanning" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DeleteIntegrationInput ¶
type DeleteIntegrationInput struct {
IntegrationID *string `json:"integrationId" validate:"required,uuid4"`
}
DeleteIntegrationInput is used to delete a specific item from the database.
type LambdaInput ¶
type LambdaInput struct {
PutIntegration *PutIntegrationInput `json:"putIntegration"`
ListIntegrations *ListIntegrationsInput `json:"getEnabledIntegrations"`
UpdateIntegrationLastScanEnd *UpdateIntegrationLastScanEndInput `json:"updateIntegrationLastScanEnd"`
UpdateIntegrationLastScanStart *UpdateIntegrationLastScanStartInput `json:"updateIntegrationLastScanStart"`
UpdateIntegrationSettings *UpdateIntegrationSettingsInput `json:"updateIntegrationSettings"`
DeleteIntegration *DeleteIntegrationInput `json:"deleteIntegration"`
}
LambdaInput is the collection of all possible args to the Lambda function.
type ListIntegrationsInput ¶
type ListIntegrationsInput struct {
ScanEnabled *bool `json:"scanEnabled"`
IntegrationType *string `json:"integrationType" validate:"oneof=aws-scan aws-s3"`
}
ListIntegrationsInput allows filtering by the IntegrationType or Enabled fields
type PutIntegrationInput ¶
type PutIntegrationInput struct {
Integrations []*PutIntegrationSettings `json:"integrations" validate:"required,dive"`
SkipScanQueue *bool `json:"skipScanQueue"`
}
PutIntegrationInput is used to add one or many integrations.
type PutIntegrationSettings ¶
type PutIntegrationSettings struct {
AWSAccountID *string `genericapi:"redact" json:"awsAccountId" validate:"required,len=12,numeric"`
IntegrationLabel *string `json:"integrationLabel,omitempty" validate:"omitempty,min=1"`
IntegrationType *string `json:"integrationType" validate:"required,oneof=aws-scan aws-s3"`
ScanEnabled *bool `json:"scanEnabled,omitempty"`
ScanIntervalMins *int `json:"scanIntervalMins,omitempty" validate:"omitempty,oneof=60 180 360 720 1440"`
UserID *string `json:"userId" validate:"required,uuid4"`
S3Buckets []*string `json:"s3Buckets"`
KmsKeys []*string `json:"kmsKeys"`
}
PutIntegrationSettings are all the settings for the new integration.
type SourceIntegration ¶
type SourceIntegration struct {
*SourceIntegrationMetadata
*SourceIntegrationStatus
*SourceIntegrationScanInformation
}
SourceIntegration is the dynamodb item corresponding to the PutIntegration route.
type SourceIntegrationMetadata ¶
type SourceIntegrationMetadata struct {
AWSAccountID *string `json:"awsAccountId"`
CreatedAtTime *time.Time `json:"createdAtTime"`
CreatedBy *string `json:"createdBy"`
IntegrationID *string `json:"integrationId"`
IntegrationLabel *string `json:"integrationLabel"`
IntegrationType *string `json:"integrationType"`
ScanEnabled *bool `json:"scanEnabled"`
ScanIntervalMins *int `json:"scanIntervalMins"`
S3Buckets []*string `json:"s3Buckets"`
KmsKeys []*string `json:"kmsKeys"`
}
SourceIntegrationMetadata is general settings and metadata for an integration.
type SourceIntegrationScanInformation ¶
type SourceIntegrationScanInformation struct {
LastScanEndTime *time.Time `json:"lastScanEndTime"`
LastScanErrorMessage *string `json:"lastScanErrorMessage"`
LastScanStartTime *time.Time `json:"lastScanStartTime"`
}
SourceIntegrationScanInformation is detail about the last snapshot.
type SourceIntegrationStatus ¶
type SourceIntegrationStatus struct {
ScanStatus *string `json:"scanStatus"`
EventStatus *string `json:"eventStatus"`
}
SourceIntegrationStatus provides context that the full scan works and that events are being received.
type UpdateIntegrationLastScanEndInput ¶
type UpdateIntegrationLastScanEndInput struct {
EventStatus *string `json:"eventStatus"`
IntegrationID *string `json:"integrationId" validate:"required,uuid4"`
LastScanEndTime *time.Time `json:"lastScanEndTime" validate:"required"`
LastScanErrorMessage *string `json:"lastScanErrorMessage"`
ScanStatus *string `json:"scanStatus" validate:"required,oneof=ok error scanning"`
}
UpdateIntegrationLastScanEndInput is used to update scan information at the end of a scan.
type UpdateIntegrationLastScanStartInput ¶
type UpdateIntegrationLastScanStartInput struct {
IntegrationID *string `json:"integrationId" validate:"required,uuid4"`
LastScanStartTime *time.Time `json:"lastScanStartTime" validate:"required"`
ScanStatus *string `json:"scanStatus" validate:"required,oneof=ok error scanning"`
}
UpdateIntegrationLastScanStartInput is used to update scan information at the beginning of a scan.
type UpdateIntegrationSettingsInput ¶
type UpdateIntegrationSettingsInput struct {
AWSAccountID *string `genericapi:"redact" json:"awsAccountId,omitempty" validate:"omitempty,len=12,numeric"`
IntegrationID *string `json:"integrationId" validate:"required,uuid4"`
IntegrationLabel *string `json:"integrationLabel" validate:"min=1"`
ScanEnabled *bool `json:"scanEnabled"`
ScanIntervalMins *int `json:"scanIntervalMins" validate:"omitempty,oneof=60 180 360 720 1440"`
S3Buckets []*string `json:"s3Buckets"`
KmsKeys []*string `json:"kmsKeys"`
}
UpdateIntegrationSettingsInput is used to update integration settings.