query

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAuth

func CheckAuth(workspace string, apiKey string) bool

func ForBaseImageInDb added in v0.3.0

func ForBaseImageInDb(digest digest.Digest, workspace string, apiKey string) (*[]Image, error)

ForBaseImageInDb returns images with matching digest in :docker.image/blob-digest or :docker.image/diff-chain-id

func ForBaseImageInIndex added in v0.3.0

func ForBaseImageInIndex(digest digest.Digest, workspace string, apiKey string) (*[]Image, error)

Types

type Image

type Image struct {
	TeamId    string    `edn:"atomist/team-id"`
	Digest    string    `edn:"docker.image/digest"`
	CreatedAt time.Time `edn:"docker.image/created-at"`
	Tags      []string  `edn:"docker.image/tags"`
	Tag       []struct {
		Name string `edn:"docker.tag/name"`
	} `edn:"docker.image/tag"`
	ManifestList []ManifestList `edn:"docker.image/manifest-list"`
	Repository   Repository     `edn:"docker.image/repository"`
	File         struct {
		Path string `edn:"git.file/path"`
	} `edn:"docker.image/file"`
	Commit struct {
		Sha  string `edn:"git.commit/sha"`
		Repo struct {
			Name string `edn:"git.repo/name"`
			Org  struct {
				Name string `edn:"git.org/name"`
			} `edn:"git.repo/org"`
		} `edn:"git.commit/repo"`
	} `edn:"docker.image/commit"`
	Report []Report `edn:"vulnerability.report/report"`
}

type ImageQueryResult added in v0.3.0

type ImageQueryResult struct {
	Query struct {
		Data [][]Image `edn:"data"`
	} `edn:"query"`
}

type IndexImage added in v0.3.0

type IndexImage struct {
	Digest    string    `json:"digest"`
	CreatedAt time.Time `json:"createdAt"`
	Platform  struct {
		Os      string `json:"os"`
		Arch    string `json:"arch"`
		Variant string `json:"variant"`
	} `json:"platform"`
	Layers []struct {
		Digest       string    `json:"digest"`
		Size         int       `json:"size"`
		LastModified time.Time `json:"lastModified"`
	} `json:"layers"`
	DigestChainId string `json:"digestChainId"`
	DiffIdChainId string `json:"diffIdChainId"`
}

type IndexManifestList added in v0.3.0

type IndexManifestList struct {
	Name   string       `json:"name"`
	Tags   []string     `json:"tags"`
	Digest string       `json:"digest"`
	Images []IndexImage `json:"images"`
}

type ManifestList

type ManifestList struct {
	Digest string `edn:"docker.manifest-list/digest"`
	Tags   []struct {
		Name string `edn:"docker.tag/name"`
	} `edn:"docker.manifest-list/tag"`
}

type Report

type Report struct {
	Critical    int64 `edn:"vulnerability.report/critical"`
	High        int64 `edn:"vulnerability.report/high"`
	Medium      int64 `edn:"vulnerability.report/medium"`
	Low         int64 `edn:"vulnerability.report/low"`
	Unspecified int64 `edn:"vulnerability.report/unspecified"`
}

type Repository added in v0.3.0

type Repository struct {
	Badge         string   `edn:"docker.repository/badge"`
	Host          string   `edn:"docker.repository/host"`
	Name          string   `edn:"docker.repository/name"`
	SupportedTags []string `edn:"docker.repository/supported-tags"`
}

func ForRepositoryInDb added in v0.3.0

func ForRepositoryInDb(repo string, workspace string, apiKey string) (*Repository, error)

type RepositoryQueryResult added in v0.3.0

type RepositoryQueryResult struct {
	Query struct {
		Data [][]Repository `edn:"data"`
	} `edn:"query"`
}

Jump to

Keyboard shortcuts

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