Documentation
¶
Overview ¶
* Copyright (c) 2025 System233 * * This software is released under the MIT License. * https://opensource.org/licenses/MIT
Index ¶
- Constants
- func Dump(target string) error
- func GetTriplet() string
- func IsValidComponentVersion(version string) bool
- func Mount(opt *MountOption) error
- func NormalizeVersion(version string) string
- func Pack(opt *PackOption) error
- func Umount(opt *UmountOption) error
- type Config
- type DumpErofsOption
- type LayerHeader
- type LayerInfo
- type LayerInfoHeader
- type MountOption
- type PackOption
- type UmountOption
Constants ¶
View Source
const DumpErofs = "dump.erofs"
View Source
const ErofsFuse = "erofsfuse"
View Source
const FuserMount = "fusermount"
View Source
const LayerMagic = "<<< deepin linglong layer archive >>>\x00\x00\x00"
View Source
const MkfsErofs = "mkfs.erofs"
Variables ¶
This section is empty.
Functions ¶
func GetTriplet ¶
func GetTriplet() string
func IsValidComponentVersion ¶
func Mount ¶
func Mount(opt *MountOption) error
func NormalizeVersion ¶
func Pack ¶
func Pack(opt *PackOption) error
func Umount ¶
func Umount(opt *UmountOption) error
Types ¶
type Config ¶ added in v1.4.6
type Config struct { Version string `yaml:"version"` Package struct { ID string `yaml:"id"` Name string `yaml:"name"` Version string `yaml:"version"` Kind string `yaml:"kind"` Description string `yaml:"description"` } `yaml:"package"` Command []string `yaml:"command"` Base string `yaml:"base"` Runtime string `yaml:"runtime,omitempty"` Build string `yaml:"build"` }
type DumpErofsOption ¶
type LayerHeader ¶
type LayerHeader struct { FileName string FileSize int64 Magic string Info LayerInfoHeader InfoSize int }
func NewLayerHeader ¶
func NewLayerHeader(file *os.File) (*LayerHeader, error)
func NewLayerHeaderFromFile ¶
func NewLayerHeaderFromFile(filePath string) (*LayerHeader, error)
func (*LayerHeader) DataOffset ¶
func (l *LayerHeader) DataOffset() int
func (*LayerHeader) Print ¶
func (l *LayerHeader) Print()
func (*LayerHeader) PrintAll ¶
func (l *LayerHeader) PrintAll() error
func (*LayerHeader) PrintErofs ¶
func (l *LayerHeader) PrintErofs(opt *DumpErofsOption) error
type LayerInfo ¶
type LayerInfo struct { Arch []string `json:"arch"` Base string `json:"base"` Runtime string `json:"runtime,omitempty"` Channel string `json:"channel"` Command []string `json:"command"` Description string `json:"description"` ID string `json:"id"` Kind string `json:"kind"` Module string `json:"module"` Name string `json:"name"` SchemaVersion string `json:"schema_version"` Size int64 `json:"size"` Version string `json:"version"` }
func (*LayerInfo) ParseLayerInfo ¶
type LayerInfoHeader ¶
func NewLayerInfoHeader ¶
func NewLayerInfoHeader(config Config) LayerInfoHeader
func (*LayerInfoHeader) Print ¶
func (l *LayerInfoHeader) Print()
type MountOption ¶
type PackOption ¶
type UmountOption ¶
Click to show internal directories.
Click to hide internal directories.