bundle

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 8 Imported by: 0

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,
	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, requestId string, batch *Batch) error
	GetBundleHash() 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,
		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