Documentation
¶
Index ¶
- func CreateAWSS3Client(accessKeyID, accessKeySecret, accountID string) *s3.Client
- func CreateCFClient(creds *types.Credentials) *cloudflare.Client
- func CreateTemporaryR2Token(creds *types.Credentials) (string, string, error)
- func DeleteTemporaryR2Token(creds *types.Credentials, resources types.Resources) error
- func FetchZones(creds *types.Credentials, excludeZones []string) ([]*types.Zone, error)
- func PrettyPrintStatus(resources types.Resources)
- func PrintFailedResources(resources types.Resources)
- func PrintStatusWithContext(wg *sync.WaitGroup, ctx context.Context, resources types.Resources)
- func SpinWhile[T any](message string, fn func() T) (T, time.Duration)
- func SpinWhileWithError[T any](message string, fn func() (T, error)) (T, error)
- type ScanLogger
- func (l *ScanLogger) EntryCount() int
- func (l *ScanLogger) Flush() error
- func (l *ScanLogger) HasEntries() bool
- func (l *ScanLogger) LogError(format string, args ...interface{})
- func (l *ScanLogger) LogFilePath() string
- func (l *ScanLogger) LogWarning(format string, args ...interface{})
- func (l *ScanLogger) PrintSummary()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAWSS3Client ¶
func CreateCFClient ¶
func CreateCFClient(creds *types.Credentials) *cloudflare.Client
func CreateTemporaryR2Token ¶
func CreateTemporaryR2Token(creds *types.Credentials) (string, string, error)
func DeleteTemporaryR2Token ¶
func DeleteTemporaryR2Token(creds *types.Credentials, resources types.Resources) error
func FetchZones ¶ added in v0.8.2
FetchZones retrieves all zones for the account, excluding any zones in the excludeZones list
func PrettyPrintStatus ¶
func PrintFailedResources ¶ added in v0.7.0
PrintFailedResources outputs all resources that failed deletion along with their error messages
func PrintStatusWithContext ¶
Types ¶
type ScanLogger ¶ added in v0.8.1
type ScanLogger struct {
// contains filtered or unexported fields
}
ScanLogger collects warnings and errors during scanning and writes them to a log file
func GetLogger ¶ added in v0.8.1
func GetLogger() *ScanLogger
GetLogger returns the global scan logger instance
func (*ScanLogger) EntryCount ¶ added in v0.8.1
func (l *ScanLogger) EntryCount() int
EntryCount returns the number of logged entries
func (*ScanLogger) Flush ¶ added in v0.8.1
func (l *ScanLogger) Flush() error
Flush writes all entries to the log file
func (*ScanLogger) HasEntries ¶ added in v0.8.1
func (l *ScanLogger) HasEntries() bool
HasEntries returns true if there are any logged entries
func (*ScanLogger) LogError ¶ added in v0.8.1
func (l *ScanLogger) LogError(format string, args ...interface{})
LogError logs an error message
func (*ScanLogger) LogFilePath ¶ added in v0.8.1
func (l *ScanLogger) LogFilePath() string
LogFilePath returns the path to the log file
func (*ScanLogger) LogWarning ¶ added in v0.8.1
func (l *ScanLogger) LogWarning(format string, args ...interface{})
LogWarning logs a warning message
func (*ScanLogger) PrintSummary ¶ added in v0.8.1
func (l *ScanLogger) PrintSummary()
PrintSummary prints a red warning message if there were errors/warnings