utils

package
v1.1303.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package utils provides utilities and is mainly used for delta scanning

Index

Constants

View Source
const (
	ErrSnykCodeNotEnabled = "Snyk Code is not enabled for this organization"
	ErrNoReferenceBranch  = "must specify reference for delta scans"
	ErrNoRepo             = "repository does not exist"
)

Variables

View Source
var ErrorConfig = map[string]ErrorMetadata{
	ErrSnykCodeNotEnabled: {
		ShowNotification: false,
		TreeRootSuffix:   "(disabled at Snyk)",
	},
	ErrNoReferenceBranch: {
		ShowNotification: false,
		TreeRootSuffix:   "(no reference branch)",
	},
	ErrNoRepo: {
		ShowNotification: false,
		TreeRootSuffix:   "(repository not found)",
	},
}

ErrorConfig maps error messages to their metadata

Functions

func CalculateFingerprintFromAdditionalData

func CalculateFingerprintFromAdditionalData(issue types.Issue) string

Types

type ErrorMetadata added in v1.1303.0

type ErrorMetadata struct {
	ShowNotification bool
	TreeRootSuffix   string
}

ErrorMetadata contains metadata about how to handle specific errors

Jump to

Keyboard shortcuts

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