Documentation ¶
Index ¶
- type DDB
- func (ddb *DDB) DeleteIntegrationItem(input *models.DeleteIntegrationInput) error
- func (ddb *DDB) GetIntegration(integrationID *string) (*models.SourceIntegrationMetadata, error)
- func (ddb *DDB) PutSourceIntegration(input *models.SourceIntegrationMetadata) error
- func (ddb *DDB) ScanIntegrations(input *models.ListIntegrationsInput) ([]*models.SourceIntegration, error)
- func (ddb *DDB) UpdateItem(input *UpdateIntegrationItem) (*models.SourceIntegration, error)
- type UpdateIntegrationItem
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) DeleteIntegrationItem ¶
func (ddb *DDB) DeleteIntegrationItem(input *models.DeleteIntegrationInput) error
DeleteIntegrationItem deletes an integration from the database based on the integration ID
func (*DDB) GetIntegration ¶
func (ddb *DDB) GetIntegration(integrationID *string) (*models.SourceIntegrationMetadata, error)
GetIntegration returns an integration by its ID
func (*DDB) PutSourceIntegration ¶
func (ddb *DDB) PutSourceIntegration(input *models.SourceIntegrationMetadata) error
PutSourceIntegration adds a batch of new Snapshot Integrations to the database.
func (*DDB) ScanIntegrations ¶
func (ddb *DDB) ScanIntegrations(input *models.ListIntegrationsInput) ([]*models.SourceIntegration, 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) UpdateItem ¶
func (ddb *DDB) UpdateItem(input *UpdateIntegrationItem) (*models.SourceIntegration, error)
UpdateItem updates existing attributes in an item in the table.
It inspects the input struct to identify non-nil fields, and then only updates them.
type UpdateIntegrationItem ¶
type UpdateIntegrationItem struct { RemediationEnabled *bool `json:"remediationEnabled"` CWEEnabled *bool `json:"cweEnabled"` IntegrationID *string `json:"integrationId"` IntegrationLabel *string `json:"integrationLabel"` IntegrationType *string `json:"integrationType"` LastScanEndTime *time.Time `json:"lastScanEndTime"` LastScanErrorMessage *string `json:"lastScanErrorMessage"` LastScanStartTime *time.Time `json:"lastScanStartTime"` ScanStatus *string `json:"scanStatus"` ScanIntervalMins *int `json:"scanIntervalMins"` S3Bucket *string `json:"s3Bucket"` S3Prefix *string `json:"s3Prefix"` KmsKey *string `json:"kmsKey"` LogTypes []*string `json:"logTypes" dynamodbav:"logTypes,stringset"` }
UpdateIntegrationItem updates almost every attribute in the table.
It's used for attributes that can change, which is almost all of them except for the creation based ones (CreatedAtTime and CreatedBy).