validate

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Overview

Package validate manages the validate commands logics

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckValidBuildStep

func CheckValidBuildStep(buildStep string) error

CheckValidBuildStep checks that a build step has a valid name.

Types

type ImageHandler

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

ImageHandler has all the fields for sending request to validator service.

func NewImageValidateHandler

func NewImageValidateHandler(saasTmpl, orgKey, apiID, apiKey, buildStep, namespace, imageDigest string) *ImageHandler

NewImageValidateHandler will create a handler for validate cmd.

func (*ImageHandler) AttachImageID

func (h *ImageHandler) AttachImageID(imageDigest string, imageID image.Identifier)

AttachImageID will attach image digest and identifier to the handler.

func (ImageHandler) Validate

func (h ImageHandler) Validate() ([]image.PolicyViolation, error)

Validate will will validate the image using the validate API.

type Job

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

Job represents a validate job for specific resource that should be validated.

func NewJob

func NewJob(resourceData string, filePath string) *Job

NewJob creates a new Job.

func NewJobWithError

func NewJobWithError(error string, filePath string) *Job

NewJobWithError creates a new Job with error.

type K8SObjectHandler

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

K8SObjectHandler has all the fields for sending request to validator service.

func NewK8SObjectValidateHandler

func NewK8SObjectValidateHandler(saasTmpl, orgKey, apiID, apiKey, buildStep, namespace, path string) *K8SObjectHandler

NewK8SObjectValidateHandler will create a handler for validate cmd.

func (K8SObjectHandler) Validate

Validate will will validate the resource using the validate API.

Jump to

Keyboard shortcuts

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