Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ActiveRegistries map[string]Registry
ActiveRegistries contains a map of all active registries identified by their name
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 GetRegistryStatus ¶
GetRegistryStatus 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 History []History `json:"history"` FsLayers []struct { BlobSum string `json:"blobSum"` } `json:"fsLayers"` }
Image contains all information related to the image
type Registry ¶
Registry contains all identifying information for communicating with a registry
func ParseRegistry ¶
ParseRegistry takes in a registry URI string and converts it into a registry object
type RepositoriesList ¶
type RepositoriesList struct {
Repositories []string
}
RepositoriesList contains a slice of all repositories
func GetRepositoriesFromRegistry ¶
func GetRepositoriesFromRegistry(registryName string) (RepositoriesList, error)
GetRepositoriesFromRegistry returns a slice of repositories for this registry name
type Repository ¶
Repository contains information on the name and encoded name
func GetRepositories ¶
func GetRepositories(registryName string) []Repository
GetRepositories returns a slice of repositories with their names and encoded names
type TagForView ¶
type Tags ¶
Tags contains a slice of tags for the given repository https://github.com/docker/distribution/blob/master/docs/spec/api.md#listing-image-tags
type TagsForView ¶
type TagsForView []TagForView
TagsForView contains a slice of TagsForView with the methods required to sort
func GetTagsForView ¶
func GetTagsForView(registryName string, repositoryName string) (TagsForView, error)
GetTagsForView returns the sanitized tag structs with the required information for the tags template
func (TagsForView) Len ¶
func (slice TagsForView) Len() int
func (TagsForView) Less ¶
func (slice TagsForView) Less(i, j int) bool
func (TagsForView) Swap ¶
func (slice TagsForView) Swap(i, j int)
type V1Compatibility ¶
type V1Compatibility struct { ID string `json:"id"` 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"` 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