Documentation
¶
Index ¶
- Constants
- Variables
- func SetAuthToken(token string)
- func SetHttpRetry(retry int)
- func SetHttpTimeout(timeout int)
- func SetUserAgent(ua string)
- type AddAuthTransport
- type AddUserAgentTransport
- type CatalogEndpointResponse
- type HistoryEntry
- type Image
- type Manifest
- type Server
- func (s *Server) Dump(logger *slog.Logger, path string, manifestOnly bool, failCount int32, ...) error
- func (s *Server) FetchImagesAndTags(logger *slog.Logger, parallel int) error
- func (s *Server) FetchTags(image *Image) error
- func (s *Server) GetService() string
- func (s *Server) GetUrl() string
- func (s *Server) Ping() error
- type Tag
- type TagListingEndpointResponse
Constants ¶
View Source
const ( PING_ENDPOINT = "v2/" CATALOG_ENDPOINT = "v2/_catalog" TAG_LISTING_ENDPOINT = "v2/%s/tags/list" MANIFEST_ENDPOINT = "v2/%s/manifests/%s" PATCH_SUFFIX = "patched" )
Variables ¶
View Source
var COMMAND_TEMPLATE = `` /* 128-byte string literal not displayed */
View Source
var EMPTY_STARTER = `` /* 134-byte string literal not displayed */
View Source
var ENTRYPOINT_COMMAND_TEMPLATE = `` /* 146-byte string literal not displayed */
View Source
var ENTRYPOINT_TEMPLATE = `` /* 136-byte string literal not displayed */
Functions ¶
Types ¶
type AddAuthTransport ¶
type AddAuthTransport struct { T http.RoundTripper // contains filtered or unexported fields }
AddAuthTransport is a transport that adds an auth token to the request
func NewAddAuth ¶
func NewAddAuth(T http.RoundTripper, auth string) *AddAuthTransport
type AddUserAgentTransport ¶
type AddUserAgentTransport struct { T http.RoundTripper // contains filtered or unexported fields }
AddUserAgentTransport is a transport that adds a user agent to the request
func NewUserAgentTransport ¶
func NewUserAgentTransport(T http.RoundTripper, ua string) *AddUserAgentTransport
type CatalogEndpointResponse ¶
type CatalogEndpointResponse struct {
Repositories []string `json:"repositories,omitempty"`
}
type HistoryEntry ¶
type HistoryEntry struct { Architecture string `json:"architecture,omitempty"` Config struct { Hostname string `json:"Hostname,omitempty"` Domainname string `json:"Domainname,omitempty"` User string `json:"User,omitempty"` AttachStdin bool `json:"AttachStdin,omitempty"` AttachStdout bool `json:"AttachStdout,omitempty"` AttachStderr bool `json:"AttachStderr,omitempty"` Digest string `json:"Digest,omitempty"` Tty bool `json:"Tty,omitempty"` OpenStdin bool `json:"OpenStdin,omitempty"` StdinOnce bool `json:"StdinOnce,omitempty"` Env []string `json:"Env,omitempty"` Cmd []string `json:"Cmd,omitempty"` Image string `json:"Image,omitempty"` Volumes interface{} `json:"Volumes,omitempty"` WorkingDir string `json:"WorkingDir,omitempty"` Entrypoint []string `json:"Entrypoint,omitempty"` OnBuild interface{} `json:"OnBuild,omitempty"` Labels struct { OrgOpencontainersImageRefName string `json:"org.opencontainers.image.ref.name,omitempty"` OrgOpencontainersImageVersion string `json:"org.opencontainers.image.version,omitempty"` } `json:"Labels,omitempty"` } `json:"config,omitempty"` Container string `json:"container,omitempty"` ContainerConfig struct { Hostname string `json:"Hostname,omitempty"` Domainname string `json:"Domainname,omitempty"` User string `json:"User,omitempty"` AttachStdin bool `json:"AttachStdin,omitempty"` AttachStdout bool `json:"AttachStdout,omitempty"` AttachStderr bool `json:"AttachStderr,omitempty"` Tty bool `json:"Tty,omitempty"` OpenStdin bool `json:"OpenStdin,omitempty"` StdinOnce bool `json:"StdinOnce,omitempty"` Env []string `json:"Env,omitempty"` Cmd []string `json:"Cmd,omitempty"` Image string `json:"Image,omitempty"` Volumes interface{} `json:"Volumes,omitempty"` WorkingDir string `json:"WorkingDir,omitempty"` Entrypoint interface{} `json:"Entrypoint,omitempty"` OnBuild interface{} `json:"OnBuild,omitempty"` Labels struct { OrgOpencontainersImageRefName string `json:"org.opencontainers.image.ref.name,omitempty"` OrgOpencontainersImageVersion string `json:"org.opencontainers.image.version,omitempty"` } `json:"Labels,omitempty"` } `json:"container_config,omitempty"` Created string `json:"created,omitempty"` DockerVersion string `json:"docker_version,omitempty"` ID string `json:"id,omitempty"` OS string `json:"os,omitempty"` Parent string `json:"parent,omitempty"` Throwaway bool `json:"throwaway,omitempty"` Variant string `json:"variant,omitempty"` }
func (*HistoryEntry) Clone ¶
func (h *HistoryEntry) Clone() *HistoryEntry
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"` HistoryEntry *HistoryEntry } `json:"history"` Signatures []struct { Header struct { Jwk struct { Crv string `json:"crv"` Kid string `json:"kid"` Kty string `json:"kty"` X string `json:"x"` Y string `json:"y"` } `json:"jwk"` Alg string `json:"alg"` } `json:"header"` Signature string `json:"signature"` Protected string `json:"protected"` } `json:"signatures"` }
func (*Manifest) ParseHistoryEntries ¶
func (m *Manifest) ParseHistoryEntries() ([]*HistoryEntry, error)
ParseHistoryEntry parses the V1Compatibility field of a history entry
type Server ¶
type Server struct { Address string Images []Image Protocol string Port string // contains filtered or unexported fields }
func (*Server) Dump ¶
func (s *Server) Dump(logger *slog.Logger, path string, manifestOnly bool, failCount int32, parallel int) error
Dump downloads the image from the registry to the local machine by fetching the manifest for each image and tag combination and then downloading the layers This is a simplified version of the Docker pull command
func (*Server) FetchImagesAndTags ¶
FetchImagesAndTags returns a list of images from the registry server
func (*Server) GetService ¶
type TagListingEndpointResponse ¶
type TagListingEndpointResponse struct {
Tags []string `json:"tags"`
}
Click to show internal directories.
Click to hide internal directories.