manifest

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ImageInRepo

func ImageInRepo(a string, list []string) bool

ImageInRepo checks whether an image exists in the repository

func RegistryCall

func RegistryCall(user, password, url, method, reqHeader string) (respBody []byte, header string, statusCode int)

RegistryCall represents a dynamic method of calling Docker Registry API V2

Types

type AllImages

type AllImages struct {
	Images []ImageData
}

AllImages is used to get all the images

func (*AllImages) AddImage

func (images *AllImages) AddImage(image ImageData)

AddImage is used to add images to a list

type ImageData

type ImageData struct {
	Name    string
	Created time.Time
	Tag     string
}

ImageData represents image object

type Manifest

type Manifest struct {
	SchemaVersion int    `json:"schemaVersion"`
	Name          string `json:"name"`
	Tag           string `json:"tag"`
	Architecture  string `json:"architecture"`
	FsLayers      []struct {
		BlobSum string `json:"blobSum"`
	} `json:"fsLayers"`
	History []struct {
		V1Compatibility string `json:"v1Compatibility"`
	} `json:"history"`
}

Manifest is used to map the response from Docker Registry API v2

type TagData

type TagData struct {
	Name      string
	Version   string
	CreatedAt time.Time
}

TagData represents only necessary fields from maniest

type V1Compatibility

type V1Compatibility struct {
	Architecture  string    `json:"architecture"`
	Created       time.Time `json:"created"`
	DockerVersion string    `json:"docker_version"`
	ID            string    `json:"id"`
	Os            string    `json:"os"`
}

V1Compatibility represents a field from Manifest struct

Jump to

Keyboard shortcuts

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