Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsInvalidErr ¶
IsInvalidErr checks if the error is an invalidErr
func Validate ¶
func Validate(wl models2.CVEAllowlist) error
Validate help validates the CVE allowlist, to ensure the CVE ID is valid and there's no duplication
Types ¶
type Manager ¶
type Manager interface { // CreateEmpty creates empty allowlist for given project CreateEmpty(ctx context.Context, projectID int64) error // Set sets the allowlist for given project (create or update) Set(ctx context.Context, projectID int64, list models.CVEAllowlist) error // Get gets the allowlist for given project Get(ctx context.Context, projectID int64) (*models.CVEAllowlist, error) // SetSys sets system level allowlist SetSys(ctx context.Context, list models.CVEAllowlist) error // GetSys gets system level allowlist GetSys(ctx context.Context) (*models.CVEAllowlist, error) }
Manager defines the interface of CVE allowlist manager, it support both system level and project level allowlists
func NewDefaultManager ¶
func NewDefaultManager() Manager
NewDefaultManager return a new instance of defaultManager
Click to show internal directories.
Click to hide internal directories.