Documentation
¶
Overview ¶
Package github provides a GitHub provider for the OpenCTEM SDK.
Index ¶
- type CodeScanningCollector
- type Config
- type DependabotCollector
- type Provider
- func (p *Provider) Close() error
- func (p *Provider) Connector() core.Connector
- func (p *Provider) GetCollector(name string) (core.Collector, error)
- func (p *Provider) Initialize(ctx context.Context, config *core.ProviderConfig) error
- func (p *Provider) ListCollectors() []core.Collector
- func (p *Provider) Name() string
- func (p *Provider) TestConnection(ctx context.Context) error
- type RepoCollector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CodeScanningCollector ¶
type CodeScanningCollector struct {
// contains filtered or unexported fields
}
CodeScanningCollector collects code scanning alerts from GitHub.
func NewCodeScanningCollector ¶
func NewCodeScanningCollector(connector *github.Connector, verbose bool) *CodeScanningCollector
NewCodeScanningCollector creates a new code scanning collector.
func (*CodeScanningCollector) Collect ¶
func (c *CodeScanningCollector) Collect(ctx context.Context, opts *core.CollectOptions) (*core.CollectResult, error)
func (*CodeScanningCollector) Name ¶
func (c *CodeScanningCollector) Name() string
func (*CodeScanningCollector) TestConnection ¶
func (c *CodeScanningCollector) TestConnection(ctx context.Context) error
func (*CodeScanningCollector) Type ¶
func (c *CodeScanningCollector) Type() string
type Config ¶
type Config struct {
// Token is the GitHub personal access token.
Token string `yaml:"token" json:"token"`
// Organization to scope operations to.
Organization string `yaml:"organization" json:"organization"`
// BaseURL for GitHub API (default: https://api.github.com).
BaseURL string `yaml:"base_url" json:"base_url"`
// RateLimit in requests per hour.
RateLimit int `yaml:"rate_limit" json:"rate_limit"`
// EnabledCollectors specifies which collectors to enable (empty = all).
EnabledCollectors []string `yaml:"enabled_collectors" json:"enabled_collectors"`
// Verbose enables debug logging.
Verbose bool `yaml:"verbose" json:"verbose"`
}
Config holds GitHub provider configuration.
type DependabotCollector ¶
type DependabotCollector struct {
// contains filtered or unexported fields
}
DependabotCollector collects Dependabot alerts from GitHub.
func NewDependabotCollector ¶
func NewDependabotCollector(connector *github.Connector, verbose bool) *DependabotCollector
NewDependabotCollector creates a new Dependabot collector.
func (*DependabotCollector) Collect ¶
func (c *DependabotCollector) Collect(ctx context.Context, opts *core.CollectOptions) (*core.CollectResult, error)
func (*DependabotCollector) Name ¶
func (c *DependabotCollector) Name() string
func (*DependabotCollector) TestConnection ¶
func (c *DependabotCollector) TestConnection(ctx context.Context) error
func (*DependabotCollector) Type ¶
func (c *DependabotCollector) Type() string
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider is a complete GitHub integration bundle.
func NewProvider ¶
NewProvider creates a new GitHub provider.
func (*Provider) GetCollector ¶
GetCollector returns a specific collector by name.
func (*Provider) Initialize ¶
Initialize sets up the provider.
func (*Provider) ListCollectors ¶
ListCollectors returns all available collectors.
type RepoCollector ¶
type RepoCollector struct {
// contains filtered or unexported fields
}
RepoCollector collects repository information from GitHub.
func NewRepoCollector ¶
func NewRepoCollector(connector *github.Connector, verbose bool) *RepoCollector
NewRepoCollector creates a new repo collector.
func (*RepoCollector) Collect ¶
func (c *RepoCollector) Collect(ctx context.Context, opts *core.CollectOptions) (*core.CollectResult, error)
func (*RepoCollector) Name ¶
func (c *RepoCollector) Name() string
func (*RepoCollector) TestConnection ¶
func (c *RepoCollector) TestConnection(ctx context.Context) error
func (*RepoCollector) Type ¶
func (c *RepoCollector) Type() string