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>
This commit is contained in:
Alex Goodman
2025-10-03 17:01:56 +00:00
committed by GitHub
parent b96d3d20af
commit a77d24e379
57 changed files with 4241 additions and 1676 deletions
+14 -4
View File
@@ -8,11 +8,21 @@ const (
SnapTypeSnapd = "snapd"
)
// SnapEntry represents metadata for a Snap package extracted from snap.yaml or snapcraft.yaml files.
type SnapEntry struct {
SnapType string `json:"snapType" yaml:"snapType"` // base, kernel, system, gadget, snapd
Base string `json:"base" yaml:"base"` // base snap name (e.g., core20, core22)
SnapName string `json:"snapName" yaml:"snapName"` // name of the snap
SnapVersion string `json:"snapVersion" yaml:"snapVersion"` // version of the snap
// 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.)
}