Help us shape the future of Go! Take the 2026 Go Developer Survey

bundle

package
v1.31.9 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNoFilesError

func IsNoFilesError(err error) bool

func NewBundle

func NewBundle(
	snykCode deepcode.DeepcodeClient,
	instrumentor observability.Instrumentor,
	errorReporter observability.ErrorReporter,
	logger *zerolog.Logger,
	rootPath string,
	bundleHash string,
	files map[string]deepcode.BundleFile,
	limitToFiles []string,
	missingFiles []string,
) *deepCodeBundle

func NewBundleManager

func NewBundleManager(
	deepcodeClient deepcode.DeepcodeClient,
	logger *zerolog.Logger,
	instrumentor observability.Instrumentor,
	errorReporter observability.ErrorReporter,
	trackerFactory scan.TrackerFactory,
	analyticsClient analytics.Analytics,
) *bundleManager

Types

type Batch

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

func NewBatch

func NewBatch(documents map[string]deepcode.BundleFile) *Batch

func NewBatchFromRawContent added in v1.22.0

func NewBatchFromRawContent(documents map[string][]byte) (*Batch, error)

type Bundle

type Bundle interface {
	UploadBatch(ctx context.Context, requestId string, batch *Batch) error
	GetBundleHash() string
	GetFiles() map[string]deepcode.BundleFile
	ClearFiles()
	GetMissingFiles() []string
	GetLimitToFiles() []string
	GetRootPath() string
}

type BundleManager

type BundleManager interface {
	Create(ctx context.Context,
		requestId string,
		rootPath string,
		filePaths <-chan string,
		changedFiles map[string]bool,
	) (bundle Bundle, err error)

	// CreateEmpty does not include the file contents in the bundle.
	CreateEmpty(ctx context.Context,
		rootPath string,
		filePaths <-chan string,
		changedFiles map[string]bool,
	) (bundle Bundle, err error)

	Upload(
		ctx context.Context,
		requestId string,
		originalBundle Bundle,
		files map[string]deepcode.BundleFile,
	) (Bundle, error)
}

type NoFilesError

type NoFilesError struct{}

func (NoFilesError) Error

func (e NoFilesError) Error() string

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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