Documentation
¶
Index ¶
- Constants
- Variables
- func ActivityBaseResolver(app app.Heureka, ctx context.Context, filter *model.ActivityFilter, first *int, ...) (*model.ActivityConnection, error)
- func CcrnBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentInstanceFilter) (*model.FilterItem, error)
- func ClusterBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentInstanceFilter) (*model.FilterItem, error)
- func ComponentBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentFilter, ...) (*model.ComponentConnection, error)
- func ComponentCcrnBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentFilter) (*model.FilterItem, error)
- func ComponentInstanceBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentInstanceFilter, ...) (*model.ComponentInstanceConnection, error)
- func ComponentInstanceFilterBaseResolver(...) (*model.FilterItem, error)
- func ComponentIssueCountsBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentFilter, ...) (*model.SeverityCounts, error)
- func ComponentVersionBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentVersionFilter, ...) (*model.ComponentVersionConnection, error)
- func ContainerBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentInstanceFilter) (*model.FilterItem, error)
- func ContextBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentInstanceFilter) (*model.FilterJSONItem, error)
- func DomainBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentInstanceFilter) (*model.FilterItem, error)
- func EffectiveIssueVariantBaseResolver(app app.Heureka, ctx context.Context, filter *model.IssueVariantFilter, ...) (*model.IssueVariantConnection, error)
- func EvidenceBaseResolver(app app.Heureka, ctx context.Context, filter *model.EvidenceFilter, first *int, ...) (*model.EvidenceConnection, error)
- func GetIssueListOptions(requestedFields []string) *entity.IssueListOptions
- func GetListOptions(requestedFields []string) *entity.ListOptions
- func GetNestedPreloads(ctx *graphql.OperationContext, fields []graphql.CollectedField, prefix string) (preloads []string)
- func GetPreloadString(prefix, name string) string
- func GetPreloads(ctx context.Context) []string
- func GetRoot(fctx *graphql.FieldContext) *graphql.FieldContext
- func ImageBaseResolver(app app.Heureka, ctx context.Context, filter *model.ImageFilter, first *int, ...) (*model.ImageConnection, error)
- func IssueBaseResolver(app app.Heureka, ctx context.Context, filter *model.IssueFilter, first *int, ...) (*model.IssueConnection, error)
- func IssueCountsBaseResolver(app app.Heureka, ctx context.Context, filter *model.IssueFilter, ...) (*model.SeverityCounts, error)
- func IssueMatchBaseResolver(app app.Heureka, ctx context.Context, filter *model.IssueMatchFilter, ...) (*model.IssueMatchConnection, error)
- func IssueMatchChangeBaseResolver(app app.Heureka, ctx context.Context, filter *model.IssueMatchChangeFilter, ...) (*model.IssueMatchChangeConnection, error)
- func IssueNameBaseResolver(app app.Heureka, ctx context.Context, filter *model.IssueFilter) (*model.FilterItem, error)
- func IssueRepositoryBaseResolver(app app.Heureka, ctx context.Context, filter *model.IssueRepositoryFilter, ...) (*model.IssueRepositoryConnection, error)
- func IssueVariantBaseResolver(app app.Heureka, ctx context.Context, filter *model.IssueVariantFilter, ...) (*model.IssueVariantConnection, error)
- func NamespaceBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentInstanceFilter) (*model.FilterItem, error)
- func ParentBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentInstanceFilter) (*model.FilterItem, error)
- func ParseCursor(cursor *string) (*int64, error)
- func PodBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentInstanceFilter) (*model.FilterItem, error)
- func ProjectBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentInstanceFilter) (*model.FilterItem, error)
- func RegionBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentInstanceFilter) (*model.FilterItem, error)
- func RemediationBaseResolver(app app.Heureka, ctx context.Context, filter *model.RemediationFilter, ...) (*model.RemediationConnection, error)
- func ScannerRunTagFilterValues(app app.Heureka, ctx context.Context) ([]*string, error)
- func ScannerRuns(app app.Heureka, ctx context.Context, filter *model.ScannerRunFilter, ...) (*model.ScannerRunConnection, error)
- func ServiceBaseResolver(app app.Heureka, ctx context.Context, filter *model.ServiceFilter, first *int, ...) (*model.ServiceConnection, error)
- func ServiceCcrnBaseResolver(app app.Heureka, ctx context.Context, filter *model.ServiceFilter) (*model.FilterItem, error)
- func ServiceDomainBaseResolver(app app.Heureka, ctx context.Context, filter *model.ServiceFilter) (*model.FilterItem, error)
- func ServiceFilterBaseResolver(...) (*model.FilterItem, error)
- func ServiceRegionBaseResolver(app app.Heureka, ctx context.Context, filter *model.ServiceFilter) (*model.FilterItem, error)
- func SingleActivityBaseResolver(app app.Heureka, ctx context.Context, parent *model.NodeParent) (*model.Activity, error)
- func SingleComponentBaseResolver(app app.Heureka, ctx context.Context, parent *model.NodeParent) (*model.Component, error)
- func SingleComponentInstanceBaseResolver(app app.Heureka, ctx context.Context, parent *model.NodeParent) (*model.ComponentInstance, error)
- func SingleComponentVersionBaseResolver(app app.Heureka, ctx context.Context, parent *model.NodeParent) (*model.ComponentVersion, error)
- func SingleIssueBaseResolver(app app.Heureka, ctx context.Context, parent *model.NodeParent) (*model.Issue, error)
- func SingleIssueMatchBaseResolver(app app.Heureka, ctx context.Context, parent *model.NodeParent) (*model.IssueMatch, error)
- func SingleIssueRepositoryBaseResolver(app app.Heureka, ctx context.Context, parent *model.NodeParent) (*model.IssueRepository, error)
- func SingleIssueVariantBaseResolver(app app.Heureka, ctx context.Context, parent *model.NodeParent) (*model.IssueVariant, error)
- func SingleServiceBaseResolver(app app.Heureka, ctx context.Context, parent *model.NodeParent) (*model.Service, error)
- func SingleUserBaseResolver(app app.Heureka, ctx context.Context, parent *model.NodeParent) (*model.User, error)
- func SupportGroupBaseResolver(app app.Heureka, ctx context.Context, filter *model.SupportGroupFilter, ...) (*model.SupportGroupConnection, error)
- func SupportGroupCcrnBaseResolver(app app.Heureka, ctx context.Context, filter *model.SupportGroupFilter) (*model.FilterItem, error)
- func TypeBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentInstanceFilter) (*model.FilterItem, error)
- func UniqueUserIDBaseResolver(app app.Heureka, ctx context.Context, filter *model.UserFilter) (*model.FilterItem, error)
- func UserBaseResolver(app app.Heureka, ctx context.Context, filter *model.UserFilter, first *int, ...) (*model.UserConnection, error)
- func UserNameBaseResolver(app app.Heureka, ctx context.Context, filter *model.UserFilter) (*model.FilterItem, error)
- func UserNameWithIdBaseResolver(app app.Heureka, ctx context.Context, filter *model.UserFilter) (*model.FilterValueItem, error)
- func VulnerabilityBaseResolver(app app.Heureka, ctx context.Context, filter *model.VulnerabilityFilter, ...) (*model.VulnerabilityConnection, error)
- type GraphQLError
- type ResolverError
Constants ¶
const ( // Standard GraphQL error codes ErrorCodeBadRequest = "BAD_REQUEST" ErrorCodeNotFound = "NOT_FOUND" ErrorCodeInternal = "INTERNAL" ErrorCodeUnauthenticated = "UNAUTHENTICATED" ErrorCodeForbidden = "FORBIDDEN" ErrorCodeConflict = "CONFLICT" ErrorCodeValidation = "VALIDATION" )
GraphQL error codes
Variables ¶
var ( FilterDisplayServiceCcrn string = "Service" FilterDisplaySupportGroupCcrn string = "Support Group" FilterDisplayUserName string = "User Name" FilterDisplayUserNameWithId string = "User" FilterDisplayUniqueUserId string = "Unique User ID" FilterDisplayComponentCcrn string = "Pod" FilterDisplayIssueType string = "Issue Type" FilterDisplayIssueMatchStatus string = "Issue Match Status" FilterDisplayIssueMatchID string = "Issue Match ID" FilterDisplayIssuePrimaryName string = "Issue Name" FilterDisplayIssueSeverity string = "Severity" FilterDisplayCcrn string = "CCRN" FilterDisplayRegion string = "Region" FilterDisplayCluster string = "Cluster" FilterDisplayNamespace string = "Namespace" FilterDisplayDomain string = "Domain" FilterDisplayProject string = "Project" FilterDisplayPod string = "Pod" FilterDisplayContainer string = "Container" FilterDisplayComponentInstanceType string = "Component Instance Type" FilterDisplayContext string = "Context" ServiceFilterServiceCcrn string = "serviceCcrn" ServiceFilterDomain string = "domain" ServiceFilterRegion string = "region" ServiceFilterUniqueUserId string = "uniqueUserId" ServiceFilterType string = "type" ServiceFilterUserName string = "userName" ServiceFilterSupportGroupCcrn string = "supportGroupCcrn" ServiceFilterUserNameWithId string = "uniqueUserId" IssueMatchFilterPrimaryName string = "primaryName" IssueMatchFilterComponentCcrn string = "componentCcrn" IssueMatchFilterIssueType string = "issueType" IssueMatchFilterStatus string = "status" IssueMatchFilterSeverity string = "severity" IssueMatchFilterServiceCcrn string = "serviceCcrn" IssueMatchFilterSupportGroupCcrn string = "supportGroupCcrn" ComponentInstanceFilterComponentCcrn string = "componentCcrn" ComponentInstanceFilterRegion string = "region" ComponentInstanceFilterCluster string = "cluster" ComponentInstanceFilterNamespace string = "namespace" ComponentInstanceFilterDomain string = "domain" ComponentInstanceFilterProject string = "project" ComponentInstanceFilterPod string = "pod" ComponentInstanceFilterContainer string = "container" ComponentInstanceFilterType string = "type" ComponentInstanceFilterParentId string = "parentId" VulnerabilityFilterSupportGroup string = "supportGroup" VulnerabilityFilterSeverity string = "severity" VulnerabilityFilterService string = "service" )
Functions ¶
func ActivityBaseResolver ¶
func ActivityBaseResolver(app app.Heureka, ctx context.Context, filter *model.ActivityFilter, first *int, after *string, parent *model.NodeParent) (*model.ActivityConnection, error)
func CcrnBaseResolver ¶
func CcrnBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentInstanceFilter) (*model.FilterItem, error)
func ClusterBaseResolver ¶
func ClusterBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentInstanceFilter) (*model.FilterItem, error)
func ComponentBaseResolver ¶
func ComponentBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentFilter, first *int, after *string, parent *model.NodeParent) (*model.ComponentConnection, error)
func ComponentCcrnBaseResolver ¶
func ComponentCcrnBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentFilter) (*model.FilterItem, error)
func ComponentInstanceBaseResolver ¶
func ComponentInstanceBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentInstanceFilter, first *int, after *string, orderBy []*model.ComponentInstanceOrderBy, parent *model.NodeParent) (*model.ComponentInstanceConnection, error)
func ComponentInstanceFilterBaseResolver ¶
func ComponentInstanceFilterBaseResolver( appCall func(filter *entity.ComponentInstanceFilter, options *entity.ListOptions) ([]string, error), ctx context.Context, filter *model.ComponentInstanceFilter, filterDisplay *string) (*model.FilterItem, error)
func ComponentIssueCountsBaseResolver ¶ added in v1.18.0
func ComponentIssueCountsBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentFilter, parent *model.NodeParent) (*model.SeverityCounts, error)
func ComponentVersionBaseResolver ¶
func ComponentVersionBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentVersionFilter, first *int, after *string, orderBy []*model.ComponentVersionOrderBy, parent *model.NodeParent) (*model.ComponentVersionConnection, error)
func ContainerBaseResolver ¶
func ContainerBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentInstanceFilter) (*model.FilterItem, error)
func ContextBaseResolver ¶
func ContextBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentInstanceFilter) (*model.FilterJSONItem, error)
func DomainBaseResolver ¶
func DomainBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentInstanceFilter) (*model.FilterItem, error)
func EffectiveIssueVariantBaseResolver ¶
func EffectiveIssueVariantBaseResolver(app app.Heureka, ctx context.Context, filter *model.IssueVariantFilter, first *int, after *string, parent *model.NodeParent) (*model.IssueVariantConnection, error)
func EvidenceBaseResolver ¶
func EvidenceBaseResolver(app app.Heureka, ctx context.Context, filter *model.EvidenceFilter, first *int, after *string, parent *model.NodeParent) (*model.EvidenceConnection, error)
func GetIssueListOptions ¶
func GetIssueListOptions(requestedFields []string) *entity.IssueListOptions
func GetListOptions ¶
func GetListOptions(requestedFields []string) *entity.ListOptions
func GetNestedPreloads ¶
func GetNestedPreloads(ctx *graphql.OperationContext, fields []graphql.CollectedField, prefix string) (preloads []string)
func GetPreloadString ¶
func GetPreloads ¶
func GetRoot ¶ added in v1.18.0
func GetRoot(fctx *graphql.FieldContext) *graphql.FieldContext
func ImageBaseResolver ¶ added in v1.18.0
func ImageBaseResolver(app app.Heureka, ctx context.Context, filter *model.ImageFilter, first *int, after *string) (*model.ImageConnection, error)
ImageBaseResolver retrieves a list of images based for a specific service. It's designed for the Image List View in the UI - Default ordering is by Vulnerability Count (descending) and Repository (ascending)
func IssueBaseResolver ¶
func IssueBaseResolver(app app.Heureka, ctx context.Context, filter *model.IssueFilter, first *int, after *string, orderBy []*model.IssueOrderBy, parent *model.NodeParent) (*model.IssueConnection, error)
func IssueCountsBaseResolver ¶
func IssueCountsBaseResolver(app app.Heureka, ctx context.Context, filter *model.IssueFilter, parent *model.NodeParent) (*model.SeverityCounts, error)
func IssueMatchBaseResolver ¶
func IssueMatchBaseResolver(app app.Heureka, ctx context.Context, filter *model.IssueMatchFilter, first *int, after *string, orderBy []*model.IssueMatchOrderBy, parent *model.NodeParent) (*model.IssueMatchConnection, error)
func IssueMatchChangeBaseResolver ¶
func IssueMatchChangeBaseResolver(app app.Heureka, ctx context.Context, filter *model.IssueMatchChangeFilter, first *int, after *string, parent *model.NodeParent) (*model.IssueMatchChangeConnection, error)
func IssueNameBaseResolver ¶
func IssueNameBaseResolver(app app.Heureka, ctx context.Context, filter *model.IssueFilter) (*model.FilterItem, error)
func IssueRepositoryBaseResolver ¶
func IssueRepositoryBaseResolver(app app.Heureka, ctx context.Context, filter *model.IssueRepositoryFilter, first *int, after *string, parent *model.NodeParent) (*model.IssueRepositoryConnection, error)
func IssueVariantBaseResolver ¶
func IssueVariantBaseResolver(app app.Heureka, ctx context.Context, filter *model.IssueVariantFilter, first *int, after *string, parent *model.NodeParent) (*model.IssueVariantConnection, error)
func NamespaceBaseResolver ¶
func NamespaceBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentInstanceFilter) (*model.FilterItem, error)
func ParentBaseResolver ¶ added in v1.1.0
func ParentBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentInstanceFilter) (*model.FilterItem, error)
func ParseCursor ¶
func PodBaseResolver ¶
func PodBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentInstanceFilter) (*model.FilterItem, error)
func ProjectBaseResolver ¶
func ProjectBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentInstanceFilter) (*model.FilterItem, error)
func RegionBaseResolver ¶
func RegionBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentInstanceFilter) (*model.FilterItem, error)
func RemediationBaseResolver ¶ added in v1.25.0
func RemediationBaseResolver(app app.Heureka, ctx context.Context, filter *model.RemediationFilter, first *int, after *string, parent *model.NodeParent) (*model.RemediationConnection, error)
func ScannerRuns ¶
func ServiceBaseResolver ¶
func ServiceBaseResolver(app app.Heureka, ctx context.Context, filter *model.ServiceFilter, first *int, after *string, orderBy []*model.ServiceOrderBy, parent *model.NodeParent) (*model.ServiceConnection, error)
func ServiceCcrnBaseResolver ¶
func ServiceCcrnBaseResolver(app app.Heureka, ctx context.Context, filter *model.ServiceFilter) (*model.FilterItem, error)
func ServiceDomainBaseResolver ¶ added in v1.23.0
func ServiceDomainBaseResolver(app app.Heureka, ctx context.Context, filter *model.ServiceFilter) (*model.FilterItem, error)
func ServiceFilterBaseResolver ¶ added in v1.23.0
func ServiceFilterBaseResolver( appCall func(filter *entity.ServiceFilter, opt *entity.ListOptions) ([]string, error), ctx context.Context, filter *model.ServiceFilter, filterDisplay *string, ) (*model.FilterItem, error)
func ServiceRegionBaseResolver ¶ added in v1.23.0
func ServiceRegionBaseResolver(app app.Heureka, ctx context.Context, filter *model.ServiceFilter) (*model.FilterItem, error)
func SingleComponentInstanceBaseResolver ¶
func SingleComponentInstanceBaseResolver(app app.Heureka, ctx context.Context, parent *model.NodeParent) (*model.ComponentInstance, error)
func SingleComponentVersionBaseResolver ¶
func SingleComponentVersionBaseResolver(app app.Heureka, ctx context.Context, parent *model.NodeParent) (*model.ComponentVersion, error)
func SingleIssueBaseResolver ¶
func SingleIssueMatchBaseResolver ¶
func SingleIssueMatchBaseResolver(app app.Heureka, ctx context.Context, parent *model.NodeParent) (*model.IssueMatch, error)
func SingleIssueRepositoryBaseResolver ¶
func SingleIssueRepositoryBaseResolver(app app.Heureka, ctx context.Context, parent *model.NodeParent) (*model.IssueRepository, error)
func SingleIssueVariantBaseResolver ¶
func SingleIssueVariantBaseResolver(app app.Heureka, ctx context.Context, parent *model.NodeParent) (*model.IssueVariant, error)
func SingleUserBaseResolver ¶
func SupportGroupBaseResolver ¶
func SupportGroupBaseResolver(app app.Heureka, ctx context.Context, filter *model.SupportGroupFilter, first *int, after *string, orderBy []*model.SupportGroupOrderBy, parent *model.NodeParent) (*model.SupportGroupConnection, error)
func SupportGroupCcrnBaseResolver ¶
func SupportGroupCcrnBaseResolver(app app.Heureka, ctx context.Context, filter *model.SupportGroupFilter) (*model.FilterItem, error)
func TypeBaseResolver ¶
func TypeBaseResolver(app app.Heureka, ctx context.Context, filter *model.ComponentInstanceFilter) (*model.FilterItem, error)
func UniqueUserIDBaseResolver ¶
func UniqueUserIDBaseResolver(app app.Heureka, ctx context.Context, filter *model.UserFilter) (*model.FilterItem, error)
func UserBaseResolver ¶
func UserBaseResolver(app app.Heureka, ctx context.Context, filter *model.UserFilter, first *int, after *string, parent *model.NodeParent) (*model.UserConnection, error)
func UserNameBaseResolver ¶
func UserNameBaseResolver(app app.Heureka, ctx context.Context, filter *model.UserFilter) (*model.FilterItem, error)
func UserNameWithIdBaseResolver ¶
func UserNameWithIdBaseResolver(app app.Heureka, ctx context.Context, filter *model.UserFilter) (*model.FilterValueItem, error)
func VulnerabilityBaseResolver ¶
func VulnerabilityBaseResolver(app app.Heureka, ctx context.Context, filter *model.VulnerabilityFilter, first *int, after *string, parent *model.NodeParent) (*model.VulnerabilityConnection, error)
VulnerabilityBaseResolver retrieves a list of vulnerabilities based on the provided filter and pagination parameters. It's designed for the Vulnerability List View in the UI - Only returns Issues of type Vulnerability - Only returns Issues with at least one IssueMatch with status "new" - Default ordering is by IssueVariantRating (descending) and IssuePrimaryName (ascending)
Types ¶
type GraphQLError ¶ added in v1.15.0
type GraphQLError struct {
Message string `json:"message"`
Path []interface{} `json:"path,omitempty"`
Extensions map[string]interface{} `json:"extensions,omitempty"`
}
GraphQLError represents a standard GraphQL error response
func NewGraphQLError ¶ added in v1.15.0
func NewGraphQLError(message string, code string) *GraphQLError
NewGraphQLError creates a new GraphQL error with the given message and code
func ToGraphQLError ¶ added in v1.15.0
func ToGraphQLError(err error) *GraphQLError
ToGraphQLError converts an application error to a GraphQL error
func (*GraphQLError) Error ¶ added in v1.15.0
func (e *GraphQLError) Error() string
Error implements the error interface
type ResolverError ¶
type ResolverError struct {
// contains filtered or unexported fields
}
func NewResolverError ¶
func NewResolverError(resolver string, msg string) *ResolverError
func (*ResolverError) Error ¶
func (re *ResolverError) Error() string