github

package
v3.82.9 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: AGPL-3.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

Variables

This section is empty.

Functions

This section is empty.

Types

type GistUnit added in v3.82.2

type GistUnit struct {
	Name string `json:"name"`
	URL  string `json:"url"`
}

func (GistUnit) Display added in v3.82.2

func (g GistUnit) Display() string

func (GistUnit) SourceUnitID added in v3.82.2

func (g GistUnit) SourceUnitID() (string, sources.SourceUnitKind)

type RepoUnit added in v3.82.2

type RepoUnit struct {
	Name string `json:"name"`
	URL  string `json:"url"`
}

func (RepoUnit) Display added in v3.82.2

func (r RepoUnit) Display() string

func (RepoUnit) SourceUnitID added in v3.82.2

func (r RepoUnit) SourceUnitID() (string, sources.SourceUnitKind)

type Source

type Source struct {
	sources.Progress
	sources.CommonSourceUnitUnmarshaller
	// contains filtered or unexported fields
}

func (*Source) ChunkUnit added in v3.82.3

func (s *Source) ChunkUnit(ctx context.Context, unit sources.SourceUnit, reporter sources.ChunkReporter) error

func (*Source) Chunks

func (s *Source) Chunks(ctx context.Context, chunksChan chan *sources.Chunk, targets ...sources.ChunkingTarget) error

Chunks emits chunks of bytes over a channel.

func (*Source) Enumerate added in v3.82.3

func (s *Source) Enumerate(ctx context.Context, reporter sources.UnitReporter) error

Enumerate enumerates the GitHub source based on authentication method and user configuration. It populates s.filteredRepoCache, s.repoInfoCache, s.memberCache, s.totalRepoSize, s.orgsCache, and s.repos. Additionally, repositories and gists are reported to the provided UnitReporter.

func (*Source) Init

func (s *Source) Init(aCtx context.Context, name string, jobID sources.JobID, sourceID sources.SourceID, verify bool, connection *anypb.Any, concurrency int) error

Init returns an initialized GitHub source.

func (*Source) JobID

func (s *Source) JobID() sources.JobID

func (*Source) SourceID

func (s *Source) SourceID() sources.SourceID

func (*Source) Type

func (s *Source) Type() sourcespb.SourceType

Type returns the type of source. It is used for matching source types in configuration and job input.

func (*Source) Validate added in v3.53.0

func (s *Source) Validate(ctx context.Context) []error

Validate is used by enterprise CLI to validate the GitHub config file.

func (*Source) WithCustomContentWriter added in v3.66.3

func (s *Source) WithCustomContentWriter()

WithCustomContentWriter sets the useCustomContentWriter flag on the source.

func (*Source) WithScanOptions added in v3.28.0

func (s *Source) WithScanOptions(scanOptions *git.ScanOptions)

Jump to

Keyboard shortcuts

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