Documentation ¶
Index ¶
Constants ¶
View Source
const (
// Image kind
Image = "image"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Candidate ¶
type Candidate struct { // Namespace(project) ID NamespaceID int64 `json:"namespace_id"` // Namespace Namespace string `json:"namespace"` // Repository name Repository string `json:"repository"` // Kind of the candidate // "image" Kind string `json:"kind"` // Tags attached with the candidate Tags []string `json:"tags"` // Digest Digest string `json:"digest"` // Pushed time in seconds PushedTime int64 `json:"pushed_time_second"` // Pulled time in seconds PulledTime int64 `json:"pulled_time_second"` // Created time in seconds CreationTime int64 `json:"create_time_second"` // Labels attached with the candidate Labels []string `json:"labels"` // Overall severity of the candidate // Use severity code value here to avoid pkg dependency issue. VulnerabilitySeverity uint `json:"vulnerability_severity"` // Signatures of the above Tags // This is not technical correct, just for keeping compatibilities with the original definition. Signatures map[string]bool `json:"signatures"` }
Candidate for retention processor to match
type Factory ¶
Factory is factory method to return a selector implementation Pattern can be any type of data. TODO: 'extras' can also be an optional interface{} to accept more complicated data.
type ImmutableError ¶
type ImmutableError struct { }
ImmutableError ...
func (*ImmutableError) Error ¶
func (e *ImmutableError) Error() string
type Repository ¶
type Repository struct { // Namespace(project) ID NamespaceID int64 // Namespace Namespace string `json:"namespace"` // Repository name Name string `json:"name"` // So far we need the kind of repository and retrieve candidates with different APIs // TODO: REMOVE IT IN THE FUTURE IF WE SUPPORT UNIFIED ARTIFACT MODEL Kind string `json:"kind"` }
Repository of candidate
func (*Repository) FromJSON ¶
func (r *Repository) FromJSON(jsonData string) error
FromJSON constructs the repository from json data
func (*Repository) ToJSON ¶
func (r *Repository) ToJSON() (string, error)
ToJSON marshals repository to JSON string
Click to show internal directories.
Click to hide internal directories.