Documentation
¶
Index ¶
- type Annotations
- type AuthorizeFunc
- type Authorizer
- type AuthorizerToken
- type Client
- func (c *Client) GetAnnotations(ctx context.Context, image Reference, options *GetAnnotationsOptions) (Annotations, error)
- func (c *Client) GetBlob(ctx context.Context, image Reference, digest string) ([]byte, error)
- func (c *Client) GetManifest(ctx context.Context, image Reference, digest string) ([]byte, error)
- func (c *Client) GetManifests(ctx context.Context, image Reference) ([]Manifest, error)
- func (c *Client) GetTags(ctx context.Context, image Reference, options *GetTagsOptions) ([]string, error)
- func (c *Client) ReadBlob(ctx context.Context, image Reference, digest string) (io.ReadCloser, error)
- type DockerDistributionManifestListV2
- type DockerDistributionManifestV1
- type DockerDistributionManifestV2
- type GetAnnotationsOptions
- type GetTagsOptions
- type Manifest
- type OCIImageIndexV1
- type OCIImageManifestV1
- type Platform
- type Reference
- type TagsPage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Annotations ¶
func (Annotations) CreatedTime ¶ added in v0.13.0
func (a Annotations) CreatedTime() time.Time
func (Annotations) DocumentationURL ¶ added in v0.13.0
func (a Annotations) DocumentationURL() string
func (Annotations) Source ¶
func (a Annotations) Source() string
func (Annotations) URL ¶ added in v0.13.0
func (a Annotations) URL() string
type AuthorizeFunc ¶
func (AuthorizeFunc) AuthorizeOCIRequest ¶
type Authorizer ¶
type Client ¶
type Client struct {
Client *httputil.Client
Authorizer Authorizer
}
func (*Client) GetAnnotations ¶
func (c *Client) GetAnnotations(ctx context.Context, image Reference, options *GetAnnotationsOptions) (Annotations, error)
GetAnnotations tries to identify annotations for the image. Fetches manifests as necessary. To narrow down the search and to avoid unnecessary fetches, specify the available options.
func (*Client) GetManifest ¶
func (*Client) GetManifests ¶
TODO: Rewrite to return a ManifestList / ManifestIndex instead, which then contains the manifests. That way we can differentiate with the content types of actual manifests as returned by GetManifest...
type DockerDistributionManifestListV2 ¶
type DockerDistributionManifestListV2 struct {
// 2
SchemaVersion int `json:"schemaVersion"`
// application/vnd.docker.distribution.manifest.list.v2+json
MediaType string `json:"mediaType"`
Manifests []DockerDistributionManifestV2 `json:"manifests"`
}
type DockerDistributionManifestV1 ¶
type DockerDistributionManifestV1 struct {
// 1
SchemaVersion int `json:"schemaVersion"`
Name string `json:"name"`
Tag string `json:"tag"`
Architecture string `json:"architecture"`
}
application/vnd.docker.distribution.manifest.v1+prettyjws
type DockerDistributionManifestV2 ¶
type DockerDistributionManifestV2 struct {
// 2
SchemaVersion int `json:"schemaVersion"`
// application/vnd.docker.distribution.manifest.v2+json
MediaType string `json:"mediaType"`
Digest string `json:"digest"`
Platform struct {
Architecture string `json:"architecture"`
OS string `json:"os"`
Variant string `json:"variant"`
} `json:"platform"`
Size int `json:"size"`
}
type GetAnnotationsOptions ¶
type GetTagsOptions ¶
type Manifest ¶
type Manifest struct {
SchemaVersion int `json:"schemaVersion"`
MediaType string `json:"mediaType"`
// Annotations contains manifest / image annotations. Nil if none were found.
// Note the even if annotations were found at the top level, they might not
// match the annotations / label of the image itself.
Annotations Annotations `json:"annotations"`
Digest string `json:"digest"`
Platform *Platform `json:"platform,omitempty"`
}
type OCIImageIndexV1 ¶
type OCIImageIndexV1 struct {
// 2
SchemaVersion int `json:"schemaVersion"`
// application/vnd.oci.image.index.v1+json
MediaType string `json:"mediaType"`
Manifests []OCIImageManifestV1 `json:"manifests"`
}
type OCIImageManifestV1 ¶
type OCIImageManifestV1 struct {
// 2
SchemaVersion int `json:"schemaVersion"`
// application/vnd.oci.image.manifest.v1+json
MediaType string `json:"mediaType"`
Annotations map[string]string `json:"annotations"`
Digest string `json:"digest"`
Platform struct {
Architecture string `json:"architecture"`
OS string `json:"os"`
Variant string `json:"variant"`
} `json:"platform"`
}
type Reference ¶
type Reference struct {
Domain string
Path string
HasTag bool
Tag string
HasDigest bool
Digest string
}
func ParseReference ¶
func (Reference) MarshalJSON ¶
func (*Reference) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.