images

package
v0.0.0-...-c7f552b Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2020 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllHandler

func AllHandler(w http.ResponseWriter, r *http.Request)

AllHandler needs to handle the incoming request and execute the proper Image call

func Handler

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

Handler needs to handle the incoming request and execute the proper Image call Param: http.ResponseWriter - writer to send back to requester Param: *http.Request - request

Types

type Image

type Image struct {
	Risk            images.Image           `json:"risk"`
	Vulnerabilities images.Vulnerabilities `json:"vulnerabilities"`
	SensitiveData   images.Sensitive       `json:"sensitive_data"`
	Malware         images.Malware         `json:"malware"`
	Report          string                 `json:"template"`
	Response        reports.Response       `json:"response"`
}

Image contains the structure for a single image report

func (*Image) Get

func (i *Image) Get(params map[string]string, queue chan reports.Response) reports.Response

Get - single image risk report Param: map[string]string - Map of request parameters Param: chan reports.Response - Channel that accepts the JSON response from each image Return: reports.Response - the Json response sent to the requester

func (*Image) Template

func (i *Image) Template(risk, vulnerabilities, sensitive, malware string) string

Template - generates the static HTML for the image scan report Param: risk - JSON to insert into template Param: vulnerabilities - JSON to insert into template Param: sensitive - JSON to insert into template Param: malware - JSON to insert into template Return: string - HTML to create file

type Images

type Images []Image

Images sets a slice of images

func (*Images) Get

func (il *Images) Get(params map[string]string, queue chan reports.Response) reports.Response

Get - creates reports for all images in all registries Param: map[string]string - Map of request parameters Param: chan reports.Response - Channel that accepts the JSON response from each image Return: reports.Response - the Json response sent to the requester

Jump to

Keyboard shortcuts

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