handler

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func New

func New(b, d u.S3Interface, cloudName string) *Handler

func (*Handler) ApiV1GetImage added in v0.3.0

func (h *Handler) ApiV1GetImage(w http.ResponseWriter, r *http.Request, imageId generated.ImageID)

ApiV1GetImage will return both the scan and tests results along with some additional image data. This is especially useful when using a UI.

func (*Handler) ApiV1GetImages added in v0.3.0

func (h *Handler) ApiV1GetImages(w http.ResponseWriter, r *http.Request)

ApiV1GetImages returns a list of scan results by listing the contents of the S3 bucket. This then gets used to collect together image data per image from OpenStack

func (*Handler) ApiV1GetScan

func (h *Handler) ApiV1GetScan(w http.ResponseWriter, r *http.Request, imageId generated.ImageID)

ApiV1GetScan will return the raw scan data straight from S3

func (*Handler) ApiV1GetScans added in v0.3.0

func (h *Handler) ApiV1GetScans(w http.ResponseWriter, r *http.Request)

ApiV1GetScans returns a list of scan results by listing the contents of the S3 bucket. This allows for parsing and pulling subsequent data based off of the image ID

func (*Handler) ApiV1GetTest added in v0.3.0

func (h *Handler) ApiV1GetTest(w http.ResponseWriter, r *http.Request, imageId generated.ImageID)

ApiV1GetTest will return the raw test data straight from S3

func (*Handler) Healthz

func (h *Handler) Healthz(w http.ResponseWriter, r *http.Request)

Healthz returns ok if everything is ok

type ImageData added in v0.3.0

type ImageData struct {
	ImageID    string               `json:"image_id"`
	ImageName  string               `json:"image_name"`
	K8SVersion interface{}          `json:"k8s_version"`
	BuildDate  interface{}          `json:"build_date"`
	ScanStatus interface{}          `json:"scan_status"`
	ScanData   generated.ScanResult `json:"scan_data"`
	TestStatus interface{}          `json:"test_status"`
	TestData   generated.TestResult `json:"test_data"`
}

Jump to

Keyboard shortcuts

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