Documentation ¶
Index ¶
- Constants
- func AddNewMachineRule(client dynamodb.PutItemAPI, machineID string, identifier string, ...) error
- func GetMachineRules(client dynamodb.QueryAPI, machineID string) (items *[]MachineRuleRow, err error)
- func GetPrimaryKeysByMachineIDWhereMarkedForDeletion(client dynamodb.QueryAPI, machineID string) (keys *[]dynamodb.PrimaryKey, err error)
- func RemoveMachineRule(getter dynamodb.GetItemAPI, updater dynamodb.UpdateItemAPI, machineID string, ...) error
- func UpdateMachineRule(client dynamodb.UpdateItemAPI, machineID string, sha256 string, ...) (err error)
- type ConcreteMachineRulesService
- func (s ConcreteMachineRulesService) Add(machineId string, identifier string, ruleType types.RuleType, ...) error
- func (s ConcreteMachineRulesService) Get(machineId string, identifier string, ruleType types.RuleType) (rule *MachineRuleRow, err error)
- func (s ConcreteMachineRulesService) GetMachineRules(machineId string) (items *[]MachineRuleRow, err error)
- func (s ConcreteMachineRulesService) Remove(machineId string, identifier string, ruleType types.RuleType) error
- func (s ConcreteMachineRulesService) RemoveBySortKey(machineId string, ruleSortKey string) error
- func (s ConcreteMachineRulesService) Update(machineId string, identifier string, ruleType types.RuleType, ...) error
- type ConcreteMachineRulesUpdater
- type ConcreteRuleRemovalService
- type MachineRuleRow
- type MachineRulesService
- type MachineRulesUpdater
- type RuleRemovalService
Constants ¶
View Source
const MachineRuleDefaultExpirationHours = 24
Variables ¶
This section is empty.
Functions ¶
func AddNewMachineRule ¶
func GetMachineRules ¶
func GetMachineRules(client dynamodb.QueryAPI, machineID string) (items *[]MachineRuleRow, err error)
@deprecated
func GetPrimaryKeysByMachineIDWhereMarkedForDeletion ¶
func GetPrimaryKeysByMachineIDWhereMarkedForDeletion(client dynamodb.QueryAPI, machineID string) (keys *[]dynamodb.PrimaryKey, err error)
@deprecated
func RemoveMachineRule ¶
func RemoveMachineRule(getter dynamodb.GetItemAPI, updater dynamodb.UpdateItemAPI, machineID string, ruleSortKey string) error
@deprecated RemoveMachineRule executes the flow to "remove" a rule for the given machine. Upon next sync, the santa sensor will receive instructions to remove the rule from the database. If there is a global rule for the same Binary/Cert, the policy of the global will be "inherited" instead.
Types ¶
type ConcreteMachineRulesService ¶
type ConcreteMachineRulesService struct {
// contains filtered or unexported fields
}
func (ConcreteMachineRulesService) Get ¶
func (s ConcreteMachineRulesService) Get(machineId string, identifier string, ruleType types.RuleType) (rule *MachineRuleRow, err error)
func (ConcreteMachineRulesService) GetMachineRules ¶
func (s ConcreteMachineRulesService) GetMachineRules(machineId string) (items *[]MachineRuleRow, err error)
func (ConcreteMachineRulesService) RemoveBySortKey ¶
func (s ConcreteMachineRulesService) RemoveBySortKey(machineId string, ruleSortKey string) error
type ConcreteMachineRulesUpdater ¶
type ConcreteMachineRulesUpdater struct { Updater dynamodb.UpdateItemAPI TimeProvider clock.TimeProvider }
@deprecated
func (ConcreteMachineRulesUpdater) UpdateMachineRulePolicy ¶
func (c ConcreteMachineRulesUpdater) UpdateMachineRulePolicy(machineID string, sha256 string, ruleType types.RuleType, rulePolicy types.Policy) error
@deprecated
type ConcreteRuleRemovalService ¶
type ConcreteRuleRemovalService struct { Getter dynamodb.GetItemAPI Updater dynamodb.UpdateItemAPI }
@deprecated
func (ConcreteRuleRemovalService) RemoveMachineRule ¶
func (c ConcreteRuleRemovalService) RemoveMachineRule(machineID string, ruleSortKey string) (err error)
@deprecated
type MachineRuleRow ¶
type MachineRuleRow struct { dynamodb.PrimaryKey rules.SantaRule Description string `dynamodbav:"Description,omitempty"` DeleteOnNextSync bool `dynamodbav:"DeleteOnNextSync,omitempty"` ExpiresAfter int64 `dynamodbav:"ExpiresAfter,omitempty"` MachineID string `dynamodbav:"MachineID,omitempty"` // Broken; don't use this for now }
func GetMachineRuleByIdentifierType ¶ added in v1.0.1
func GetMachineRuleByIdentifierType(client dynamodb.GetItemAPI, machineID string, identifier string, ruleType types.RuleType) (rule *MachineRuleRow, err error)
func GetMachineRuleByShaType ¶
func GetMachineRuleByShaType(client dynamodb.GetItemAPI, machineID string, sha256 string, ruleType types.RuleType) (rule *MachineRuleRow, err error)
@deprecated
type MachineRulesService ¶
type MachineRulesService interface { Get(machineId string, identifier string, ruleType types.RuleType) (rule *MachineRuleRow, err error) Add(machineId string, identifier string, ruleType types.RuleType, policy types.Policy, description string, expires time.Time) error Update(machineId string, identifier string, ruleType types.RuleType, rulePolicy types.Policy, expires time.Time) error Remove(machineId string, identifier string, ruleType types.RuleType) error RemoveBySortKey(machineId string, ruleSortKey string) error GetMachineRules(machineID string) (items *[]MachineRuleRow, err error) }
This service exposes all machine rules access methods
func GetMachineRulesService ¶
func GetMachineRulesService(dynamodb dynamodb.DynamoDBClient) MachineRulesService
type MachineRulesUpdater ¶
type MachineRulesUpdater interface {
UpdateMachineRulePolicy(machineID string, sha256 string, ruleType types.RuleType, rulePolicy types.Policy) error
}
@deprecated
type RuleRemovalService ¶
type RuleRemovalService interface {
RemoveMachineRule(machineID string, ruleSortKey string) (err error)
}
@deprecated
Source Files ¶
Click to show internal directories.
Click to hide internal directories.