Documentation ¶
Overview ¶
Package packer builds and deploys a gokrazy image. Called from the old gokr-packer binary and the new gok binary.
Index ¶
Constants ¶
View Source
const MB = 1024 * 1024
Variables ¶
This section is empty.
Functions ¶
Types ¶
type OutputStruct ¶
type OutputStruct struct { Path string `json:",omitempty"` Type OutputType `json:",omitempty"` }
type OutputType ¶
type OutputType string
const ( OutputTypeGaf OutputType = "gaf" OutputTypeFull OutputType = "full" )
type Pack ¶
type SBOM ¶
type SBOM struct { // ConfigHash is the SHA256 sum of the gokrazy instance config (loaded // from config.json). ConfigHash FileHash `json:"config_hash"` // GoModHashes is list of FileHashes, sorted by path. // // It contains one entry for each go.mod file that was used to build a // gokrazy instance. GoModHashes []FileHash `json:"go_mod_hashes"` // ExtraFileHashes is list of FileHashes, sorted by path. // // It contains one entry for each file referenced via ExtraFilePaths: // https://gokrazy.org/userguide/instance-config/#packageextrafilepaths ExtraFileHashes []FileHash `json:"extra_file_hashes"` }
type SBOMWithHash ¶
func GenerateSBOM ¶
func GenerateSBOM(cfg *config.Struct) ([]byte, SBOMWithHash, error)
GenerateSBOM generates a Software Bills Of Material (SBOM) for the local gokrazy instance. It must be provided with a cfg that hasn't been modified by gok at runtime, as the SBOM should reflect what’s going into gokrazy, not its internal implementation details (i.e. cfg.InternalCompatibilityFlags untouched).
Click to show internal directories.
Click to hide internal directories.