Documentation
¶
Index ¶
- type Builder
- func (b *Builder) BuildImage(ctx context.Context, contextPath, dockerfileName, tag string) error
- func (b *Builder) Close() error
- func (b *Builder) GetImageHistory(ctx context.Context, imageID string) ([]image.HistoryResponseItem, error)
- func (b *Builder) GetImageInfo(ctx context.Context, imageID string) (*image.InspectResponse, error)
- func (b *Builder) RemoveImage(ctx context.Context, imageID string) error
- type ConfigResponse
- type DockerAuthEntry
- type DockerConfig
- type ImageMetadata
- type LayerMetadata
- type ManifestListResponse
- type ManifestResponse
- type RegistryClient
- type TagInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder handles Docker image building operations
func (*Builder) BuildImage ¶
BuildImage builds a Docker image from the specified context
func (*Builder) GetImageHistory ¶ added in v0.1.2
func (b *Builder) GetImageHistory(ctx context.Context, imageID string) ([]image.HistoryResponseItem, error)
GetImageHistory retrieves the history of a Docker image
func (*Builder) GetImageInfo ¶ added in v0.1.2
GetImageInfo retrieves information about a Docker image
type ConfigResponse ¶ added in v0.3.0
type ConfigResponse struct {
Created time.Time `json:"created"`
Architecture string `json:"architecture"`
OS string `json:"os"`
History []struct {
Created time.Time `json:"created"`
CreatedBy string `json:"created_by"`
EmptyLayer bool `json:"empty_layer,omitempty"`
} `json:"history"`
RootFS struct {
Type string `json:"type"`
DiffIDs []string `json:"diff_ids"`
} `json:"rootfs"`
}
ConfigResponse represents the image config blob
type DockerAuthEntry ¶ added in v0.3.0
type DockerAuthEntry struct {
Auth string `json:"auth"` // base64(username:password)
}
DockerAuthEntry represents a single auth entry
type DockerConfig ¶ added in v0.3.0
type DockerConfig struct {
Auths map[string]DockerAuthEntry `json:"auths"`
CredsStore string `json:"credsStore,omitempty"`
}
DockerConfig represents ~/.docker/config.json structure
type ImageMetadata ¶ added in v0.3.0
type ImageMetadata struct {
Digest string `json:"digest"`
Size int64 `json:"size"`
Created time.Time `json:"created"`
LayerCount int `json:"layer_count"`
Layers []LayerMetadata `json:"layers"`
}
ImageMetadata holds metadata fetched from registry without pulling full image
type LayerMetadata ¶ added in v0.3.0
type LayerMetadata struct {
Digest string `json:"digest"`
Size int64 `json:"size"`
SizeMB float64 `json:"size_mb"`
CreatedBy string `json:"created_by"`
Empty bool `json:"empty"`
}
LayerMetadata holds layer information from registry
type ManifestListResponse ¶ added in v0.3.0
type ManifestListResponse struct {
SchemaVersion int `json:"schemaVersion"`
MediaType string `json:"mediaType"`
Manifests []struct {
MediaType string `json:"mediaType"`
Size int64 `json:"size"`
Digest string `json:"digest"`
Platform struct {
Architecture string `json:"architecture"`
OS string `json:"os"`
Variant string `json:"variant,omitempty"`
} `json:"platform"`
} `json:"manifests"`
}
ManifestListResponse represents a multi-arch manifest list
type ManifestResponse ¶ added in v0.3.0
type ManifestResponse struct {
SchemaVersion int `json:"schemaVersion"`
MediaType string `json:"mediaType"`
Config struct {
MediaType string `json:"mediaType"`
Size int64 `json:"size"`
Digest string `json:"digest"`
} `json:"config"`
Layers []struct {
MediaType string `json:"mediaType"`
Size int64 `json:"size"`
Digest string `json:"digest"`
} `json:"layers"`
}
ManifestResponse represents the OCI/Docker manifest
type RegistryClient ¶ added in v0.3.0
type RegistryClient struct {
// contains filtered or unexported fields
}
RegistryClient handles communication with container registries
func NewRegistryClient ¶ added in v0.3.0
func NewRegistryClient() *RegistryClient
NewRegistryClient creates a new registry client
func (*RegistryClient) GetImageMetadata ¶ added in v0.3.0
func (rc *RegistryClient) GetImageMetadata(ctx context.Context, imageName, tag, platform string) (*ImageMetadata, error)
GetImageMetadata fetches image metadata from registry without pulling the full image