Documentation
¶
Overview ¶
Package repeatconfig provides a utility for applying the RepeatConfig proto to config checks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyRepeatConfigToFile ¶
func ApplyRepeatConfigToFile(fileSet *ipb.FileSet, config *RepeatConfig) *ipb.FileSet
ApplyRepeatConfigToFile applies the substitutions in the given repeat config to the given FileSet. The returned FileSet proto is a copy of the original.
func ApplyRepeatConfigToInstruction ¶
func ApplyRepeatConfigToInstruction(instruction *ipb.FileCheck, config *RepeatConfig) *ipb.FileCheck
ApplyRepeatConfigToInstruction applies the substitutions in the given repeat config to the given instruction. The returned instruction proto is a copy of the original.
Types ¶
type RepeatConfig ¶
type RepeatConfig struct { TokenReplacements []*TokenReplacement Err error }
RepeatConfig is a single repeat config that specifies what tokens to replace in the files/instructions in this iteration of the check.
func CreateRepeatConfigs ¶
func CreateRepeatConfigs(ctx context.Context, repeatOptions *ipb.RepeatConfig, fs scanapi.Filesystem) ([]*RepeatConfig, error)
CreateRepeatConfigs creates a list of configs with the appropriate token substitutions based on the supplied repeat config enum.
type TokenReplacement ¶
TokenReplacement describes a single token to replace.