bundle

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 8 Imported by: 3 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.SnykCodeClient,
	instrumentor observability.Instrumentor,
	errorReporter observability.ErrorReporter,
	logger *zerolog.Logger,
	bundleHash string,
	requestId string,
	rootPath string,
	files map[string]deepcode.BundleFile,
	limitToFiles []string,
	missingFiles []string,
) *deepCodeBundle

func NewBundleManager

func NewBundleManager(
	logger *zerolog.Logger,
	SnykCode deepcode.SnykCodeClient,
	instrumentor observability.Instrumentor,
	errorReporter observability.ErrorReporter,
) *bundleManager

Types

type Batch

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

func NewBatch

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

type Bundle

type Bundle interface {
	UploadBatch(ctx context.Context, batch *Batch) error
	GetBundleHash() string
	GetRootPath() string
	GetRequestId() string
	GetFiles() map[string]deepcode.BundleFile
	GetMissingFiles() []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)

	Upload(
		ctx context.Context,
		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