v0.0.1 Latest Latest

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

Go to latest
Published: Nov 13, 2015 License: Apache-2.0 Imports: 10 Imported by: 0



Package logic implements all the available API methods. Every methods are documented in docs/API.md.



View Source
const Version = 1

Version is an integer representing the API version.


This section is empty.


func DELVulnerabilities

func DELVulnerabilities(w http.ResponseWriter, r *http.Request, p httprouter.Params)

DELVulnerabilities deletes a vulnerability if it exists.

func GETHealth

func GETHealth(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

GETHealth sums up the health of all the registered services.

func GETLayersOS

func GETLayersOS(w http.ResponseWriter, r *http.Request, p httprouter.Params)

GETLayersOS returns the operating system of a layer if it exists. It uses not only the specified layer but also its parent layers if necessary. An empty OS string is returned if no OS has been detected.

func GETLayersPackages

func GETLayersPackages(w http.ResponseWriter, r *http.Request, p httprouter.Params)

GETLayersPackages returns the complete list of packages that a layer has if it exists.

func GETLayersPackagesDiff

func GETLayersPackagesDiff(w http.ResponseWriter, r *http.Request, p httprouter.Params)

GETLayersPackagesDiff returns the list of packages that a layer installs and removes if it exists.

func GETLayersParent

func GETLayersParent(w http.ResponseWriter, r *http.Request, p httprouter.Params)

GETLayersParent returns the parent ID of a layer if it exists. An empty ID string is returned if the layer has no parent.

func GETLayersVulnerabilities

func GETLayersVulnerabilities(w http.ResponseWriter, r *http.Request, p httprouter.Params)

GETLayersVulnerabilities returns the complete list of vulnerabilities that a layer has if it exists.

func GETLayersVulnerabilitiesDiff

func GETLayersVulnerabilitiesDiff(w http.ResponseWriter, r *http.Request, p httprouter.Params)

GETLayersVulnerabilitiesDiff returns the list of vulnerabilities that a layer adds and removes if it exists.

func GETVersions

func GETVersions(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

GETVersions returns API and Engine versions.

func GETVulnerabilities

func GETVulnerabilities(w http.ResponseWriter, r *http.Request, p httprouter.Params)

GETVulnerabilities returns a vulnerability identified by an ID if it exists.

func GETVulnerabilitiesIntroducingLayers

func GETVulnerabilitiesIntroducingLayers(w http.ResponseWriter, r *http.Request, p httprouter.Params)

GETVulnerabilitiesIntroducingLayers returns the list of layers that introduces a given vulnerability, if it exists. To clarify, it does not return the list of every layers that have the vulnerability.

func POSTBatchLayersVulnerabilities

func POSTBatchLayersVulnerabilities(w http.ResponseWriter, r *http.Request, p httprouter.Params)

POSTBatchLayersVulnerabilities returns the complete list of vulnerabilities that the provided layers have, if they all exist.

func POSTLayers

func POSTLayers(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

POSTLayers analyzes a layer and returns the engine version that has been used for the analysis.

func POSTVulnerabilities

func POSTVulnerabilities(w http.ResponseWriter, r *http.Request, p httprouter.Params)

POSTVulnerabilities manually inserts a vulnerability into the database if it does not exist yet.

func POSTVulnerabilitiesAffectedLayers

func POSTVulnerabilitiesAffectedLayers(w http.ResponseWriter, r *http.Request, p httprouter.Params)

POSTVulnerabilitiesAffectedLayers returns whether the specified layers (by their IDs) are vulnerable to the given Vulnerability or not.

func PUTVulnerabilities

func PUTVulnerabilities(w http.ResponseWriter, r *http.Request, p httprouter.Params)

PUTVulnerabilities updates a vulnerability if it exists.


type POSTBatchLayersVulnerabilitiesParameters

type POSTBatchLayersVulnerabilitiesParameters struct {
	LayersIDs []string

POSTBatchLayersVulnerabilitiesParameters represents the expected parameters for POSTBatchLayersVulnerabilities.

type POSTLayersParameters

type POSTLayersParameters struct {
	ID, Path, ParentID string

POSTLayersParameters represents the expected parameters for POSTLayers.

type POSTVulnerabilitiesAffectedLayersParameters

type POSTVulnerabilitiesAffectedLayersParameters struct {
	LayersIDs []string

POSTVulnerabilitiesAffectedLayersParameters represents the expected parameters for POSTVulnerabilitiesAffectedLayers.

Jump to

Keyboard shortcuts

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