Documentation ¶
Index ¶
- type ArtifactDiffs
- type ArtifactLayer
- type ArtifactNode
- type Checksums
- type CopyJob
- type HashImplementation
- type HashOptions
- type ImageBuilder
- type PackageArtifact
- func CreateArtifactForFile(s string, opts ...func(*PackageArtifact)) (*PackageArtifact, error)
- func ExtractArtifactFromDelta(src, dst string, layers []ArtifactLayer, concurrency int, keepPerms bool, ...) (*PackageArtifact, error)
- func NewPackageArtifact(path string) *PackageArtifact
- func NewPackageArtifactFromYaml(data []byte) (*PackageArtifact, error)
- func (a *PackageArtifact) Compress(src string, concurrency int) error
- func (a *PackageArtifact) FileList() ([]string, error)
- func (a *PackageArtifact) GenerateFinalImage(imageName string, b ImageBuilder, keepPerms bool) (backend.Options, error)
- func (a *PackageArtifact) GetFileName() string
- func (a *PackageArtifact) GetProtectFiles() []string
- func (a *PackageArtifact) GetSubsets() *LuetSubsetsDefinition
- func (a *PackageArtifact) GetTarFormersSpec(enableSubsets bool) *tarf_specs.SpecFile
- func (a *PackageArtifact) GetUncompressedName() string
- func (a *PackageArtifact) Hash() error
- func (p *PackageArtifact) ShallowCopy() *PackageArtifact
- func (a *PackageArtifact) Unpack(dst string, enableSubsets bool) error
- func (a *PackageArtifact) Verify() error
- func (a *PackageArtifact) WriteYaml(dst string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtifactDiffs ¶
type ArtifactDiffs struct { Additions []ArtifactNode `json:"Adds"` Deletions []ArtifactNode `json:"Dels"` Changes []ArtifactNode `json:"Mods"` }
type ArtifactLayer ¶
type ArtifactLayer struct { FromImage string `json:"Image1"` ToImage string `json:"Image2"` Diffs ArtifactDiffs `json:"Diff"` }
type ArtifactNode ¶
type Checksums ¶
func (*Checksums) Generate ¶
func (c *Checksums) Generate(a *PackageArtifact) error
Generate generates all Checksums supported for the artifact
type HashImplementation ¶
type HashImplementation string
const (
SHA256 HashImplementation = "sha256"
)
type HashOptions ¶
type HashOptions struct { Hasher hash.Hash Type HashImplementation }
type ImageBuilder ¶
type PackageArtifact ¶
type PackageArtifact struct { Path string `json:"path" yaml:"path"` Dependencies []*PackageArtifact `json:"dependencies" yaml:"dependencies"` CompileSpec *compilerspec.LuetCompilationSpec `json:"compilespec" yaml:"compilespec"` Checksums Checksums `json:"checksums" yaml:"checksums"` SourceAssertion solver.PackagesAssertions `json:"-" yaml:"-"` CompressionType compression.Implementation `json:"compressiontype" yaml:"compressiontype"` Files []string `json:"files" yaml:"files"` PackageCacheImage string `json:"package_cacheimage" yaml:"package_cacheimage"` Runtime *pkg.DefaultPackage `json:"runtime,omitempty" yaml:"runtime,omitempty"` }
When compiling, we write also a fingerprint.metadata.yaml file with PackageArtifact. In this way we can have another command to create the repository
which will consist in just of an repository.yaml which is just the repository structure with the list of package artifact. In this way a generic client can fetch the packages and, after unpacking the tree, performing queries to install packages.
func CreateArtifactForFile ¶
func CreateArtifactForFile(s string, opts ...func(*PackageArtifact)) (*PackageArtifact, error)
CreateArtifactForFile creates a new artifact from the given file
func ExtractArtifactFromDelta ¶
func ExtractArtifactFromDelta(src, dst string, layers []ArtifactLayer, concurrency int, keepPerms bool, includes []string, excludes []string, t compression.Implementation) (*PackageArtifact, error)
ExtractArtifactFromDelta extracts deltas from ArtifactLayer from an image in tar format
func NewPackageArtifact ¶
func NewPackageArtifact(path string) *PackageArtifact
func NewPackageArtifactFromYaml ¶
func NewPackageArtifactFromYaml(data []byte) (*PackageArtifact, error)
func (*PackageArtifact) Compress ¶
func (a *PackageArtifact) Compress(src string, concurrency int) error
Compress is responsible to archive and compress to the artifact Path. It accepts a source path, which is the content to be archived/compressed and a concurrency parameter.
func (*PackageArtifact) FileList ¶
func (a *PackageArtifact) FileList() ([]string, error)
FileList generates the list of file of a package from the local archive
func (*PackageArtifact) GenerateFinalImage ¶
func (a *PackageArtifact) GenerateFinalImage(imageName string, b ImageBuilder, keepPerms bool) (backend.Options, error)
GenerateFinalImage takes an artifact and builds a Docker image with its content
func (*PackageArtifact) GetFileName ¶
func (a *PackageArtifact) GetFileName() string
func (*PackageArtifact) GetProtectFiles ¶
func (a *PackageArtifact) GetProtectFiles() []string
func (*PackageArtifact) GetSubsets ¶
func (a *PackageArtifact) GetSubsets() *LuetSubsetsDefinition
func (*PackageArtifact) GetTarFormersSpec ¶
func (a *PackageArtifact) GetTarFormersSpec(enableSubsets bool) *tarf_specs.SpecFile
func (*PackageArtifact) GetUncompressedName ¶
func (a *PackageArtifact) GetUncompressedName() string
GetUncompressedName returns the artifact path without the extension suffix
func (*PackageArtifact) Hash ¶
func (a *PackageArtifact) Hash() error
func (*PackageArtifact) ShallowCopy ¶
func (p *PackageArtifact) ShallowCopy() *PackageArtifact
func (*PackageArtifact) Unpack ¶
func (a *PackageArtifact) Unpack(dst string, enableSubsets bool) error
Unpack Untar and decompress (TODO) to the given path
func (*PackageArtifact) Verify ¶
func (a *PackageArtifact) Verify() error
func (*PackageArtifact) WriteYaml ¶
func (a *PackageArtifact) WriteYaml(dst string) error