json

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	Name      string      `json:"name"`
	Version   string      `json:"version"`
	Type      string      `json:"type"`
	FoundBy   []string    `json:"foundBy"`
	Locations Locations   `json:"locations,omitempty"`
	Metadata  interface{} `json:"metadata,omitempty"`
}

func NewArtifact

func NewArtifact(p *pkg.Package, s scope.Scope) (Artifact, error)

type Document

type Document struct {
	Artifacts []Artifact `json:"artifacts"`
	Source    Source     `json:"source"`
}

func NewDocument

func NewDocument(catalog *pkg.Catalog, s scope.Scope) (Document, error)

type Image

type Image struct {
	Layers    []Layer  `json:"layers"`
	Size      int64    `json:"size"`
	Digest    string   `json:"digest"`
	MediaType string   `json:"mediaType"`
	Tags      []string `json:"tags"`
}

func NewImage

func NewImage(src scope.ImageSource) *Image

type ImageLocation

type ImageLocation struct {
	Path       string `json:"path"`
	LayerIndex uint   `json:"layerIndex"`
}

type Layer

type Layer struct {
	MediaType string `json:"mediaType"`
	Digest    string `json:"digest"`
	Size      int64  `json:"size"`
}

type Locations

type Locations interface{}

func NewLocations

func NewLocations(p *pkg.Package, s scope.Scope) (Locations, error)

type Presenter

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

func NewPresenter

func NewPresenter(catalog *pkg.Catalog, s scope.Scope) *Presenter

func (*Presenter) Present

func (pres *Presenter) Present(output io.Writer) error

type Source

type Source struct {
	Type   string      `json:"type"`
	Target interface{} `json:"target"`
}

func NewSource

func NewSource(s scope.Scope) (Source, error)

Jump to

Keyboard shortcuts

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