Documentation ¶
Index ¶
- func AddNewGlobalRule(time clock.TimeProvider, client dynamodb.TransactWriteItemsAPI, ...) error
- func PingDatabase(client dynamodb.QueryAPI) (err error)
- func RemoveGlobalRule(timeProvider clock.TimeProvider, getter dynamodb.GetItemAPI, ...) error
- func UpdateGlobalRule(time clock.TimeProvider, client dynamodb.TransactWriteItemsAPI, ...) error
- type ConcreteGlobalRulesUpdater
- type ConcreteRuleRemovalService
- type GlobalRuleRow
- func GetGlobalRuleByIdentifier(client dynamodb.GetItemAPI, identifier string, ruleType types.RuleType) (*GlobalRuleRow, error)
- func GetGlobalRuleByShaType(client dynamodb.GetItemAPI, sha256 string, ruleType types.RuleType) (*GlobalRuleRow, error)
- func GetGlobalRuleBySortKey(client dynamodb.GetItemAPI, ruleSortKey string) (*GlobalRuleRow, error)
- func GetPaginatedGlobalRules(client dynamodb.QueryAPI, limit int, exclusiveStartKey *dynamodb.PrimaryKey) (items []*GlobalRuleRow, lastEvaluatedKey *dynamodb.PrimaryKey, err error)
- type GlobalRulesUpdater
- type RuleRemovalService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddNewGlobalRule ¶
func PingDatabase ¶
func RemoveGlobalRule ¶
func RemoveGlobalRule( timeProvider clock.TimeProvider, getter dynamodb.GetItemAPI, transacter dynamodb.TransactWriteItemsAPI, ruleSortKey string, txnIdempotencyKey string, ) error
RemoveGlobalRule will remove the rule from the global repository of rules. It also creates a new rule entry in the feed that explicitly tells future syncs to remove the rule too.
func UpdateGlobalRule ¶
func UpdateGlobalRule( time clock.TimeProvider, client dynamodb.TransactWriteItemsAPI, identifier string, ruleType types.RuleType, rulePolicy types.Policy, ) error
Types ¶
type ConcreteGlobalRulesUpdater ¶
type ConcreteGlobalRulesUpdater struct { ClockProvider clock.TimeProvider TransactWrite dynamodb.TransactWriteItemsAPI }
func (ConcreteGlobalRulesUpdater) UpdateGlobalRule ¶
type ConcreteRuleRemovalService ¶
type ConcreteRuleRemovalService struct { TimeProvider clock.TimeProvider Getter dynamodb.GetItemAPI Transacter dynamodb.TransactWriteItemsAPI }
func (ConcreteRuleRemovalService) RemoveGlobalRule ¶
func (c ConcreteRuleRemovalService) RemoveGlobalRule(ruleSortKey string, idempotencyKey string) (err error)
type GlobalRuleRow ¶
type GlobalRuleRow struct { dynamodb.PrimaryKey rules.SantaRule Description string `dynamodbav:"Description,omitempty"` }
func GetGlobalRuleByIdentifier ¶ added in v1.0.1
func GetGlobalRuleByIdentifier(client dynamodb.GetItemAPI, identifier string, ruleType types.RuleType) (*GlobalRuleRow, error)
func GetGlobalRuleByShaType ¶
func GetGlobalRuleByShaType(client dynamodb.GetItemAPI, sha256 string, ruleType types.RuleType) (*GlobalRuleRow, error)
@deprecated Use GetGlobalRuleByIdentifier
func GetGlobalRuleBySortKey ¶
func GetGlobalRuleBySortKey(client dynamodb.GetItemAPI, ruleSortKey string) (*GlobalRuleRow, error)
func GetPaginatedGlobalRules ¶
func GetPaginatedGlobalRules( client dynamodb.QueryAPI, limit int, exclusiveStartKey *dynamodb.PrimaryKey, ) ( items []*GlobalRuleRow, lastEvaluatedKey *dynamodb.PrimaryKey, err error, )
type GlobalRulesUpdater ¶
type RuleRemovalService ¶
Click to show internal directories.
Click to hide internal directories.