Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCompletion = errors.New("the operation completed with errors") ErrNoMatchers = errors.New("no match options are configured for purging data") )
View Source
var ( FFISMatcher = &RegexMatcher{regexp.MustCompile(`\d{3}/\d{3,}/ffis.org/v1.json`)} GrantsGovMatcher = &RegexMatcher{regexp.MustCompile(`\d{3}/\d{3,}/grants.gov/v2.xml`)} AllMatcher = &RegexMatcher{regexp.MustCompile(`.*`)} )
Functions ¶
This section is empty.
Types ¶
type Cmd ¶
type Cmd struct { // Positional arguments S3Bucket string `arg:"" name:"bucket" help:"Prepared data S3 bucket name from which to purge objects."` // Flags MatchPaths []FilePathMatcher `placeholder:"glob" help:"Shell filename pattern (i.e. glob) for matching S3 keys to delete."` MatchRegex []RegexMatcher `placeholder:"expression" help:"Regex pattern for matching S3 keys to delete."` PurgeFFIS bool `help:"Delete all FFIS.org S3 objects (after applying --filter-prefix, if given)."` PurgeGov bool `help:"Delete all Grants.gov S3 objects (after applying --filter-prefix, if given)."` PurgeAll bool `help:"Delete all S3 objects (after applying --filter-prefix, if given)."` FilterPrefix string `name:"s3-prefix" default:"" help:"Prevent deleting bucket objects outside this prefix."` Concurrency ct.ConcurrencyLimit `default:"10" help:"Max concurrent batch-delete operations."` TotalsAfter ct.TotalsAfter `default:"1000" help:"Log S3 object totals after this many successful/failed deletions (silent if 0)."` S3UsePathStyle bool `name:"s3-use-path-style" help:"Use path-style addressing for S3 bucket."` DryRun bool `help:"Dry run only - no files will be uploaded to S3."` // contains filtered or unexported fields }
type FilePathMatcher ¶
type FilePathMatcher struct {
// contains filtered or unexported fields
}
func (*FilePathMatcher) IsSet ¶
func (m *FilePathMatcher) IsSet() bool
func (*FilePathMatcher) Match ¶
func (m *FilePathMatcher) Match(key string) bool
func (*FilePathMatcher) Pattern ¶
func (m *FilePathMatcher) Pattern() string
func (*FilePathMatcher) SetPattern ¶
func (m *FilePathMatcher) SetPattern(pattern string) error
func (*FilePathMatcher) UnmarshalText ¶
func (m *FilePathMatcher) UnmarshalText(text []byte) (err error)
type RegexMatcher ¶
type RegexMatcher struct {
// contains filtered or unexported fields
}
func (*RegexMatcher) IsSet ¶
func (m *RegexMatcher) IsSet() bool
func (*RegexMatcher) Match ¶
func (m *RegexMatcher) Match(key string) bool
func (*RegexMatcher) Pattern ¶
func (m *RegexMatcher) Pattern() string
func (*RegexMatcher) SetPattern ¶
func (m *RegexMatcher) SetPattern(pattern string) error
func (*RegexMatcher) UnmarshalText ¶
func (m *RegexMatcher) UnmarshalText(text []byte) error
Click to show internal directories.
Click to hide internal directories.