Documentation ¶
Index ¶
- type DDB
- func (ddb *DDB) DeleteItem(integrationID string) error
- func (ddb *DDB) GetItem(integrationID string) (*Integration, error)
- func (ddb *DDB) PutItem(input *Integration) error
- func (ddb *DDB) ScanIntegrations(integrationType *string) ([]*Integration, error)
- func (ddb *DDB) UpdateStatus(integrationID string, status IntegrationStatus) error
- type Integration
- type IntegrationStatus
- type SqsConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DDB ¶
type DDB struct { Client dynamodbiface.DynamoDBAPI TableName string }
DDB is a struct containing the DynamoDB client, and the table name to retrieve data.
func (*DDB) DeleteItem ¶ added in v1.3.0
DeleteItem deletes an integration from the database based on the integration ID
func (*DDB) GetItem ¶ added in v1.3.0
func (ddb *DDB) GetItem(integrationID string) (*Integration, error)
GetItem returns an integration by its ID
func (*DDB) PutItem ¶ added in v1.3.0
func (ddb *DDB) PutItem(input *Integration) error
PutItem adds a source integration to the database
func (*DDB) ScanIntegrations ¶
func (ddb *DDB) ScanIntegrations(integrationType *string) ([]*Integration, error)
ScanIntegrations returns all enabled integrations based on type (if type is specified). It performs a DDB scan of the entire table with a filter expression.
func (*DDB) UpdateStatus ¶ added in v1.5.1
func (ddb *DDB) UpdateStatus(integrationID string, status IntegrationStatus) error
type Integration ¶ added in v1.5.1
type Integration struct { CreatedAtTime time.Time `json:"createdAtTime,omitempty"` CreatedBy string `json:"createdBy,omitempty"` IntegrationID string `json:"integrationId,omitempty"` IntegrationLabel string `json:"integrationLabel,omitempty"` IntegrationType string `json:"integrationType,omitempty"` AWSAccountID string `json:"awsAccountId,omitempty"` RemediationEnabled *bool `json:"remediationEnabled,omitempty"` CWEEnabled *bool `json:"cweEnabled,omitempty"` LastScanStartTime *time.Time `json:"lastScanStartTime,omitempty"` LastScanEndTime *time.Time `json:"lastScanEndTime,omitempty"` LastScanErrorMessage string `json:"lastScanErrorMessage,omitempty"` ScanIntervalMins int `json:"scanIntervalMins,omitempty"` IntegrationStatus S3Bucket string `json:"s3Bucket,omitempty"` S3Prefix string `json:"s3Prefix,omitempty"` KmsKey string `json:"kmsKey,omitempty"` LogTypes []string `json:"logTypes,omitempty" dynamodbav:",stringset"` StackName string `json:"stackName,omitempty"` LogProcessingRole string `json:"logProcessingRole,omitempty"` SqsConfig *SqsConfig `json:"sqsConfig,omitempty"` }
Integration represents an integration item as it is stored in DynamoDB.
type IntegrationStatus ¶ added in v1.5.1
type SqsConfig ¶ added in v1.6.0
type SqsConfig struct { S3Bucket string `json:"s3Bucket,omitempty"` S3Prefix string `json:"s3Prefix,omitempty"` LogProcessingRole string `json:"logProcessingRole,omitempty"` LogTypes []string `json:"logTypes" dynamodbav:",stringset"` AllowedPrincipalArns []string `json:"allowedPrincipalArns" dynamodbav:",stringset"` AllowedSourceArns []string `json:"allowedSourceArns" dynamodbav:",stringset"` QueueURL string `json:"queueUrl,omitempty"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.