syft/syft/pkg/snap.go
Alex Goodman a77d24e379
Improve struct and field comments and incorporate into json schema (#4252)
* improve struct and field comments and incorporate into json schema

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* address review feedback

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

---------

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
2025-10-03 17:01:56 +00:00

29 lines
1.0 KiB
Go

package pkg
const (
SnapTypeBase = "base"
SnapTypeKernel = "kernel"
SnapTypeApp = "app"
SnapTypeGadget = "gadget"
SnapTypeSnapd = "snapd"
)
// SnapEntry represents metadata for a Snap package extracted from snap.yaml or snapcraft.yaml files.
type SnapEntry struct {
// SnapType indicates the snap type (base, kernel, app, gadget, or snapd).
SnapType string `json:"snapType" yaml:"snapType"` // base, kernel, system, gadget, snapd
// Base is the base snap name that this snap depends on (e.g., "core20", "core22").
Base string `json:"base" yaml:"base"` // base snap name (e.g., core20, core22)
// SnapName is the snap package name.
SnapName string `json:"snapName" yaml:"snapName"` // name of the snap
// SnapVersion is the snap package version.
SnapVersion string `json:"snapVersion" yaml:"snapVersion"` // version of the snap
// Architecture is the target CPU architecture (e.g., "amd64", "arm64").
Architecture string `json:"architecture" yaml:"architecture"` // architecture (amd64, arm64, etc.)
}