Documentation
¶
Index ¶
- func ErrorCode(err error) string
- func ErrorMessage(err error) string
- func IsContextError(err error) bool
- func IsResourceLimit(err error) bool
- type Config
- type Emitter
- type Error
- type Event
- type FileResult
- type GlobSet
- type Matcher
- func (m *Matcher) LiteralPrefix() string
- func (m *Matcher) Scan(filePath string, reader io.Reader, maxMatches int) (FileResult, error)
- func (m *Matcher) ScanEmit(filePath string, reader io.Reader, maxMatches int, emit func(Event) error) (FileResult, error)
- func (m *Matcher) ScanEmitContext(ctx context.Context, filePath string, reader io.Reader, maxMatches int, ...) (FileResult, error)
- type MatcherConfig
- type Mode
- type Runner
- type Submatch
- type Summary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorMessage ¶
func IsContextError ¶
func IsResourceLimit ¶
Types ¶
type Event ¶
type Event struct {
Type string `json:"type"`
SchemaVersion int `json:"schema_version,omitempty"`
Provider string `json:"provider,omitempty"`
Repository string `json:"repository,omitempty"`
RequestedRef string `json:"requested_ref,omitempty"`
ResolvedRef string `json:"resolved_ref,omitempty"`
Commit string `json:"commit,omitempty"`
CommitInfo *provider.CommitInfo `json:"commit_info,omitempty"`
Mode Mode `json:"mode,omitempty"`
Path string `json:"path,omitempty"`
Line int `json:"line,omitempty"`
Column int `json:"column,omitempty"`
Text string `json:"text,omitempty"`
Context string `json:"context,omitempty"`
Submatches []Submatch `json:"submatches,omitempty"`
Code string `json:"code,omitempty"`
Message string `json:"message,omitempty"`
Summary *Summary `json:"summary,omitempty"`
}
func NewMetaEvent ¶
func NewSummaryEvent ¶
func (Event) MarshalJSON ¶
type FileResult ¶
type GlobSet ¶
type GlobSet struct {
// contains filtered or unexported fields
}
func CompileGlobs ¶
type Matcher ¶
type Matcher struct {
// contains filtered or unexported fields
}
func NewMatcher ¶
func NewMatcher(config MatcherConfig) (*Matcher, error)
func (*Matcher) LiteralPrefix ¶
type MatcherConfig ¶
type Summary ¶
type Summary struct {
MatchedLines int `json:"matched_lines"`
MatchedFiles int `json:"matched_files"`
ScannedFiles int `json:"scanned_files"`
CacheHits int `json:"cache_hits"`
DownloadedBytes int64 `json:"downloaded_bytes"`
SkippedBinary int `json:"skipped_binary"`
APIRequests int `json:"api_requests"`
APIRetries int `json:"api_retries"`
RequestLimit int `json:"request_limit"`
RateLimit *provider.RateLimit `json:"rate_limit,omitempty"`
Transport string `json:"transport,omitempty"`
Complete bool `json:"complete"`
Truncated bool `json:"truncated"`
Reason string `json:"reason,omitempty"`
DurationMS int64 `json:"duration_ms"`
}
Click to show internal directories.
Click to hide internal directories.