vulnerability

package
v0.0.0-...-b0093ec Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WorkloadOrderFieldRiskScore          workload.WorkloadOrderField = "VULNERABILITY_RISK_SCORE"
	WorkloadOrderFieldSeverityCritical   workload.WorkloadOrderField = "VULNERABILITY_SEVERITY_CRITICAL"
	WorkloadOrderFieldSeverityHigh       workload.WorkloadOrderField = "VULNERABILITY_SEVERITY_HIGH"
	WorkloadOrderFieldSeverityMedium     workload.WorkloadOrderField = "VULNERABILITY_SEVERITY_MEDIUM"
	WorkloadOrderFieldSeverityLow        workload.WorkloadOrderField = "VULNERABILITY_SEVERITY_LOW"
	WorkloadOrderFieldSeverityUnassigned workload.WorkloadOrderField = "VULNERABILITY_SEVERITY_UNASSIGNED"
)

Extend WorkloadOrderField

View Source
const (
	PrometheusMetricTeamLabel = "workload_namespace"
)

Variables

Functions

func NewFakeDependencyTrackClient

func NewFakeDependencyTrackClient(c client.Client) client.Client

func NewLoaderContext

func NewLoaderContext(ctx context.Context, dpClient Client, tenantName string, clusters []string, useFake bool, logger logrus.FieldLogger) context.Context

Types

type Client

type Client interface {
	GetMetadataForImage(ctx context.Context, image string) (*ImageDetails, error)
	GetFindingsForImageByProjectID(ctx context.Context, projectID string, suppressed bool) ([]*ImageVulnerability, error)
	GetMetadataForTeam(ctx context.Context, team string) ([]*ImageDetails, error)
	// GetVulnerabilityError(ctx context.Context, image string, revision string) (model.StateError, error)
	UpdateFinding(ctx context.Context, analysisState, comment, componentID, projectID, vulnerabilityID, suppressedBy string, suppress bool) error
	GetAnalysisTrailForImage(ctx context.Context, projectID, componentID, vulnerabilityID string) (*ImageVulnerabilityAnalysisTrail, error)
}

func NewDependencyTrackClient

func NewDependencyTrackClient(cfg DependencyTrackConfig, log logrus.FieldLogger, opts ...DependencyTrackOption) Client

type ContainerImageWorkloadReference

type ContainerImageWorkloadReference struct {
	Reference       *workload.Reference `json:"-"`
	TeamSlug        slug.Slug           `json:"-"`
	EnvironmentName string              `json:"-"`
}

type ContainerImageWorkloadReferenceEdge

type ContainerImageWorkloadReferenceEdge = pagination.Edge[*ContainerImageWorkloadReference]

type DependencyTrackConfig

type DependencyTrackConfig struct {
	Endpoint, Username, Password, FrontendURL string
	EnableFakes                               bool
}

type DependencyTrackOption

type DependencyTrackOption func(*dependencyTrackClient)

type FakePrometheusClient

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

func (FakePrometheusClient) Query

type ImageDetails

type ImageDetails struct {
	ProjectID          string                     `json:"projectId"`
	Name               string                     `json:"name"`
	Version            string                     `json:"version"`
	Summary            *ImageVulnerabilitySummary `json:"summary"`
	HasSBOM            bool                       `json:"hasSbom"`
	ProjectURL         string                     `json:"projectUrl"`
	WorkloadReferences []*WorkloadReference       `json:"-"`
}

func GetImageMetadata

func GetImageMetadata(ctx context.Context, imageRef string) (*ImageDetails, error)

func GetTeamMetadata

func GetTeamMetadata(ctx context.Context, teamSlug slug.Slug) ([]*ImageDetails, error)

type ImageVulnerability

type ImageVulnerability struct {
	Identifier  string                     `json:"identifier"`
	Severity    ImageVulnerabilitySeverity `json:"severity"`
	Description string                     `json:"description"`
	Package     string                     `json:"package"`
	State       ImageVulnerabilityState    `json:"state"`
	// contains filtered or unexported fields
}

func (*ImageVulnerability) ID

func (i *ImageVulnerability) ID() ident.Ident

func (ImageVulnerability) IsNode

func (ImageVulnerability) IsNode()

type ImageVulnerabilityAnalysisComment

type ImageVulnerabilityAnalysisComment struct {
	Comment    string                          `json:"comment"`
	State      ImageVulnerabilityAnalysisState `json:"state"`
	Suppressed bool                            `json:"suppressed"`
	Timestamp  time.Time                       `json:"timestamp"`
	OnBehalfOf string                          `json:"onBehalfOf"`
}

type ImageVulnerabilityAnalysisCommentEdge

type ImageVulnerabilityAnalysisCommentEdge = pagination.Edge[*ImageVulnerabilityAnalysisComment]

type ImageVulnerabilityAnalysisState

type ImageVulnerabilityAnalysisState string
const (
	// Vulnerability is triaged.
	ImageVulnerabilityAnalysisStateInTriage ImageVulnerabilityAnalysisState = "IN_TRIAGE"
	// Vulnerability is resolved.
	ImageVulnerabilityAnalysisStateResolved ImageVulnerabilityAnalysisState = "RESOLVED"
	// Vulnerability is marked as false positive.
	ImageVulnerabilityAnalysisStateFalsePositive ImageVulnerabilityAnalysisState = "FALSE_POSITIVE"
	// Vulnerability is marked as not affected.
	ImageVulnerabilityAnalysisStateNotAffected ImageVulnerabilityAnalysisState = "NOT_AFFECTED"
)

func (ImageVulnerabilityAnalysisState) IsValid

func (ImageVulnerabilityAnalysisState) MarshalGQL

func (e ImageVulnerabilityAnalysisState) MarshalGQL(w io.Writer)

func (ImageVulnerabilityAnalysisState) String

func (*ImageVulnerabilityAnalysisState) UnmarshalGQL

func (e *ImageVulnerabilityAnalysisState) UnmarshalGQL(v interface{}) error

type ImageVulnerabilityAnalysisTrail

type ImageVulnerabilityAnalysisTrail struct {
	State      ImageVulnerabilityAnalysisState `json:"state"`
	Suppressed bool                            `json:"suppressed"`

	AllComments []*ImageVulnerabilityAnalysisComment `json:"-"`
}

type ImageVulnerabilityEdge

type ImageVulnerabilityEdge = pagination.Edge[*ImageVulnerability]

type ImageVulnerabilityOrder

type ImageVulnerabilityOrder struct {
	Field     ImageVulnerabilityOrderField `json:"field"`
	Direction model.OrderDirection         `json:"direction"`
}

type ImageVulnerabilityOrderField

type ImageVulnerabilityOrderField string
const (
	// Order by the field
	ImageVulnerabilityOrderFieldIdentifier ImageVulnerabilityOrderField = "IDENTIFIER"
	ImageVulnerabilityOrderFieldSeverity   ImageVulnerabilityOrderField = "SEVERITY"
	ImageVulnerabilityOrderFieldPackage    ImageVulnerabilityOrderField = "PACKAGE"
	ImageVulnerabilityOrderFieldState      ImageVulnerabilityOrderField = "STATE"
	ImageVulnerabilityOrderFieldSuppressed ImageVulnerabilityOrderField = "SUPPRESSED"
)

func (ImageVulnerabilityOrderField) IsValid

func (e ImageVulnerabilityOrderField) IsValid() bool

func (ImageVulnerabilityOrderField) MarshalGQL

func (e ImageVulnerabilityOrderField) MarshalGQL(w io.Writer)

func (ImageVulnerabilityOrderField) String

func (*ImageVulnerabilityOrderField) UnmarshalGQL

func (e *ImageVulnerabilityOrderField) UnmarshalGQL(v interface{}) error

type ImageVulnerabilitySeverity

type ImageVulnerabilitySeverity string
const (
	ImageVulnerabilitySeverityLow        ImageVulnerabilitySeverity = "LOW"
	ImageVulnerabilitySeverityMedium     ImageVulnerabilitySeverity = "MEDIUM"
	ImageVulnerabilitySeverityHigh       ImageVulnerabilitySeverity = "HIGH"
	ImageVulnerabilitySeverityCritical   ImageVulnerabilitySeverity = "CRITICAL"
	ImageVulnerabilitySeverityUnassigned ImageVulnerabilitySeverity = "UNASSIGNED"
)

func (ImageVulnerabilitySeverity) IsValid

func (e ImageVulnerabilitySeverity) IsValid() bool

func (ImageVulnerabilitySeverity) MarshalGQL

func (e ImageVulnerabilitySeverity) MarshalGQL(w io.Writer)

func (ImageVulnerabilitySeverity) String

func (*ImageVulnerabilitySeverity) UnmarshalGQL

func (e *ImageVulnerabilitySeverity) UnmarshalGQL(v interface{}) error

type ImageVulnerabilityState

type ImageVulnerabilityState string
const (
	ImageVulnerabilityStateTriage        ImageVulnerabilityState = "TRIAGE"
	ImageVulnerabilityStateResolved      ImageVulnerabilityState = "RESOLVED"
	ImageVulnerabilityStateFalsePositive ImageVulnerabilityState = "FALSE_POSITIVE"
	ImageVulnerabilityStateNotAffected   ImageVulnerabilityState = "NOT_AFFECTED"
)

func (ImageVulnerabilityState) IsValid

func (e ImageVulnerabilityState) IsValid() bool

func (ImageVulnerabilityState) MarshalGQL

func (e ImageVulnerabilityState) MarshalGQL(w io.Writer)

func (ImageVulnerabilityState) String

func (e ImageVulnerabilityState) String() string

func (*ImageVulnerabilityState) UnmarshalGQL

func (e *ImageVulnerabilityState) UnmarshalGQL(v interface{}) error

type ImageVulnerabilitySummary

type ImageVulnerabilitySummary struct {
	Total      int `json:"total"`
	RiskScore  int `json:"riskScore"`
	Low        int `json:"low"`
	Medium     int `json:"medium"`
	High       int `json:"high"`
	Critical   int `json:"critical"`
	Unassigned int `json:"unassigned"`
}

type InternalClient

type InternalClient interface {
	client.Client
}

type MockInternalClient

type MockInternalClient struct {
	mock.Mock
}

MockInternalClient is an autogenerated mock type for the InternalClient type

func NewMockInternalClient

func NewMockInternalClient(t interface {
	mock.TestingT
	Cleanup(func())
},
) *MockInternalClient

NewMockInternalClient creates a new instance of MockInternalClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockInternalClient) AddToTeam

func (_m *MockInternalClient) AddToTeam(ctx context.Context, username string, uuid string) error

AddToTeam provides a mock function with given fields: ctx, username, uuid

func (*MockInternalClient) ChangeAdminPassword

func (_m *MockInternalClient) ChangeAdminPassword(ctx context.Context, oldPassword string, newPassword string) error

ChangeAdminPassword provides a mock function with given fields: ctx, oldPassword, newPassword

func (*MockInternalClient) ConfigPropertyAggregate

func (_m *MockInternalClient) ConfigPropertyAggregate(ctx context.Context, properties []client.ConfigProperty) ([]client.ConfigProperty, error)

ConfigPropertyAggregate provides a mock function with given fields: ctx, properties

func (*MockInternalClient) CreateAdminUsers

func (_m *MockInternalClient) CreateAdminUsers(ctx context.Context, users *client.AdminUsers, teamUuid string) error

CreateAdminUsers provides a mock function with given fields: ctx, users, teamUuid

func (*MockInternalClient) CreateChildProject

func (_m *MockInternalClient) CreateChildProject(ctx context.Context, project *client.Project, name string, version string, group string, classifier string, tags []string) (*client.Project, error)

CreateChildProject provides a mock function with given fields: ctx, project, name, version, group, classifier, tags

func (*MockInternalClient) CreateManagedUser

func (_m *MockInternalClient) CreateManagedUser(ctx context.Context, username string, password string) error

CreateManagedUser provides a mock function with given fields: ctx, username, password

func (*MockInternalClient) CreateOidcUser

func (_m *MockInternalClient) CreateOidcUser(ctx context.Context, email string) error

CreateOidcUser provides a mock function with given fields: ctx, email

func (*MockInternalClient) CreateProject

func (_m *MockInternalClient) CreateProject(ctx context.Context, name string, version string, group string, tags []string) (*client.Project, error)

CreateProject provides a mock function with given fields: ctx, name, version, group, tags

func (*MockInternalClient) CreateTeam

func (_m *MockInternalClient) CreateTeam(ctx context.Context, teamName string, permissions []client.Permission) (*client.Team, error)

CreateTeam provides a mock function with given fields: ctx, teamName, permissions

func (*MockInternalClient) DeleteManagedUser

func (_m *MockInternalClient) DeleteManagedUser(ctx context.Context, username string) error

DeleteManagedUser provides a mock function with given fields: ctx, username

func (*MockInternalClient) DeleteOidcUser

func (_m *MockInternalClient) DeleteOidcUser(ctx context.Context, username string) error

DeleteOidcUser provides a mock function with given fields: ctx, username

func (*MockInternalClient) DeleteProject

func (_m *MockInternalClient) DeleteProject(ctx context.Context, uuid string) error

DeleteProject provides a mock function with given fields: ctx, uuid

func (*MockInternalClient) DeleteProjects

func (_m *MockInternalClient) DeleteProjects(ctx context.Context, name string) error

DeleteProjects provides a mock function with given fields: ctx, name

func (*MockInternalClient) DeleteTeam

func (_m *MockInternalClient) DeleteTeam(ctx context.Context, uuid string) error

DeleteTeam provides a mock function with given fields: ctx, uuid

func (*MockInternalClient) DeleteUserMembership

func (_m *MockInternalClient) DeleteUserMembership(ctx context.Context, uuid string, username string) error

DeleteUserMembership provides a mock function with given fields: ctx, uuid, username

func (*MockInternalClient) EXPECT

func (*MockInternalClient) GenerateApiKey

func (_m *MockInternalClient) GenerateApiKey(ctx context.Context, uuid string) (string, error)

GenerateApiKey provides a mock function with given fields: ctx, uuid

func (*MockInternalClient) GetAnalysisTrail

func (_m *MockInternalClient) GetAnalysisTrail(ctx context.Context, projectUuid string, componentUuid string, vulnerabilityUuid string) (*client.Analysis, error)

GetAnalysisTrail provides a mock function with given fields: ctx, projectUuid, componentUuid, vulnerabilityUuid

func (*MockInternalClient) GetConfigProperties

func (_m *MockInternalClient) GetConfigProperties(ctx context.Context) ([]client.ConfigProperty, error)

GetConfigProperties provides a mock function with given fields: ctx

func (*MockInternalClient) GetCurrentProjectMetric

func (_m *MockInternalClient) GetCurrentProjectMetric(ctx context.Context, projectUuid string) (*client.ProjectMetric, error)

GetCurrentProjectMetric provides a mock function with given fields: ctx, projectUuid

func (*MockInternalClient) GetEcosystems

func (_m *MockInternalClient) GetEcosystems(ctx context.Context) ([]string, error)

GetEcosystems provides a mock function with given fields: ctx

func (*MockInternalClient) GetFindings

func (_m *MockInternalClient) GetFindings(ctx context.Context, projectUuid string, suppressed bool) ([]*client.Finding, error)

GetFindings provides a mock function with given fields: ctx, projectUuid, suppressed

func (*MockInternalClient) GetOidcUsers

func (_m *MockInternalClient) GetOidcUsers(ctx context.Context) ([]client.User, error)

GetOidcUsers provides a mock function with given fields: ctx

func (*MockInternalClient) GetProject

func (_m *MockInternalClient) GetProject(ctx context.Context, name string, version string) (*client.Project, error)

GetProject provides a mock function with given fields: ctx, name, version

func (*MockInternalClient) GetProjectById

func (_m *MockInternalClient) GetProjectById(ctx context.Context, uuid string) (*client.Project, error)

GetProjectById provides a mock function with given fields: ctx, uuid

func (*MockInternalClient) GetProjectMetricsByDate

func (_m *MockInternalClient) GetProjectMetricsByDate(ctx context.Context, projectUuid string, date string) ([]*client.ProjectMetric, error)

GetProjectMetricsByDate provides a mock function with given fields: ctx, projectUuid, date

func (*MockInternalClient) GetProjects

func (_m *MockInternalClient) GetProjects(ctx context.Context) ([]*client.Project, error)

GetProjects provides a mock function with given fields: ctx

func (*MockInternalClient) GetProjectsByPrefixedTag

func (_m *MockInternalClient) GetProjectsByPrefixedTag(ctx context.Context, prefix client.TagPrefix, tag string) ([]*client.Project, error)

GetProjectsByPrefixedTag provides a mock function with given fields: ctx, prefix, tag

func (*MockInternalClient) GetProjectsByTag

func (_m *MockInternalClient) GetProjectsByTag(ctx context.Context, tag string) ([]*client.Project, error)

GetProjectsByTag provides a mock function with given fields: ctx, tag

func (*MockInternalClient) GetTeam

func (_m *MockInternalClient) GetTeam(ctx context.Context, team string) (*client.Team, error)

GetTeam provides a mock function with given fields: ctx, team

func (*MockInternalClient) GetTeams

func (_m *MockInternalClient) GetTeams(ctx context.Context) ([]client.Team, error)

GetTeams provides a mock function with given fields: ctx

func (*MockInternalClient) Headers

func (_m *MockInternalClient) Headers(ctx context.Context) (http.Header, error)

Headers provides a mock function with given fields: ctx

func (*MockInternalClient) PortfolioRefresh

func (_m *MockInternalClient) PortfolioRefresh(ctx context.Context) error

PortfolioRefresh provides a mock function with given fields: ctx

func (*MockInternalClient) RecordAnalysis

func (_m *MockInternalClient) RecordAnalysis(ctx context.Context, analysis *client.AnalysisRequest) error

RecordAnalysis provides a mock function with given fields: ctx, analysis

func (*MockInternalClient) RemoveAdminUsers

func (_m *MockInternalClient) RemoveAdminUsers(ctx context.Context, users *client.AdminUsers) error

RemoveAdminUsers provides a mock function with given fields: ctx, users

func (*MockInternalClient) TriggerAnalysis

func (_m *MockInternalClient) TriggerAnalysis(ctx context.Context, projectUuid string) error

TriggerAnalysis provides a mock function with given fields: ctx, projectUuid

func (*MockInternalClient) UpdateProject

func (_m *MockInternalClient) UpdateProject(ctx context.Context, uuid string, name string, version string, group string, tags []string) (*client.Project, error)

UpdateProject provides a mock function with given fields: ctx, uuid, name, version, group, tags

func (*MockInternalClient) UpdateProjectInfo

func (_m *MockInternalClient) UpdateProjectInfo(ctx context.Context, uuid string, version string, group string, tags []string) error

UpdateProjectInfo provides a mock function with given fields: ctx, uuid, version, group, tags

func (*MockInternalClient) UploadProject

func (_m *MockInternalClient) UploadProject(ctx context.Context, name string, version string, parentUuid string, autoCreate bool, bom []byte) error

UploadProject provides a mock function with given fields: ctx, name, version, parentUuid, autoCreate, bom

func (*MockInternalClient) Version

func (_m *MockInternalClient) Version(ctx context.Context) (string, error)

Version provides a mock function with given fields: ctx

type MockInternalClient_AddToTeam_Call

type MockInternalClient_AddToTeam_Call struct {
	*mock.Call
}

MockInternalClient_AddToTeam_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddToTeam'

func (*MockInternalClient_AddToTeam_Call) Return

func (*MockInternalClient_AddToTeam_Call) Run

func (*MockInternalClient_AddToTeam_Call) RunAndReturn

type MockInternalClient_ChangeAdminPassword_Call

type MockInternalClient_ChangeAdminPassword_Call struct {
	*mock.Call
}

MockInternalClient_ChangeAdminPassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChangeAdminPassword'

func (*MockInternalClient_ChangeAdminPassword_Call) Return

func (*MockInternalClient_ChangeAdminPassword_Call) Run

func (*MockInternalClient_ChangeAdminPassword_Call) RunAndReturn

type MockInternalClient_ConfigPropertyAggregate_Call

type MockInternalClient_ConfigPropertyAggregate_Call struct {
	*mock.Call
}

MockInternalClient_ConfigPropertyAggregate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConfigPropertyAggregate'

func (*MockInternalClient_ConfigPropertyAggregate_Call) Return

func (*MockInternalClient_ConfigPropertyAggregate_Call) Run

func (*MockInternalClient_ConfigPropertyAggregate_Call) RunAndReturn

type MockInternalClient_CreateAdminUsers_Call

type MockInternalClient_CreateAdminUsers_Call struct {
	*mock.Call
}

MockInternalClient_CreateAdminUsers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAdminUsers'

func (*MockInternalClient_CreateAdminUsers_Call) Return

func (*MockInternalClient_CreateAdminUsers_Call) Run

func (*MockInternalClient_CreateAdminUsers_Call) RunAndReturn

type MockInternalClient_CreateChildProject_Call

type MockInternalClient_CreateChildProject_Call struct {
	*mock.Call
}

MockInternalClient_CreateChildProject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateChildProject'

func (*MockInternalClient_CreateChildProject_Call) Return

func (*MockInternalClient_CreateChildProject_Call) Run

func (_c *MockInternalClient_CreateChildProject_Call) Run(run func(ctx context.Context, project *client.Project, name string, version string, group string, classifier string, tags []string)) *MockInternalClient_CreateChildProject_Call

func (*MockInternalClient_CreateChildProject_Call) RunAndReturn

type MockInternalClient_CreateManagedUser_Call

type MockInternalClient_CreateManagedUser_Call struct {
	*mock.Call
}

MockInternalClient_CreateManagedUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateManagedUser'

func (*MockInternalClient_CreateManagedUser_Call) Return

func (*MockInternalClient_CreateManagedUser_Call) Run

func (*MockInternalClient_CreateManagedUser_Call) RunAndReturn

type MockInternalClient_CreateOidcUser_Call

type MockInternalClient_CreateOidcUser_Call struct {
	*mock.Call
}

MockInternalClient_CreateOidcUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateOidcUser'

func (*MockInternalClient_CreateOidcUser_Call) Return

func (*MockInternalClient_CreateOidcUser_Call) Run

func (*MockInternalClient_CreateOidcUser_Call) RunAndReturn

type MockInternalClient_CreateProject_Call

type MockInternalClient_CreateProject_Call struct {
	*mock.Call
}

MockInternalClient_CreateProject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateProject'

func (*MockInternalClient_CreateProject_Call) Return

func (*MockInternalClient_CreateProject_Call) Run

func (*MockInternalClient_CreateProject_Call) RunAndReturn

type MockInternalClient_CreateTeam_Call

type MockInternalClient_CreateTeam_Call struct {
	*mock.Call
}

MockInternalClient_CreateTeam_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTeam'

func (*MockInternalClient_CreateTeam_Call) Return

func (*MockInternalClient_CreateTeam_Call) Run

func (*MockInternalClient_CreateTeam_Call) RunAndReturn

type MockInternalClient_DeleteManagedUser_Call

type MockInternalClient_DeleteManagedUser_Call struct {
	*mock.Call
}

MockInternalClient_DeleteManagedUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteManagedUser'

func (*MockInternalClient_DeleteManagedUser_Call) Return

func (*MockInternalClient_DeleteManagedUser_Call) Run

func (*MockInternalClient_DeleteManagedUser_Call) RunAndReturn

type MockInternalClient_DeleteOidcUser_Call

type MockInternalClient_DeleteOidcUser_Call struct {
	*mock.Call
}

MockInternalClient_DeleteOidcUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteOidcUser'

func (*MockInternalClient_DeleteOidcUser_Call) Return

func (*MockInternalClient_DeleteOidcUser_Call) Run

func (*MockInternalClient_DeleteOidcUser_Call) RunAndReturn

type MockInternalClient_DeleteProject_Call

type MockInternalClient_DeleteProject_Call struct {
	*mock.Call
}

MockInternalClient_DeleteProject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteProject'

func (*MockInternalClient_DeleteProject_Call) Return

func (*MockInternalClient_DeleteProject_Call) Run

func (*MockInternalClient_DeleteProject_Call) RunAndReturn

type MockInternalClient_DeleteProjects_Call

type MockInternalClient_DeleteProjects_Call struct {
	*mock.Call
}

MockInternalClient_DeleteProjects_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteProjects'

func (*MockInternalClient_DeleteProjects_Call) Return

func (*MockInternalClient_DeleteProjects_Call) Run

func (*MockInternalClient_DeleteProjects_Call) RunAndReturn

type MockInternalClient_DeleteTeam_Call

type MockInternalClient_DeleteTeam_Call struct {
	*mock.Call
}

MockInternalClient_DeleteTeam_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteTeam'

func (*MockInternalClient_DeleteTeam_Call) Return

func (*MockInternalClient_DeleteTeam_Call) Run

func (*MockInternalClient_DeleteTeam_Call) RunAndReturn

type MockInternalClient_DeleteUserMembership_Call

type MockInternalClient_DeleteUserMembership_Call struct {
	*mock.Call
}

MockInternalClient_DeleteUserMembership_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteUserMembership'

func (*MockInternalClient_DeleteUserMembership_Call) Return

func (*MockInternalClient_DeleteUserMembership_Call) Run

func (*MockInternalClient_DeleteUserMembership_Call) RunAndReturn

type MockInternalClient_Expecter

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

func (*MockInternalClient_Expecter) AddToTeam

func (_e *MockInternalClient_Expecter) AddToTeam(ctx interface{}, username interface{}, uuid interface{}) *MockInternalClient_AddToTeam_Call

AddToTeam is a helper method to define mock.On call

  • ctx context.Context
  • username string
  • uuid string

func (*MockInternalClient_Expecter) ChangeAdminPassword

func (_e *MockInternalClient_Expecter) ChangeAdminPassword(ctx interface{}, oldPassword interface{}, newPassword interface{}) *MockInternalClient_ChangeAdminPassword_Call

ChangeAdminPassword is a helper method to define mock.On call

  • ctx context.Context
  • oldPassword string
  • newPassword string

func (*MockInternalClient_Expecter) ConfigPropertyAggregate

func (_e *MockInternalClient_Expecter) ConfigPropertyAggregate(ctx interface{}, properties interface{}) *MockInternalClient_ConfigPropertyAggregate_Call

ConfigPropertyAggregate is a helper method to define mock.On call

  • ctx context.Context
  • properties []client.ConfigProperty

func (*MockInternalClient_Expecter) CreateAdminUsers

func (_e *MockInternalClient_Expecter) CreateAdminUsers(ctx interface{}, users interface{}, teamUuid interface{}) *MockInternalClient_CreateAdminUsers_Call

CreateAdminUsers is a helper method to define mock.On call

  • ctx context.Context
  • users *client.AdminUsers
  • teamUuid string

func (*MockInternalClient_Expecter) CreateChildProject

func (_e *MockInternalClient_Expecter) CreateChildProject(ctx interface{}, project interface{}, name interface{}, version interface{}, group interface{}, classifier interface{}, tags interface{}) *MockInternalClient_CreateChildProject_Call

CreateChildProject is a helper method to define mock.On call

  • ctx context.Context
  • project *client.Project
  • name string
  • version string
  • group string
  • classifier string
  • tags []string

func (*MockInternalClient_Expecter) CreateManagedUser

func (_e *MockInternalClient_Expecter) CreateManagedUser(ctx interface{}, username interface{}, password interface{}) *MockInternalClient_CreateManagedUser_Call

CreateManagedUser is a helper method to define mock.On call

  • ctx context.Context
  • username string
  • password string

func (*MockInternalClient_Expecter) CreateOidcUser

func (_e *MockInternalClient_Expecter) CreateOidcUser(ctx interface{}, email interface{}) *MockInternalClient_CreateOidcUser_Call

CreateOidcUser is a helper method to define mock.On call

  • ctx context.Context
  • email string

func (*MockInternalClient_Expecter) CreateProject

func (_e *MockInternalClient_Expecter) CreateProject(ctx interface{}, name interface{}, version interface{}, group interface{}, tags interface{}) *MockInternalClient_CreateProject_Call

CreateProject is a helper method to define mock.On call

  • ctx context.Context
  • name string
  • version string
  • group string
  • tags []string

func (*MockInternalClient_Expecter) CreateTeam

func (_e *MockInternalClient_Expecter) CreateTeam(ctx interface{}, teamName interface{}, permissions interface{}) *MockInternalClient_CreateTeam_Call

CreateTeam is a helper method to define mock.On call

  • ctx context.Context
  • teamName string
  • permissions []client.Permission

func (*MockInternalClient_Expecter) DeleteManagedUser

func (_e *MockInternalClient_Expecter) DeleteManagedUser(ctx interface{}, username interface{}) *MockInternalClient_DeleteManagedUser_Call

DeleteManagedUser is a helper method to define mock.On call

  • ctx context.Context
  • username string

func (*MockInternalClient_Expecter) DeleteOidcUser

func (_e *MockInternalClient_Expecter) DeleteOidcUser(ctx interface{}, username interface{}) *MockInternalClient_DeleteOidcUser_Call

DeleteOidcUser is a helper method to define mock.On call

  • ctx context.Context
  • username string

func (*MockInternalClient_Expecter) DeleteProject

func (_e *MockInternalClient_Expecter) DeleteProject(ctx interface{}, uuid interface{}) *MockInternalClient_DeleteProject_Call

DeleteProject is a helper method to define mock.On call

  • ctx context.Context
  • uuid string

func (*MockInternalClient_Expecter) DeleteProjects

func (_e *MockInternalClient_Expecter) DeleteProjects(ctx interface{}, name interface{}) *MockInternalClient_DeleteProjects_Call

DeleteProjects is a helper method to define mock.On call

  • ctx context.Context
  • name string

func (*MockInternalClient_Expecter) DeleteTeam

func (_e *MockInternalClient_Expecter) DeleteTeam(ctx interface{}, uuid interface{}) *MockInternalClient_DeleteTeam_Call

DeleteTeam is a helper method to define mock.On call

  • ctx context.Context
  • uuid string

func (*MockInternalClient_Expecter) DeleteUserMembership

func (_e *MockInternalClient_Expecter) DeleteUserMembership(ctx interface{}, uuid interface{}, username interface{}) *MockInternalClient_DeleteUserMembership_Call

DeleteUserMembership is a helper method to define mock.On call

  • ctx context.Context
  • uuid string
  • username string

func (*MockInternalClient_Expecter) GenerateApiKey

func (_e *MockInternalClient_Expecter) GenerateApiKey(ctx interface{}, uuid interface{}) *MockInternalClient_GenerateApiKey_Call

GenerateApiKey is a helper method to define mock.On call

  • ctx context.Context
  • uuid string

func (*MockInternalClient_Expecter) GetAnalysisTrail

func (_e *MockInternalClient_Expecter) GetAnalysisTrail(ctx interface{}, projectUuid interface{}, componentUuid interface{}, vulnerabilityUuid interface{}) *MockInternalClient_GetAnalysisTrail_Call

GetAnalysisTrail is a helper method to define mock.On call

  • ctx context.Context
  • projectUuid string
  • componentUuid string
  • vulnerabilityUuid string

func (*MockInternalClient_Expecter) GetConfigProperties

func (_e *MockInternalClient_Expecter) GetConfigProperties(ctx interface{}) *MockInternalClient_GetConfigProperties_Call

GetConfigProperties is a helper method to define mock.On call

  • ctx context.Context

func (*MockInternalClient_Expecter) GetCurrentProjectMetric

func (_e *MockInternalClient_Expecter) GetCurrentProjectMetric(ctx interface{}, projectUuid interface{}) *MockInternalClient_GetCurrentProjectMetric_Call

GetCurrentProjectMetric is a helper method to define mock.On call

  • ctx context.Context
  • projectUuid string

func (*MockInternalClient_Expecter) GetEcosystems

func (_e *MockInternalClient_Expecter) GetEcosystems(ctx interface{}) *MockInternalClient_GetEcosystems_Call

GetEcosystems is a helper method to define mock.On call

  • ctx context.Context

func (*MockInternalClient_Expecter) GetFindings

func (_e *MockInternalClient_Expecter) GetFindings(ctx interface{}, projectUuid interface{}, suppressed interface{}) *MockInternalClient_GetFindings_Call

GetFindings is a helper method to define mock.On call

  • ctx context.Context
  • projectUuid string
  • suppressed bool

func (*MockInternalClient_Expecter) GetOidcUsers

func (_e *MockInternalClient_Expecter) GetOidcUsers(ctx interface{}) *MockInternalClient_GetOidcUsers_Call

GetOidcUsers is a helper method to define mock.On call

  • ctx context.Context

func (*MockInternalClient_Expecter) GetProject

func (_e *MockInternalClient_Expecter) GetProject(ctx interface{}, name interface{}, version interface{}) *MockInternalClient_GetProject_Call

GetProject is a helper method to define mock.On call

  • ctx context.Context
  • name string
  • version string

func (*MockInternalClient_Expecter) GetProjectById

func (_e *MockInternalClient_Expecter) GetProjectById(ctx interface{}, uuid interface{}) *MockInternalClient_GetProjectById_Call

GetProjectById is a helper method to define mock.On call

  • ctx context.Context
  • uuid string

func (*MockInternalClient_Expecter) GetProjectMetricsByDate

func (_e *MockInternalClient_Expecter) GetProjectMetricsByDate(ctx interface{}, projectUuid interface{}, date interface{}) *MockInternalClient_GetProjectMetricsByDate_Call

GetProjectMetricsByDate is a helper method to define mock.On call

  • ctx context.Context
  • projectUuid string
  • date string

func (*MockInternalClient_Expecter) GetProjects

func (_e *MockInternalClient_Expecter) GetProjects(ctx interface{}) *MockInternalClient_GetProjects_Call

GetProjects is a helper method to define mock.On call

  • ctx context.Context

func (*MockInternalClient_Expecter) GetProjectsByPrefixedTag

func (_e *MockInternalClient_Expecter) GetProjectsByPrefixedTag(ctx interface{}, prefix interface{}, tag interface{}) *MockInternalClient_GetProjectsByPrefixedTag_Call

GetProjectsByPrefixedTag is a helper method to define mock.On call

  • ctx context.Context
  • prefix client.TagPrefix
  • tag string

func (*MockInternalClient_Expecter) GetProjectsByTag

func (_e *MockInternalClient_Expecter) GetProjectsByTag(ctx interface{}, tag interface{}) *MockInternalClient_GetProjectsByTag_Call

GetProjectsByTag is a helper method to define mock.On call

  • ctx context.Context
  • tag string

func (*MockInternalClient_Expecter) GetTeam

func (_e *MockInternalClient_Expecter) GetTeam(ctx interface{}, team interface{}) *MockInternalClient_GetTeam_Call

GetTeam is a helper method to define mock.On call

  • ctx context.Context
  • team string

func (*MockInternalClient_Expecter) GetTeams

func (_e *MockInternalClient_Expecter) GetTeams(ctx interface{}) *MockInternalClient_GetTeams_Call

GetTeams is a helper method to define mock.On call

  • ctx context.Context

func (*MockInternalClient_Expecter) Headers

func (_e *MockInternalClient_Expecter) Headers(ctx interface{}) *MockInternalClient_Headers_Call

Headers is a helper method to define mock.On call

  • ctx context.Context

func (*MockInternalClient_Expecter) PortfolioRefresh

func (_e *MockInternalClient_Expecter) PortfolioRefresh(ctx interface{}) *MockInternalClient_PortfolioRefresh_Call

PortfolioRefresh is a helper method to define mock.On call

  • ctx context.Context

func (*MockInternalClient_Expecter) RecordAnalysis

func (_e *MockInternalClient_Expecter) RecordAnalysis(ctx interface{}, analysis interface{}) *MockInternalClient_RecordAnalysis_Call

RecordAnalysis is a helper method to define mock.On call

  • ctx context.Context
  • analysis *client.AnalysisRequest

func (*MockInternalClient_Expecter) RemoveAdminUsers

func (_e *MockInternalClient_Expecter) RemoveAdminUsers(ctx interface{}, users interface{}) *MockInternalClient_RemoveAdminUsers_Call

RemoveAdminUsers is a helper method to define mock.On call

  • ctx context.Context
  • users *client.AdminUsers

func (*MockInternalClient_Expecter) TriggerAnalysis

func (_e *MockInternalClient_Expecter) TriggerAnalysis(ctx interface{}, projectUuid interface{}) *MockInternalClient_TriggerAnalysis_Call

TriggerAnalysis is a helper method to define mock.On call

  • ctx context.Context
  • projectUuid string

func (*MockInternalClient_Expecter) UpdateProject

func (_e *MockInternalClient_Expecter) UpdateProject(ctx interface{}, uuid interface{}, name interface{}, version interface{}, group interface{}, tags interface{}) *MockInternalClient_UpdateProject_Call

UpdateProject is a helper method to define mock.On call

  • ctx context.Context
  • uuid string
  • name string
  • version string
  • group string
  • tags []string

func (*MockInternalClient_Expecter) UpdateProjectInfo

func (_e *MockInternalClient_Expecter) UpdateProjectInfo(ctx interface{}, uuid interface{}, version interface{}, group interface{}, tags interface{}) *MockInternalClient_UpdateProjectInfo_Call

UpdateProjectInfo is a helper method to define mock.On call

  • ctx context.Context
  • uuid string
  • version string
  • group string
  • tags []string

func (*MockInternalClient_Expecter) UploadProject

func (_e *MockInternalClient_Expecter) UploadProject(ctx interface{}, name interface{}, version interface{}, parentUuid interface{}, autoCreate interface{}, bom interface{}) *MockInternalClient_UploadProject_Call

UploadProject is a helper method to define mock.On call

  • ctx context.Context
  • name string
  • version string
  • parentUuid string
  • autoCreate bool
  • bom []byte

func (*MockInternalClient_Expecter) Version

func (_e *MockInternalClient_Expecter) Version(ctx interface{}) *MockInternalClient_Version_Call

Version is a helper method to define mock.On call

  • ctx context.Context

type MockInternalClient_GenerateApiKey_Call

type MockInternalClient_GenerateApiKey_Call struct {
	*mock.Call
}

MockInternalClient_GenerateApiKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenerateApiKey'

func (*MockInternalClient_GenerateApiKey_Call) Return

func (*MockInternalClient_GenerateApiKey_Call) Run

func (*MockInternalClient_GenerateApiKey_Call) RunAndReturn

type MockInternalClient_GetAnalysisTrail_Call

type MockInternalClient_GetAnalysisTrail_Call struct {
	*mock.Call
}

MockInternalClient_GetAnalysisTrail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAnalysisTrail'

func (*MockInternalClient_GetAnalysisTrail_Call) Return

func (*MockInternalClient_GetAnalysisTrail_Call) Run

func (_c *MockInternalClient_GetAnalysisTrail_Call) Run(run func(ctx context.Context, projectUuid string, componentUuid string, vulnerabilityUuid string)) *MockInternalClient_GetAnalysisTrail_Call

func (*MockInternalClient_GetAnalysisTrail_Call) RunAndReturn

type MockInternalClient_GetConfigProperties_Call

type MockInternalClient_GetConfigProperties_Call struct {
	*mock.Call
}

MockInternalClient_GetConfigProperties_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConfigProperties'

func (*MockInternalClient_GetConfigProperties_Call) Return

func (*MockInternalClient_GetConfigProperties_Call) Run

func (*MockInternalClient_GetConfigProperties_Call) RunAndReturn

type MockInternalClient_GetCurrentProjectMetric_Call

type MockInternalClient_GetCurrentProjectMetric_Call struct {
	*mock.Call
}

MockInternalClient_GetCurrentProjectMetric_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCurrentProjectMetric'

func (*MockInternalClient_GetCurrentProjectMetric_Call) Return

func (*MockInternalClient_GetCurrentProjectMetric_Call) Run

func (*MockInternalClient_GetCurrentProjectMetric_Call) RunAndReturn

type MockInternalClient_GetEcosystems_Call

type MockInternalClient_GetEcosystems_Call struct {
	*mock.Call
}

MockInternalClient_GetEcosystems_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEcosystems'

func (*MockInternalClient_GetEcosystems_Call) Return

func (*MockInternalClient_GetEcosystems_Call) Run

func (*MockInternalClient_GetEcosystems_Call) RunAndReturn

type MockInternalClient_GetFindings_Call

type MockInternalClient_GetFindings_Call struct {
	*mock.Call
}

MockInternalClient_GetFindings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFindings'

func (*MockInternalClient_GetFindings_Call) Return

func (*MockInternalClient_GetFindings_Call) Run

func (_c *MockInternalClient_GetFindings_Call) Run(run func(ctx context.Context, projectUuid string, suppressed bool)) *MockInternalClient_GetFindings_Call

func (*MockInternalClient_GetFindings_Call) RunAndReturn

type MockInternalClient_GetOidcUsers_Call

type MockInternalClient_GetOidcUsers_Call struct {
	*mock.Call
}

MockInternalClient_GetOidcUsers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOidcUsers'

func (*MockInternalClient_GetOidcUsers_Call) Return

func (*MockInternalClient_GetOidcUsers_Call) Run

func (*MockInternalClient_GetOidcUsers_Call) RunAndReturn

type MockInternalClient_GetProjectById_Call

type MockInternalClient_GetProjectById_Call struct {
	*mock.Call
}

MockInternalClient_GetProjectById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProjectById'

func (*MockInternalClient_GetProjectById_Call) Return

func (*MockInternalClient_GetProjectById_Call) Run

func (*MockInternalClient_GetProjectById_Call) RunAndReturn

type MockInternalClient_GetProjectMetricsByDate_Call

type MockInternalClient_GetProjectMetricsByDate_Call struct {
	*mock.Call
}

MockInternalClient_GetProjectMetricsByDate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProjectMetricsByDate'

func (*MockInternalClient_GetProjectMetricsByDate_Call) Return

func (*MockInternalClient_GetProjectMetricsByDate_Call) Run

func (*MockInternalClient_GetProjectMetricsByDate_Call) RunAndReturn

type MockInternalClient_GetProject_Call

type MockInternalClient_GetProject_Call struct {
	*mock.Call
}

MockInternalClient_GetProject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProject'

func (*MockInternalClient_GetProject_Call) Return

func (*MockInternalClient_GetProject_Call) Run

func (*MockInternalClient_GetProject_Call) RunAndReturn

type MockInternalClient_GetProjectsByPrefixedTag_Call

type MockInternalClient_GetProjectsByPrefixedTag_Call struct {
	*mock.Call
}

MockInternalClient_GetProjectsByPrefixedTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProjectsByPrefixedTag'

func (*MockInternalClient_GetProjectsByPrefixedTag_Call) Return

func (*MockInternalClient_GetProjectsByPrefixedTag_Call) Run

func (*MockInternalClient_GetProjectsByPrefixedTag_Call) RunAndReturn

type MockInternalClient_GetProjectsByTag_Call

type MockInternalClient_GetProjectsByTag_Call struct {
	*mock.Call
}

MockInternalClient_GetProjectsByTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProjectsByTag'

func (*MockInternalClient_GetProjectsByTag_Call) Return

func (*MockInternalClient_GetProjectsByTag_Call) Run

func (*MockInternalClient_GetProjectsByTag_Call) RunAndReturn

type MockInternalClient_GetProjects_Call

type MockInternalClient_GetProjects_Call struct {
	*mock.Call
}

MockInternalClient_GetProjects_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProjects'

func (*MockInternalClient_GetProjects_Call) Return

func (*MockInternalClient_GetProjects_Call) Run

func (*MockInternalClient_GetProjects_Call) RunAndReturn

type MockInternalClient_GetTeam_Call

type MockInternalClient_GetTeam_Call struct {
	*mock.Call
}

MockInternalClient_GetTeam_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTeam'

func (*MockInternalClient_GetTeam_Call) Return

func (*MockInternalClient_GetTeam_Call) Run

func (*MockInternalClient_GetTeam_Call) RunAndReturn

type MockInternalClient_GetTeams_Call

type MockInternalClient_GetTeams_Call struct {
	*mock.Call
}

MockInternalClient_GetTeams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTeams'

func (*MockInternalClient_GetTeams_Call) Return

func (*MockInternalClient_GetTeams_Call) Run

func (*MockInternalClient_GetTeams_Call) RunAndReturn

type MockInternalClient_Headers_Call

type MockInternalClient_Headers_Call struct {
	*mock.Call
}

MockInternalClient_Headers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Headers'

func (*MockInternalClient_Headers_Call) Return

func (*MockInternalClient_Headers_Call) Run

func (*MockInternalClient_Headers_Call) RunAndReturn

type MockInternalClient_PortfolioRefresh_Call

type MockInternalClient_PortfolioRefresh_Call struct {
	*mock.Call
}

MockInternalClient_PortfolioRefresh_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PortfolioRefresh'

func (*MockInternalClient_PortfolioRefresh_Call) Return

func (*MockInternalClient_PortfolioRefresh_Call) Run

func (*MockInternalClient_PortfolioRefresh_Call) RunAndReturn

type MockInternalClient_RecordAnalysis_Call

type MockInternalClient_RecordAnalysis_Call struct {
	*mock.Call
}

MockInternalClient_RecordAnalysis_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecordAnalysis'

func (*MockInternalClient_RecordAnalysis_Call) Return

func (*MockInternalClient_RecordAnalysis_Call) Run

func (*MockInternalClient_RecordAnalysis_Call) RunAndReturn

type MockInternalClient_RemoveAdminUsers_Call

type MockInternalClient_RemoveAdminUsers_Call struct {
	*mock.Call
}

MockInternalClient_RemoveAdminUsers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveAdminUsers'

func (*MockInternalClient_RemoveAdminUsers_Call) Return

func (*MockInternalClient_RemoveAdminUsers_Call) Run

func (*MockInternalClient_RemoveAdminUsers_Call) RunAndReturn

type MockInternalClient_TriggerAnalysis_Call

type MockInternalClient_TriggerAnalysis_Call struct {
	*mock.Call
}

MockInternalClient_TriggerAnalysis_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TriggerAnalysis'

func (*MockInternalClient_TriggerAnalysis_Call) Return

func (*MockInternalClient_TriggerAnalysis_Call) Run

func (*MockInternalClient_TriggerAnalysis_Call) RunAndReturn

type MockInternalClient_UpdateProjectInfo_Call

type MockInternalClient_UpdateProjectInfo_Call struct {
	*mock.Call
}

MockInternalClient_UpdateProjectInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateProjectInfo'

func (*MockInternalClient_UpdateProjectInfo_Call) Return

func (*MockInternalClient_UpdateProjectInfo_Call) Run

func (*MockInternalClient_UpdateProjectInfo_Call) RunAndReturn

type MockInternalClient_UpdateProject_Call

type MockInternalClient_UpdateProject_Call struct {
	*mock.Call
}

MockInternalClient_UpdateProject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateProject'

func (*MockInternalClient_UpdateProject_Call) Return

func (*MockInternalClient_UpdateProject_Call) Run

func (*MockInternalClient_UpdateProject_Call) RunAndReturn

type MockInternalClient_UploadProject_Call

type MockInternalClient_UploadProject_Call struct {
	*mock.Call
}

MockInternalClient_UploadProject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UploadProject'

func (*MockInternalClient_UploadProject_Call) Return

func (*MockInternalClient_UploadProject_Call) Run

func (_c *MockInternalClient_UploadProject_Call) Run(run func(ctx context.Context, name string, version string, parentUuid string, autoCreate bool, bom []byte)) *MockInternalClient_UploadProject_Call

func (*MockInternalClient_UploadProject_Call) RunAndReturn

type MockInternalClient_Version_Call

type MockInternalClient_Version_Call struct {
	*mock.Call
}

MockInternalClient_Version_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Version'

func (*MockInternalClient_Version_Call) Return

func (*MockInternalClient_Version_Call) Run

func (*MockInternalClient_Version_Call) RunAndReturn

type MockPrometheus

type MockPrometheus struct {
	mock.Mock
}

MockPrometheus is an autogenerated mock type for the Prometheus type

func NewMockPrometheus

func NewMockPrometheus(t interface {
	mock.TestingT
	Cleanup(func())
},
) *MockPrometheus

NewMockPrometheus creates a new instance of MockPrometheus. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockPrometheus) EXPECT

func (*MockPrometheus) Query

func (_m *MockPrometheus) Query(ctx context.Context, query string, ts time.Time, opts ...v1.Option) (model.Value, v1.Warnings, error)

Query provides a mock function with given fields: ctx, query, ts, opts

type MockPrometheus_Expecter

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

func (*MockPrometheus_Expecter) Query

func (_e *MockPrometheus_Expecter) Query(ctx interface{}, query interface{}, ts interface{}, opts ...interface{}) *MockPrometheus_Query_Call

Query is a helper method to define mock.On call

  • ctx context.Context
  • query string
  • ts time.Time
  • opts ...v1.Option

type MockPrometheus_Query_Call

type MockPrometheus_Query_Call struct {
	*mock.Call
}

MockPrometheus_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query'

func (*MockPrometheus_Query_Call) Return

func (*MockPrometheus_Query_Call) Run

func (_c *MockPrometheus_Query_Call) Run(run func(ctx context.Context, query string, ts time.Time, opts ...v1.Option)) *MockPrometheus_Query_Call

func (*MockPrometheus_Query_Call) RunAndReturn

type ProjectMetric

type ProjectMetric struct {
	ProjectID            uuid.UUID
	VulnerabilityMetrics []*VulnerabilityMetrics
}

type Prometheus

type Prometheus interface {
	Query(ctx context.Context, query string, ts time.Time, opts ...prom.Option) (prom_model.Value, prom.Warnings, error)
}

func NewFakePrometheusClient

func NewFakePrometheusClient() Prometheus

type PrometheusClients

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

func NewPrometheusClients

func NewPrometheusClients(cfg *PrometheusConfig) (*PrometheusClients, error)

type PrometheusConfig

type PrometheusConfig struct {
	EnableFakes bool
	Tenant      string
	Clusters    []string
}

type TeamVulnerabilityRanking

type TeamVulnerabilityRanking string
const (
	// Top third most vulnerable teams.
	TeamVulnerabilityRankingMostVulnerable TeamVulnerabilityRanking = "MOST_VULNERABLE"
	// Middle third most vulnerable teams.
	TeamVulnerabilityRankingMiddle TeamVulnerabilityRanking = "MIDDLE"
	// Bottom third most vulnerable teams.
	TeamVulnerabilityRankingLeastVulnerable TeamVulnerabilityRanking = "LEAST_VULNERABLE"
	// Unknown ranking.
	TeamVulnerabilityRankingUnknown TeamVulnerabilityRanking = "UNKNOWN"
)

func GetTeamRanking

func GetTeamRanking(ctx context.Context, teamSlug slug.Slug) (TeamVulnerabilityRanking, error)

func (TeamVulnerabilityRanking) IsValid

func (e TeamVulnerabilityRanking) IsValid() bool

func (TeamVulnerabilityRanking) MarshalGQL

func (e TeamVulnerabilityRanking) MarshalGQL(w io.Writer)

func (TeamVulnerabilityRanking) String

func (e TeamVulnerabilityRanking) String() string

func (*TeamVulnerabilityRanking) UnmarshalGQL

func (e *TeamVulnerabilityRanking) UnmarshalGQL(v interface{}) error

type TeamVulnerabilityRiskScoreTrend

type TeamVulnerabilityRiskScoreTrend string
const (
	// Risk score is increasing.
	TeamVulnerabilityRiskScoreTrendUp TeamVulnerabilityRiskScoreTrend = "UP"
	// Risk score is decreasing.
	TeamVulnerabilityRiskScoreTrendDown TeamVulnerabilityRiskScoreTrend = "DOWN"
	// Risk score is not changing.
	TeamVulnerabilityRiskScoreTrendFlat TeamVulnerabilityRiskScoreTrend = "FLAT"
)

func GetTeamRiskScoreTrend

func GetTeamRiskScoreTrend(ctx context.Context, teamSlug slug.Slug) (TeamVulnerabilityRiskScoreTrend, error)

func (TeamVulnerabilityRiskScoreTrend) IsValid

func (TeamVulnerabilityRiskScoreTrend) MarshalGQL

func (e TeamVulnerabilityRiskScoreTrend) MarshalGQL(w io.Writer)

func (TeamVulnerabilityRiskScoreTrend) String

func (*TeamVulnerabilityRiskScoreTrend) UnmarshalGQL

func (e *TeamVulnerabilityRiskScoreTrend) UnmarshalGQL(v interface{}) error

type TeamVulnerabilityState

type TeamVulnerabilityState string
const (
	TeamVulnerabilityStateOk                         TeamVulnerabilityState = "OK"
	TeamVulnerabilityStateTooManyVulnerableWorkloads TeamVulnerabilityState = "TOO_MANY_VULNERABLE_WORKLOADS"
	TeamVulnerabilityStateCoverageTooLow             TeamVulnerabilityState = "COVERAGE_TOO_LOW"
	TeamVulnerabilityStateVulnerable                 TeamVulnerabilityState = "VULNERABLE"
	TeamVulnerabilityStateMissingSbom                TeamVulnerabilityState = "MISSING_SBOM"
)

func (TeamVulnerabilityState) IsValid

func (e TeamVulnerabilityState) IsValid() bool

func (TeamVulnerabilityState) MarshalGQL

func (e TeamVulnerabilityState) MarshalGQL(w io.Writer)

func (TeamVulnerabilityState) String

func (e TeamVulnerabilityState) String() string

func (*TeamVulnerabilityState) UnmarshalGQL

func (e *TeamVulnerabilityState) UnmarshalGQL(v interface{}) error

type TeamVulnerabilityStatus

type TeamVulnerabilityStatus struct {
	State       TeamVulnerabilityState `json:"state"`
	Title       string                 `json:"title"`
	Description string                 `json:"description"`
}

func GetTeamVulnerabilityStatus

func GetTeamVulnerabilityStatus(ctx context.Context, teamSlug slug.Slug) ([]*TeamVulnerabilityStatus, error)

type TeamVulnerabilitySummary

type TeamVulnerabilitySummary struct {
	RiskScore  int     `json:"riskScore"`
	Critical   int     `json:"critical"`
	High       int     `json:"high"`
	Medium     int     `json:"medium"`
	Low        int     `json:"low"`
	Unassigned int     `json:"unassigned"`
	BomCount   int     `json:"bomCount"`
	Coverage   float64 `json:"coverage"`

	TeamSlug slug.Slug `json:"-"`
}

type TeamVulnerabilitySummaryFilter

type TeamVulnerabilitySummaryFilter struct {
	Environments []string `json:"environments,omitempty"`
}

type UpdateImageVulnerabilityInput

type UpdateImageVulnerabilityInput struct {
	// The id of the vulnerability to suppress.
	VulnerabilityID ident.Ident `json:"vulnerabilityID"`
	// The analysis state of the vulnerability.
	AnalysisState ImageVulnerabilityAnalysisState `json:"analysisState"`
	// The a comment for suppressing the vulnerability.
	Comment string `json:"comment"`
	// Should the vulnerability be suppressed.
	Suppress bool `json:"suppress"`
}

type UpdateImageVulnerabilityPayload

type UpdateImageVulnerabilityPayload struct {
	Vulnerability *ImageVulnerability `json:"vulnerability"`
}

type VulnerabilityMetrics

type VulnerabilityMetrics struct {
	Total      int `json:"total"`
	RiskScore  int `json:"riskScore"`
	Critical   int `json:"critical"`
	High       int `json:"high"`
	Medium     int `json:"medium"`
	Low        int `json:"low"`
	Unassigned int `json:"unassigned"`
}

type VulnerabilityUpdatedActivityLogEntry

type VulnerabilityUpdatedActivityLogEntry struct {
	activitylog.GenericActivityLogEntry
}

type WorkloadReference

type WorkloadReference struct {
	Environment  string
	Team         string
	WorkloadType string
	Name         string
}

Jump to

Keyboard shortcuts

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