Documentation ¶
Index ¶
- func GetDigestFromCanonical(client *http.Client, image reference.Canonical) (digest.Digest, error)
- func GetDigestFromTagged(client *http.Client, image reference.NamedTagged) (digest.Digest, error)
- func NewConfigError(err error) error
- func NewConfigErrorWithRequest(status string, b []byte) error
- func NewManifestError(err error) error
- func NewManifestErrorWithRequest(status string, b []byte) error
- func RequestManifest(client *http.Client, ref reference.Canonical) (distribution.Manifest, error)
- type APIError
- type ImageConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDigestFromCanonical ¶
GetDigestFromCanonical gets an image's digest from the passed canonical image. Returns a digest.Digest, or an error.
func GetDigestFromTagged ¶
func GetDigestFromTagged(client *http.Client, image reference.NamedTagged) (digest.Digest, error)
GetDigestFromTagged gets an image's digest from the passed tag. Returns a digest.Digest, or an error.
func NewConfigError ¶
NewConfigError creates a new APIError specific to docker config requests. This version wraps the passed error.
func NewConfigErrorWithRequest ¶
NewConfigErrorWithRequest creates a new APIError specific to docker config requests. This version wraps the passed HTTP response.
func NewManifestError ¶
NewManifestError creates a new APIError specific to docker manifest requests. This version wraps the passed error.
func NewManifestErrorWithRequest ¶
NewManifestErrorWithRequest creates a new APIError specific to docker manifest requests. This version wraps the passed HTTP response.
func RequestManifest ¶
RequestManifest requests an Manifest for the passed canonical image reference (an image URL with a digest specifying the built image). Returns a schema2.Manifest, or an error if there's an issue.
Types ¶
type APIError ¶
type APIError struct {
// contains filtered or unexported fields
}
APIError is a generic error structure representing a docker API call error. It tracks the type of request that failed, and either wraps an error or contains the body of an API call.
type ImageConfig ¶
type ImageConfig interface { // RunsAsRoot returns true if the passed image will run as the root user. RunsAsRoot() bool }
ImageConfig represents an Docker image configuration. This presently just allows us to verify if an image runs as root or not.
func RequestImageConfig ¶
RequestImageConfig requests an image configuration from the server, based on the passed reference. Returns an ImageConfig or an error.