annotator

package
v2.2.5+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddQuayLabel

func AddQuayLabel(url string, accessToken string, labelKey string, labelValue string) error

AddQuayLabel takes the specific Quay URL and adds the properties/annotations given by BD

func DeleteQuayLabel

func DeleteQuayLabel(url string, accessToken string, labelID string) error

DeleteQuayLabel takes the specific Quay URL and deletes the properties/annotations given by BD

func PingQuayServer

func PingQuayServer(url string, user string, password string, accessToken string) (*utils.RegistryAuth, error)

PingQuayServer takes in the specified URL with access token and checks weather it's a valid token for quay by pinging the server

Types

type ArtifactoryAnnotator

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

ArtifactoryAnnotator handles annotating artifactory images with vulnerability and policy issues

func NewArtifactoryAnnotator

func NewArtifactoryAnnotator(perceptorURL string, registryAuths []*utils.RegistryAuth) *ArtifactoryAnnotator

NewArtifactoryAnnotator creates a new ArtifactoryAnnotator object

func (*ArtifactoryAnnotator) AnnotateImage

func (ia *ArtifactoryAnnotator) AnnotateImage(uri string, im *perceptorapi.ScannedImage, cred *utils.RegistryAuth)

AnnotateImage takes the specific Artifactory URL and applies the properties/annotations given by BD

func (*ArtifactoryAnnotator) Run

func (ia *ArtifactoryAnnotator) Run(interval time.Duration, stopCh <-chan struct{})

Run starts a controller that will annotate images

type ImageAnnotator

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

ImageAnnotator handles annotating images with vulnerability and policy issues

func NewImageAnnotator

func NewImageAnnotator(ic *imageclient.ImageV1Client, perceptorURL string, handler annotations.ImageAnnotatorHandler) *ImageAnnotator

NewImageAnnotator creates a new ImageAnnotator object

func (*ImageAnnotator) Run

func (ia *ImageAnnotator) Run(interval time.Duration, stopCh <-chan struct{})

Run starts a controller that will annotate images

type PodAnnotator

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

PodAnnotator handles annotating pods with vulnerability and policy issues

func NewPodAnnotator

func NewPodAnnotator(pl corev1.CoreV1Interface, perceptorURL string, handler annotations.PodAnnotatorHandler) *PodAnnotator

NewPodAnnotator creates a new PodAnnotator object

func (*PodAnnotator) Run

func (pa *PodAnnotator) Run(interval time.Duration, stopCh <-chan struct{})

Run starts a controller that will annotate pods

type QuayAnnotator

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

QuayAnnotator handles annotating quay images with vulnerability and policy issues

func NewQuayAnnotator

func NewQuayAnnotator(perceptorURL string, registryAuths []*utils.RegistryAuth) *QuayAnnotator

NewQuayAnnotator creates a new QuayAnnotator object

func (*QuayAnnotator) Run

func (qa *QuayAnnotator) Run(interval time.Duration, stopCh <-chan struct{})

Run starts a controller that will annotate images

func (*QuayAnnotator) UpdateAnnotation

func (qa *QuayAnnotator) UpdateAnnotation(url string, labelKey string, newValue string, imageInfo string, quayToken string)

UpdateAnnotation takes the specific Quay URL and applies the properties/annotations given by BD

type QuayLabel

type QuayLabel struct {
	Value      string `json:"value"`
	MediaType  string `json:"media_type"`
	ID         string `json:"id"`
	Key        string `json:"key"`
	SourceType string `json:"source_type"`
}

QuayLabel contains info on a single label attached to an image

type QuayLabels

type QuayLabels struct {
	Labels []QuayLabel `json:"labels"`
}

QuayLabels contains a list of returned Labels on an image

type QuayNewLabel

type QuayNewLabel struct {
	MediaType string `json:"media_type"`
	Value     string `json:"value"`
	Key       string `json:"key"`
}

QuayNewLabel is used for Posting a new label, doesn't need to have json metadatas but couldn't hurt

type QuayRepo

type QuayRepo struct {
	Name        string   `json:"name"`
	Repository  string   `json:"repository"`
	Namespace   string   `json:"namespace"`
	DockerURL   string   `json:"docker_url"`
	Homepage    string   `json:"homepage"`
	UpdatedTags []string `json:"updated_tags"`
}

QuayRepo contains a quay image with list of tags

type QuayTag

type QuayTag struct {
	Name           string `json:"name"`
	Reversion      bool   `json:"reversion"`
	StartTs        int    `json:"start_ts"`
	ImageID        string `json:"image_id"`
	LastModified   string `json:"last_modified"`
	ManifestDigest string `json:"manifest_digest"`
	DockerImageID  string `json:"docker_image_id"`
	IsManifestList bool   `json:"is_manifest_list"`
	Size           int    `json:"size"`
}

QuayTag contains individual tag info for an image version

type QuayTagDigest

type QuayTagDigest struct {
	HasAdditional bool      `json:"has_additional"`
	Page          int       `json:"page"`
	Tags          []QuayTag `json:"tags"`
}

QuayTagDigest contains Digest for a particular Quay image

Jump to

Keyboard shortcuts

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