scanner

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultInfraDirs = []string{

	"deploy",

	"infra",

	".github/workflows",
}
View Source
var DefaultScanDirs = []string{

	"docs",

	".agents",
}
View Source
var DefaultTargetFiles = []string{}

Functions

This section is empty.

Types

type FileEntry

type FileEntry struct {
	RepoName string `json:"repo_name"`

	Path string `json:"path"`

	SHA string `json:"sha"`

	Type string `json:"type"` // e.g. "catalog-info", "mkdocs", "openapi", "swagger", "readme", "docs"

}

type RepoInfo

type RepoInfo struct {
	Name string `json:"name"`

	FullName string `json:"full_name"`

	Description string `json:"description"`

	HTMLURL string `json:"html_url"`

	Files []FileEntry `json:"files"`
}

type Scanner

type Scanner struct {
	// contains filtered or unexported fields
}

func New

func New(client *github.Client, org string, scanInterval time.Duration, targetFilesOverride, scanDirs, infraDirs, extraRepos, repoTopics []string, repoRegex *regexp.Regexp, registry *parser.ParserRegistry) *Scanner

func (*Scanner) GetFileContent

func (s *Scanner) GetFileContent(ctx context.Context, repoName, path string) (string, error)

func (*Scanner) IsIndexed

func (s *Scanner) IsIndexed(repoName, path string) bool

func (*Scanner) ListRepos

func (s *Scanner) ListRepos() []RepoInfo

func (*Scanner) SearchDocs

func (s *Scanner) SearchDocs(query string) []FileEntry

func (*Scanner) SetOnScanComplete

func (s *Scanner) SetOnScanComplete(fn func([]RepoInfo))

func (*Scanner) Start

func (s *Scanner) Start(ctx context.Context)

func (*Scanner) Status

func (s *Scanner) Status() (scanning bool, lastScan time.Time, repoCount int)

func (*Scanner) TriggerRepoScan

func (s *Scanner) TriggerRepoScan(ctx context.Context, owner, repoName string)

func (*Scanner) TriggerScan

func (s *Scanner) TriggerScan() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL