{"modulePath":"github.com/mintoolkit/mint","version":"v0.0.0-20261102071007-1bc8c79add0d","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package dockerimage\n\n## Constants\n\n```go\nconst (\n\tFormatUnknown   ImageFormatType = \"unknown\"\n\tFormatDockerV1                  = \"docker.v1\"\n\tFormatDockerOCI                 = \"docker.oci\"\n\tFormatOCI                       = \"oci\"\n)\n```\n\n```go\nconst (\n\tContentTypeUTF8   = \"utf8\"\n\tContentTypeBinary = \"binary\"\n)\n```\n\n```go\nconst (\n\tDockerManifestLayersLocation = \"ll.dm.layers\"\n\tOCIImageManifestLocation     = \"ll.oci.imagemanifest\"\n)\n```\n\n```go\nconst (\n\tOSLinux   = \"linux\"\n\tDefaultOS = OSLinux\n\n\tArchARM     = \"arm\"\n\tArchARM64   = \"arm64\"\n\tArchAMD64   = \"amd64\"\n\tDefaultArch = ArchAMD64\n)\n```\npkg/system/architecture.go has architecture enums, but the enums are not always identical\n\n```go\nconst (\n\tDirType        = \"dir\"\n\tFileType       = \"file\"\n\tSymlinkType    = \"symlink\"\n\tHardlinkType   = \"hardlink\"\n\tOtherType      = \"other\"\n\tUnknownType    = \"unknown\"\n\tUnexpectedType = \"unexpected\"\n)\n```\n\n```go\nconst CDMDumpToConsole = \"console\"\n```\n\n```go\nconst MediaTypeDockerSchema2LayerGzip = \"application/vnd.docker.image.rootfs.diff.tar.gzip\"\n```\nMediaTypeDockerSchema2LayerGzip is the layer media type used by Docker schema2 manifests\n\n```go\nconst TypeLayers = \"layers\"\n```\n\n```go\nconst WhiteoutLinkDir = WhiteoutMetaPrefix + \"plnk\"\n```\nWhiteoutLinkDir is a directory AUFS uses for storing hardlink links to other layers. Normally these should not go into exported archives and all changed hardlinks should be copied to the top layer.\n\n```go\nconst WhiteoutMetaPrefix = WhiteoutPrefix + WhiteoutPrefix\n```\nWhiteoutMetaPrefix prefix means whiteout has a special meaning and is not for removing an actual file. Normally these files are excluded from exported archives.\n\n```go\nconst WhiteoutOpaqueDir = WhiteoutMetaPrefix + \".opq\"\n```\nWhiteoutOpaqueDir file means directory has been made opaque - meaning readdir calls to this directory do not follow to lower layers.\n\n```go\nconst WhiteoutPrefix = \".wh.\"\n```\nWhiteoutPrefix prefix means file is a whiteout. If this is followed by a filename this means that file has been removed from the base layer.\n\n## Variables\n\n```go\nvar ArchVarMap = map[string][]string{\n\tArchARM:   {\"\", \"v6\", \"v7\", \"v8\"},\n\tArchARM64: {\"\", \"v8\"},\n\tArchAMD64: {\"\"},\n}\n```\n\n```go\nvar OSArchMap = map[string][]string{\n\tOSLinux: {\n\t\t\"386\",\n\t\tArchAMD64,\n\t\tArchARM,\n\t\tArchARM64,\n\t\t\"ppc64\",\n\t\t\"ppc64le\",\n\t\t\"mips64\",\n\t\t\"mips64le\",\n\t\t\"s390x\",\n\t\t\"riscv64\"},\n}\n```\n\n## Functions\n\n```go\nfunc DefaultRuntimeArch() string\n```\n\n```go\nfunc FileDataFromTar(tarPath, filePath string) ([]byte, error)\n```\n\n```go\nfunc FileReaderFromTar(tarPath, filePath string) (io.ReadCloser, error)\n```\n\n```go\nfunc IsDeletedFileObject(path string) bool\n```\n\n```go\nfunc IsLayerMediaType(value types.MediaType) bool\n```\n\n```go\nfunc IsValidArchitecture(arch string, variant string) bool\n```\n\n```go\nfunc IsValidPlatform(os string, arch string) bool\n```\n\n```go\nfunc NormalizeFileObjectLayerPath(path string) (string, bool, bool, error)\n```\n\n```go\nfunc ObjectTypeFromTarType(flag byte) string\n```\n\n```go\nfunc TarHeaderTypeName(flag byte) string\n```\n\n## Types\n\n```go\ntype ArchiveInfo struct {\n\tImageID  string\n\tRepoTags []string\n}\n```\nArchiveInfo contains basic information extracted from an image archive\n\n```go\nfunc GetArchiveInfo(archivePath string) (*ArchiveInfo, error)\n```\nGetArchiveInfo extracts basic image information from a Docker image archive by reading the manifest.json file, falling back to the OCI index for pure OCI layout archives (e.g., 'docker buildx --output type=oci'). This is useful when you have an archive but don't have the image ID.\n\n```go\ntype BlobDescriptor struct {\n\tMediaType string `json:\"mediaType,omitempty\"`\n\tSize      int64  `json:\"size,omitempty\"`\n\tDigest    string `json:\"digest,omitempty\"`\n\n\t// extra fields\n\tAnnotations map[string]string `json:\"annotations,omitempty\"`\n\tURLs        []string          `json:\"urls,omitempty\"`\n\tPlatform    *Platform         `json:\"platform,omitempty\"`\n}\n```\n\n```go\ntype BuildKitBuildInfo struct {\n\t// Frontend defines the frontend used to build.\n\tFrontend string `json:\"frontend,omitempty\"`\n\t// Attrs defines build request attributes.\n\tAttrs map[string]*string `json:\"attrs,omitempty\"`\n\t// Sources defines build dependencies.\n\tSources []*BuildSource `json:\"sources,omitempty\"`\n\t// Deps defines context dependencies.\n\tDeps map[string]BuildKitBuildInfo `json:\"deps,omitempty\"`\n}\n```\n\n```go\ntype BuildSource struct {\n\t// Type defines the SourceType source type (docker-image, git, http).\n\tType SourceType `json:\"type,omitempty\"`\n\t// Ref is the reference of the source.\n\tRef string `json:\"ref,omitempty\"`\n\t// Alias is a special field used to match with the actual source ref\n\t// because frontend might have already transformed a string user typed\n\t// before generating LLB.\n\tAlias string `json:\"alias,omitempty\"`\n\t// Pin is the source digest.\n\tPin string `json:\"pin,omitempty\"`\n}\n```\n\n```go\ntype CertsInfo struct {\n\tBundles         []string          `json:\"bundles,omitempty\"`\n\tFiles           []string          `json:\"files,omitempty\"`\n\tLinks           map[string]string `json:\"links,omitempty\"`\n\tHashes          map[string]string `json:\"hashes,omitempty\"`\n\tPrivateKeys     []string          `json:\"private_keys,omitempty\"`\n\tPrivateKeyLinks map[string]string `json:\"private_key_links,omitempty\"`\n}\n```\n\n```go\ntype CertsRefInfo struct {\n\tBundles         map[string]struct{} `json:\"bundles,omitempty\"`\n\tFiles           map[string]struct{} `json:\"files,omitempty\"`\n\tLinks           map[string]string   `json:\"links,omitempty\"`\n\tHashes          map[string]string   `json:\"hashes,omitempty\"`\n\tPrivateKeys     map[string]struct{} `json:\"private_keys,omitempty\"`\n\tPrivateKeyLinks map[string]string   `json:\"private_key_links,omitempty\"`\n}\n```\n\n```go\ntype ChangeDataHashMatcher struct {\n\tDump        bool\n\tDumpConsole bool\n\tDumpDir     string\n\tHash        string //lowercase\n}\n```\n\n```go\ntype ChangeDataMatcher struct {\n\tDump        bool\n\tDumpConsole bool\n\tDumpDir     string\n\tPathPattern string\n\tDataPattern string\n\tMatcher     *regexp.Regexp\n}\n```\n\n```go\ntype ChangeInfo struct {\n\tLayer  int             `json:\"layer\"`\n\tObject *ObjectMetadata `json:\"-\"`\n}\n```\n\n```go\ntype ChangePathMatcher struct {\n\tDump        bool\n\tDumpConsole bool\n\tDumpDir     string\n\tPathPattern string\n}\n```\n\n```go\ntype ChangeType int\n```\n\n```go\nconst (\n\tChangeUnknown ChangeType = iota\n\tChangeDelete\n\tChangeAdd\n\tChangeModify\n)\n```\n\n```go\nfunc (ct ChangeType) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (ct ChangeType) String() string\n```\n\n```go\nfunc (ct *ChangeType) UnmarshalJSON(b []byte) error\n```\n\n```go\ntype Changeset struct {\n\tDeleted           []int\n\tDeletedDirContent []int\n\tAdded             []int\n\tModified          []int\n}\n```\n\n```go\ntype ChangesetSummary struct {\n\tDeleted  uint64 `json:\"deleted\"`\n\tAdded    uint64 `json:\"added\"`\n\tModified uint64 `json:\"modified\"`\n}\n```\n\n```go\ntype ConfigObject struct {\n\tV1ConfigObject\n\tParent     string     `json:\"parent,omitempty\"` //nolint:govet\n\tRootFS     *RootFS    `json:\"rootfs,omitempty\"`\n\tHistory    []XHistory `json:\"history,omitempty\"`\n\tOSVersion  string     `json:\"os.version,omitempty\"`\n\tOSFeatures []string   `json:\"os.features,omitempty\"`\n\n\t//buildkit build info\n\tBuildInfoRaw     string `json:\"moby.buildkit.buildinfo.v1,omitempty\"`\n\tBuildInfoDecoded *BuildKitBuildInfo\n}\n```\n\n```go\nfunc LoadConfigObject(archivePath, imageID string) (*ConfigObject, error)\n```\n\n```go\ntype ContainerConfig struct {\n\tHostname        string              // Hostname\n\tDomainname      string              // Domainname\n\tUser            string              // User that will run the command(s) inside the container, also support user:group\n\tAttachStdin     bool                // Attach the standard input, makes possible user interaction\n\tAttachStdout    bool                // Attach the standard output\n\tAttachStderr    bool                // Attach the standard error\n\tExposedPorts    map[string]struct{} `json:\",omitempty\"` // List of exposed ports\n\tTty             bool                // Attach standard streams to a tty, including stdin if it is not closed.\n\tOpenStdin       bool                // Open stdin\n\tStdinOnce       bool                // If true, close stdin after the 1 attached client disconnects.\n\tEnv             []string            // List of environment variable to set in the container\n\tCmd             []string            // Command to run when starting the container\n\tHealthcheck     *HealthConfig       `json:\",omitempty\"` // Healthcheck describes how to check the container is healthy\n\tArgsEscaped     bool                `json:\",omitempty\"` // True if command is already escaped (meaning treat as a command line) (Windows specific).\n\tImage           string              // Name of the image as it was passed by the operator (e.g. could be symbolic)\n\tVolumes         map[string]struct{} // List of volumes (mounts) used for the container\n\tWorkingDir      string              // Current directory (PWD) in the command will be launched\n\tEntrypoint      []string            // Entrypoint to run when starting the container\n\tNetworkDisabled bool                `json:\",omitempty\"` // Is network disabled\n\tMacAddress      string              `json:\",omitempty\"` // Mac Address of the container\n\tOnBuild         []string            // ONBUILD metadata that were defined on the image Dockerfile\n\tLabels          map[string]string   // List of labels set to this container\n\tStopSignal      string              `json:\",omitempty\"` // Signal to stop a container\n\tStopTimeout     *int                `json:\",omitempty\"` // Timeout (in seconds) to stop a container\n\tShell           []string            `json:\",omitempty\"` // Shell for shell-form of RUN, CMD, ENTRYPOINT\n}\n```\n\n```go\ntype DetectOpParam struct {\n\t/// Operation is enabled\n\tEnabled bool\n\t/// Dump/save raw data\n\tDumpRaw bool\n\t/// Dump raw data to console\n\tIsConsoleOut bool\n\t/// Dump raw data to directory (otherwise save to an archive file)\n\tIsDirOut bool\n\t/// Output path (directory or archive path)\n\tOutputPath string\n\t/// Input parameters for the operation\n\tInputParams map[string]string\n}\n```\n\n```go\ntype DockerManifestObject struct {\n\t// v1 format:  \"IMAGE_ID.json\" (no sha256 prefix in IMAGE_ID)\n\t// oci format: \"blobs/sha256/DIGEST_NO_PREFIX\"\n\tConfig   string\n\tRepoTags []string `json:\",omitempty\"` //[\"user/repo:tag\"]\n\t// v1 format:  \"LAYER_ID/layer.tar\" (no sha256 prefix in LAYER_ID)\n\t// oci format: \"blobs/sha256/DIGEST\" (no sha256 prefix in DIGEST)\n\tLayers []string\n\n\tParent string `json:\",omitempty\"`\n\t// DiffID map (where DiffID does have the \"sha256:\" prefix)\n\tLayerSources map[string]BlobDescriptor `json:\",omitempty\"`\n}\n```\nv1 and oci-based Manifest structure is the same\\* / compatible but config and layer paths are different\n\n```go\nfunc LoadManifestObject(archivePath, imageID string) (*DockerManifestObject, error)\n```\n\n```go\ntype DuplicateFilesReport struct {\n\tFileCount   uint64         `json:\"file_count\"`\n\tFileSize    uint64         `json:\"file_size\"`\n\tAllFileSize uint64         `json:\"all_file_size\"`\n\tWastedSize  uint64         `json:\"wasted_size\"`\n\tFiles       map[string]int `json:\"files\"`\n}\n```\n\n```go\ntype FileMetadata struct {\n\tType       string      `json:\"type,omitempty\"`\n\tIsDir      bool        `json:\"is_dir,omitempty\"`\n\tIsDelete   bool        `json:\"is_delete,omitempty\"`\n\tIsOpq      bool        `json:\"is_opq,omitempty\"`\n\tName       string      `json:\"name,omitempty\"`\n\tRawName    string      `json:\"raw_name,omitempty\"`\n\tSize       int64       `json:\"size,omitempty\"`\n\tMode       os.FileMode `json:\"mode,omitempty\"`\n\tUID        int         `json:\"uid\"`\n\tGID        int         `json:\"gid\"`\n\tModTime    time.Time   `json:\"mod_time,omitempty\"`\n\tChangeTime time.Time   `json:\"change_time,omitempty\"`\n}\n```\n\n```go\ntype FileSelector struct {\n\tType              FileSelectorType\n\tKey               string\n\tIndexKey          int\n\tIndexEndKey       int\n\tReverseIndexRange bool\n\tRawNames          bool\n\tNoDirs            bool\n\tDeleted           bool\n}\n```\n\n```go\ntype FileSelectorType string\n```\n\n```go\nconst (\n\tFSTAll        FileSelectorType = \"fst.all\"\n\tFSTDigest     FileSelectorType = \"fst.digest\"\n\tFSTDiffID     FileSelectorType = \"fst.diffid\"\n\tFSTIndex      FileSelectorType = \"fst.index\"\n\tFSTIndexRange FileSelectorType = \"fst.index.range\"\n)\n```\n\n```go\ntype HealthConfig struct {\n\t// Test is the test to perform to check that the container is healthy.\n\t// An empty slice means to inherit the default.\n\t// The options are:\n\t// {} : inherit healthcheck\n\t// {\"NONE\"} : disable healthcheck\n\t// {\"CMD\", args...} : exec arguments directly\n\t// {\"CMD-SHELL\", command} : run command with system's default shell\n\tTest []string `json:\",omitempty\"`\n\n\t// Zero means to inherit. Durations are expressed as integer nanoseconds.\n\tInterval    time.Duration `json:\",omitempty\"` // Interval is the time to wait between checks.\n\tTimeout     time.Duration `json:\",omitempty\"` // Timeout is the time to wait before considering the check to have hung.\n\tStartPeriod time.Duration `json:\",omitempty\"` // The start period for the container to initialize before the retries starts to count down.\n\n\t// Retries is the number of consecutive failures needed to consider a container as unhealthy.\n\t// Zero means inherit.\n\tRetries int `json:\",omitempty\"`\n}\n```\n\n```go\ntype ImageFormatType string\n```\n\n```go\ntype ImageReport struct {\n\tStats        PackageStats                     `json:\"stats\"`\n\tDuplicates   map[string]*DuplicateFilesReport `json:\"duplicates,omitempty\"`\n\tSpecialPerms *SpecialPermsInfo                `json:\"special_perms,omitempty\"`\n\tOSShells     []*system.OSShell                `json:\"shells,omitempty\"`\n\tCerts        CertsInfo                        `json:\"certs\"`\n\tCACerts      CertsInfo                        `json:\"ca_certs\"`\n\tBuildInfo    *BuildKitBuildInfo               `json:\"build_info,omitempty\"`\n\tIdentities   *sysidentity.Report              `json:\"identities,omitempty\"`\n}\n```\n\n```go\ntype InstructionSummary struct {\n\tIndex      int    `json:\"index\"`\n\tImageIndex int    `json:\"image_index\"`\n\tType       string `json:\"type\"`\n\tAll        string `json:\"all\"`\n\tSnippet    string `json:\"snippet\"`\n}\n```\n\n```go\ntype Layer struct {\n\tID                  string\n\tIndex               int\n\tPath                string\n\tLayerDataSource     string\n\tMetadataChangesOnly bool\n\tFSDiffID            string\n\tStats               LayerStats\n\tChanges             Changeset\n\tObjects             []*ObjectMetadata\n\tReferences          map[string]*ObjectMetadata\n\tTop                 TopObjects\n\tDistro              *system.DistroInfo\n\tDataMatches         map[string][]*ChangeDataMatcher   //object.Name -\u003e matched CDM\n\tDataHashMatches     map[string]*ChangeDataHashMatcher //object.Name -\u003e matched CDHM\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc LoadLayer(archivePath, imageID, layerID string) (*Layer, error)\n```\n\n```go\nfunc (ref *Layer) HasMatches() bool\n```\n\n```go\ntype LayerFiles struct {\n\tLayer *LayerMetadata  `json:\"layer\"`\n\tFiles []*FileMetadata `json:\"files\"`\n}\n```\n\n```go\ntype LayerLocation struct {\n\tPosition int\n\tPath     string\n\tLayerID  string\n}\n```\n\n```go\ntype LayerLocationSource string\n```\n\n```go\ntype LayerMetadata struct {\n\tIndex     int    `json:\"index,omitempty\"`\n\tDigest    string `json:\"digest,omitempty\"`\n\tDiffID    string `json:\"diff_id,omitempty\"`\n\tMediaType string `json:\"media_type,omitempty\"`\n\tSize      int64  `json:\"size,omitempty\"`\n}\n```\n\n```go\ntype LayerReport struct {\n\tID                  string                `json:\"id\"`\n\tIndex               int                   `json:\"index\"`\n\tPath                string                `json:\"path,omitempty\"`\n\tLayerDataSource     string                `json:\"layer_data_source,omitempty\"`\n\tMetadataChangesOnly bool                  `json:\"metadata_changes_only,omitempty\"`\n\tFSDiffID            string                `json:\"fsdiff_id,omitempty\"`\n\tStats               LayerStats            `json:\"stats\"`\n\tChanges             ChangesetSummary      `json:\"changes\"`\n\tTop                 []*ObjectMetadata     `json:\"top\"`\n\tDeleted             []*ObjectMetadata     `json:\"deleted,omitempty\"`\n\tAdded               []*ObjectMetadata     `json:\"added,omitempty\"`\n\tModified            []*ObjectMetadata     `json:\"modified,omitempty\"`\n\tChangeInstruction   *InstructionSummary   `json:\"change_instruction,omitempty\"`\n\tOtherInstructions   []*InstructionSummary `json:\"other_instructions,omitempty\"`\n}\n```\n\n```go\ntype LayerStats struct {\n\t//BlobSize         uint64 `json:\"blob_size\"`\n\tAllSize                uint64 `json:\"all_size\"`\n\tObjectCount            uint64 `json:\"object_count\"`\n\tDirCount               uint64 `json:\"dir_count\"`\n\tFileCount              uint64 `json:\"file_count\"`\n\tLinkCount              uint64 `json:\"link_count\"`\n\tMaxFileSize            uint64 `json:\"max_file_size\"`\n\tMaxDirSize             uint64 `json:\"max_dir_size\"`\n\tDeletedCount           uint64 `json:\"deleted_count\"`\n\tDeletedDirContentCount uint64 `json:\"deleted_dir_content_count\"`\n\tDeletedDirCount        uint64 `json:\"deleted_dir_count\"`\n\tDeletedFileCount       uint64 `json:\"deleted_file_count\"`\n\tDeletedLinkCount       uint64 `json:\"deleted_link_count\"`\n\tDeletedSize            uint64 `json:\"deleted_size\"`\n\tAddedSize              uint64 `json:\"added_size\"`\n\tModifiedSize           uint64 `json:\"modified_size\"`\n\tUTF8Count              uint64 `json:\"utf8_count,omitempty\"`\n\tUTF8Size               uint64 `json:\"utf8_size,omitempty\"`\n\tUTF8SizeHuman          string `json:\"utf8_size_human,omitempty\"`\n\tBinaryCount            uint64 `json:\"binary_count,omitempty\"`\n\tBinarySize             uint64 `json:\"binary_size,omitempty\"`\n\tBinarySizeHuman        string `json:\"binary_size_human,omitempty\"`\n\tSetuidCount            uint64 `json:\"setuid_count,omitempty\"`\n\tSetgidCount            uint64 `json:\"setgid_count,omitempty\"`\n\tStickyCount            uint64 `json:\"sticky_count,omitempty\"`\n}\n```\n\n```go\ntype OCILayout struct {\n\tVersion string `json:\"imageLayoutVersion\"`\n}\n```\n\n```go\ntype ObjectHistory struct {\n\tAdd      *ChangeInfo   `json:\"A,omitempty\"`\n\tModifies []*ChangeInfo `json:\"M,omitempty\"`\n\tDelete   *ChangeInfo   `json:\"D,omitempty\"`\n}\n```\n\n```go\ntype ObjectMetadata struct {\n\tChange           ChangeType     `json:\"change\"`\n\tDirContentDelete bool           `json:\"dir_content_delete,omitempty\"`\n\tName             string         `json:\"name\"`\n\tSize             int64          `json:\"size,omitempty\"`\n\tSizeHuman        string         `json:\"size_human,omitempty\"`\n\tMode             os.FileMode    `json:\"mode,omitempty\"`\n\tModeHuman        string         `json:\"mode_human,omitempty\"`\n\tUID              int            `json:\"uid\"` //don't omit uid 0\n\tGID              int            `json:\"gid\"` //don't omit gid 0\n\tModTime          time.Time      `json:\"mod_time,omitempty\"`\n\tChangeTime       time.Time      `json:\"change_time,omitempty\"`\n\tLinkTarget       string         `json:\"link_target,omitempty\"`\n\tHistory          *ObjectHistory `json:\"history,omitempty\"`\n\tHash             string         `json:\"hash,omitempty\"`\n\tPathMatch        bool           `json:\"-\"`\n\tLayerIndex       int            `json:\"-\"`\n\tTypeFlag         byte           `json:\"-\"`\n\tType             string         `json:\"type\"`\n\tContentType      string         `json:\"content_type,omitempty\"`\n}\n```\n\n```go\ntype Package struct {\n\tFormat          ImageFormatType\n\tIsOCI           bool\n\tManifestOCI     *oci.Manifest\n\tManifest        *DockerManifestObject\n\tConfig          *ConfigObject\n\tLayers          []*Layer\n\tLayerIDRefs     map[string]*Layer\n\tHashReferences  map[string]map[string]*ObjectMetadata\n\tStats           PackageStats\n\tOSShells        map[string]*system.OSShell\n\tSpecialPermRefs SpecialPermsRefsInfo\n\tCerts           CertsRefInfo\n\tCACerts         CertsRefInfo\n\tIdentityData    *sysidentity.DataSet\n}\n```\ntodo: rename 'Package' struct\n\n```go\nfunc LoadPackage(archivePath string,\n\timageID string,\n\tskipObjects bool,\n\ttopChangesMax int,\n\tdoHashData bool,\n\tdoDetectDuplicates bool,\n\tchangeDataHashMatchers map[string]*ChangeDataHashMatcher,\n\tchangePathMatchers []*ChangePathMatcher,\n\tchangeDataMatchers map[string]*ChangeDataMatcher,\n\tutf8Detector *UTF8Detector,\n\tprocessorParams *ProcessorParams,\n) (*Package, error)\n```\n\n```go\nfunc (ref *Package) ProcessIdentityData() *sysidentity.Report\n```\n\n```go\ntype PackageFiles struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewPackageFiles(archivePath string) (*PackageFiles, error)\n```\n\n```go\nfunc (ref *PackageFiles) ImageDigest() string\n```\n\n```go\nfunc (ref *PackageFiles) ImageID() string\n```\n\n```go\nfunc (ref *PackageFiles) LayerCount() int\n```\n\n```go\nfunc (ref *PackageFiles) ListImageHistory() ([]XHistory, error)\n```\n\n```go\nfunc (ref *PackageFiles) ListLayerFiles(selectors []FileSelector) ([]*LayerFiles, error)\n```\n\n```go\nfunc (ref *PackageFiles) ListLayerMetadata() ([]*LayerMetadata, error)\n```\n\n```go\ntype PackageStats struct {\n\tDuplicateFileCount      uint64 `json:\"duplicate_file_count\"`\n\tDuplicateFileTotalCount uint64 `json:\"duplicate_file_total_count\"`\n\tDuplicateFileSize       uint64 `json:\"duplicate_file_size\"`\n\tDuplicateFileTotalSize  uint64 `json:\"duplicate_file_total_size\"`\n\tDuplicateFileWastedSize uint64 `json:\"duplicate_file_wasted_size\"`\n\tDeletedCount            uint64 `json:\"deleted_count\"`\n\tDeletedDirContentCount  uint64 `json:\"deleted_dir_content_count\"`\n\tDeletedDirCount         uint64 `json:\"deleted_dir_count\"`\n\tDeletedFileCount        uint64 `json:\"deleted_file_count\"`\n\tDeletedLinkCount        uint64 `json:\"deleted_link_count\"`\n\tDeletedFileSize         uint64 `json:\"deleted_file_size\"`\n\tUTF8Count               uint64 `json:\"utf8_count,omitempty\"`\n\tUTF8Size                uint64 `json:\"utf8_size,omitempty\"`\n\tUTF8SizeHuman           string `json:\"utf8_size_human,omitempty\"`\n\tBinaryCount             uint64 `json:\"binary_count,omitempty\"`\n\tBinarySize              uint64 `json:\"binary_size,omitempty\"`\n\tBinarySizeHuman         string `json:\"binary_size_human,omitempty\"`\n\tSetuidCount             uint64 `json:\"setuid_count,omitempty\"`\n\tSetgidCount             uint64 `json:\"setgid_count,omitempty\"`\n\tStickyCount             uint64 `json:\"sticky_count,omitempty\"`\n}\n```\n\n```go\ntype Platform struct {\n\tArchitecture string   `json:\"architecture\"`\n\tOS           string   `json:\"os\"`\n\tOSVersion    string   `json:\"os.version,omitempty\"`\n\tOSFeatures   []string `json:\"os.features,omitempty\"`\n\tVariant      string   `json:\"variant,omitempty\"`\n}\n```\n\n```go\ntype ProcessorParams struct {\n\tDetectIdentities     *DetectOpParam\n\tDetectScheduledTasks *DetectOpParam\n\tDetectServices       *DetectOpParam\n\tDetectSystemHooks    *DetectOpParam\n\n\tDetectAllCertFiles   bool\n\tDetectAllCertPKFiles bool\n}\n```\ntodo: add other processor params (passed separately for now)\n\n```go\ntype RootFS struct {\n\tType    string   `json:\"type\"`\n\tDiffIDs []string `json:\"diff_ids,omitempty\"`\n}\n```\n\n```go\ntype SourceType string\n```\n\n```go\nconst (\n\tSourceTypeDockerImage SourceType = \"docker-image\"\n\tSourceTypeGit         SourceType = \"git\"\n\tSourceTypeHTTP        SourceType = \"http\"\n)\n```\n\n```go\ntype SpecialPermsInfo struct {\n\tSetuid []string `json:\"setuid,omitempty\"`\n\tSetgid []string `json:\"setgid,omitempty\"`\n\tSticky []string `json:\"sticky,omitempty\"`\n}\n```\n\n```go\ntype SpecialPermsRefsInfo struct {\n\tSetuid map[string]*ObjectMetadata\n\tSetgid map[string]*ObjectMetadata\n\tSticky map[string]*ObjectMetadata\n}\n```\n\n```go\ntype TarReadCloser struct {\n\tio.Reader\n\tio.Closer\n}\n```\n\n```go\ntype TarWriter struct {\n\tWriter *tar.Writer\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewTarWriter(name string) (*TarWriter, error)\n```\n\n```go\nfunc (w *TarWriter) Close() error\n```\n\n```go\ntype TopObjects []*ObjectMetadata\n```\nTopObjects is a slice of ObjectMetadata pointers that implements the heap.Interface for maintaining a priority queue of objects, typically sorted by size.\n\n```go\nfunc NewTopObjects(n int) TopObjects\n```\nNewTopObjects creates and returns a new, empty TopObjects slice with a specified capacity.\n\n```go\nfunc (to TopObjects) Len() int\n```\nLen returns the number of elements in the TopObjects slice.\n\n```go\nfunc (to TopObjects) Less(i, j int) bool\n```\nLess compares two elements in the slice for sorting. Nil elements are considered smaller than non-nil elements. Two nil elements are considered equal.\n\n```go\nfunc (to TopObjects) List() []*ObjectMetadata\n```\nList returns a sorted slice of ObjectMetadata, with the largest elements first. It creates a copy of the underlying data to preserve the original heap. Returns nil if the receiver is nil.\n\n```go\nfunc (to *TopObjects) Pop() interface{}\n```\nPop removes and returns the smallest element from the heap. The result is the element that would be returned by Pop() from the heap package.\n\n```go\nfunc (to *TopObjects) Push(x interface{})\n```\nPush adds an element to the heap. It handles nil values safely and only adds valid \\*ObjectMetadata pointers to the slice.\n\n```go\nfunc (to TopObjects) Swap(i, j int)\n```\nSwap swaps the elements with indexes i and j. It performs bounds checking to prevent panics.\n\n```go\ntype UTF8Detector struct {\n\tDump         bool\n\tDumpConsole  bool\n\tDumpDir      string\n\tDumpArchive  string\n\tMaxSizeBytes int\n\tArchive      *TarWriter\n\tFilters      []UTF8DetectorMatcher\n}\n```\n\n```go\nfunc (d *UTF8Detector) Close() error\n```\n\n```go\ntype UTF8DetectorMatcher struct {\n\tPathPattern string\n\tDataPattern string\n\tMatcher     *regexp.Regexp\n}\n```\n\n```go\ntype V1ConfigObject struct {\n\t// ID is a unique 64 character identifier of the image\n\tID string `json:\"id,omitempty\"`\n\t// Parent is the ID of the parent image\n\tParent string `json:\"parent,omitempty\"`\n\t// Comment is the commit message that was set when committing the image\n\tComment string `json:\"comment,omitempty\"`\n\t// Created is the timestamp at which the image was created\n\tCreated time.Time `json:\"created\"`\n\t// Container is the id of the container used to commit\n\tContainer string `json:\"container,omitempty\"`\n\t// ContainerConfig is the configuration of the container that is committed into the image\n\tContainerConfig ContainerConfig `json:\"container_config,omitempty\"`\n\t// DockerVersion specifies the version of Docker that was used to build the image\n\tDockerVersion string `json:\"docker_version,omitempty\"`\n\t// Author is the name of the author that was specified when committing the image\n\tAuthor string `json:\"author,omitempty\"`\n\t// Config is the configuration of the container received from the client\n\tConfig *ContainerConfig `json:\"config,omitempty\"`\n\t// Architecture is the hardware that the image is built and runs on\n\tArchitecture string `json:\"architecture,omitempty\"`\n\t// Variant is the CPU architecture variant (presently ARM-only)\n\tVariant string `json:\"variant,omitempty\"`\n\t// OS is the operating system used to build and run the image\n\tOS string `json:\"os,omitempty\"`\n\t// Size is the total size of the image including all layers it is composed of\n\tSize int64 `json:\",omitempty\"`\n}\n```\n\n```go\ntype XHistory struct {\n\t// Created is the timestamp at which the image was created\n\tCreated time.Time `json:\"created\"`\n\t// Author is the name of the author that was specified when committing the image\n\tAuthor string `json:\"author,omitempty\"`\n\t// CreatedBy keeps the Dockerfile command used while building the image\n\tCreatedBy string `json:\"created_by,omitempty\"`\n\t// Comment is the commit message that was set when committing the image\n\tComment string `json:\"comment,omitempty\"`\n\t// EmptyLayer is set to true if this history item did not generate a\n\t// layer. Otherwise, the history item is associated with the next\n\t// layer in the RootFS section.\n\tEmptyLayer bool `json:\"empty_layer,omitempty\"`\n\n\tLayerID       string `json:\"layer_id,omitempty\"`\n\tLayerIndex    int    `json:\"layer_index\"`\n\tLayerFSDiffID string `json:\"layer_fsdiff_id,omitempty\"`\n}\n```\nXHistory augments the standard History struct with extra layer info\n\n","path":"github.com/mintoolkit/mint/pkg/docker/dockerimage","name":"dockerimage","synopsis":"","isRedistributable":true}
