Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteTag ¶
DeleteTag deletes the tag by first getting its docker-content-digest, and then using the digest received the function deletes the manifest
Documentation: DELETE /v2/<name>/manifests/<reference> Manifest Delete the manifest identified by name and reference. Note that a manifest can only be deleted by digest.
func GetRepositories ¶
GetRepositories returns a slice of repositories for the passed registry name
func GetTags ¶
GetTags returns a slice of tags for a given repository and registry https://github.com/docker/distribution/blob/master/docs/spec/api.md#listing-image-tags
func HealthCheck ¶
HealthCheck takes in a registry URL and checks for communication errors
Create and execute basic GET request to test if each registry can be reached To determine registry status we test the base registry route of /v2/ and check the HTTP response code for a 200 response (200 is a successful request)
Types ¶
type History ¶
type History struct { V1CompatibilityStr string `json:"V1Compatibility"` V1Compatibility V1Compatibility }
History contains the v1 compatibility string and marshaled json
type Image ¶
type Image struct { Name string Tag string SchemaVersion int Architecture string TagID uint ContainsV1Size bool History []History `json:"history"` FsLayers []struct { BlobSum string `json:"blobSum"` Size int64 `json:"-"` SizeStr string `json:"-"` } `json:"fsLayers"` }
Image contains all information related to the image
type V1Compatibility ¶
type V1Compatibility struct { ID string `json:"id"` IDShort string `json:"-"` Parent string `json:"parent"` Created time.Time `json:"created"` Container string `json:"container"` ContainerConfig struct { Hostname string `json:"Hostname"` Domainname string `json:"Domainname"` User string `json:"User"` AttachStdin bool `json:"AttachStdin"` AttachStdout bool `json:"AttachStdout"` AttachStderr bool `json:"AttachStderr"` ExposedPorts interface{} `json:"ExposedPorts"` PublishService string `json:"PublishService"` Tty bool `json:"Tty"` OpenStdin bool `json:"OpenStdin"` StdinOnce bool `json:"StdinOnce"` Env []string `json:"Env"` Cmd []string `json:"Cmd"` CmdClean string `json:"-"` Image string `json:"Image"` Volumes interface{} `json:"Volumes"` VolumeDriver string `json:"VolumeDriver"` WorkingDir string `json:"WorkingDir"` Entrypoint interface{} `json:"Entrypoint"` NetworkDisabled bool `json:"NetworkDisabled"` MacAddress string `json:"MacAddress"` OnBuild []interface{} `json:"OnBuild"` Labels struct { } `json:"Labels"` } `json:"container_config"` DockerVersion string `json:"docker_version"` Config struct { Hostname string `json:"Hostname"` Domainname string `json:"Domainname"` User string `json:"User"` AttachStdin bool `json:"AttachStdin"` AttachStdout bool `json:"AttachStdout"` AttachStderr bool `json:"AttachStderr"` ExposedPorts interface{} `json:"ExposedPorts"` PublishService string `json:"PublishService"` Tty bool `json:"Tty"` OpenStdin bool `json:"OpenStdin"` StdinOnce bool `json:"StdinOnce"` Env []string `json:"Env"` Cmd []string `json:"Cmd"` Image string `json:"Image"` Volumes interface{} `json:"Volumes"` VolumeDriver string `json:"VolumeDriver"` WorkingDir string `json:"WorkingDir"` Entrypoint interface{} `json:"Entrypoint"` NetworkDisabled bool `json:"NetworkDisabled"` MacAddress string `json:"MacAddress"` OnBuild []interface{} `json:"OnBuild"` Labels struct { } `json:"Labels"` } `json:"config"` Architecture string `json:"architecture"` Os string `json:"os"` Size int `json:"Size"` SizeStr string `json:"-"` }
V1Compatibility contains all information grabbed from the V1Compatibility field from registry v1