Documentation
¶
Index ¶
- func AddUpdatedCros(old, updated []*sv.StableCrosVersion) []*sv.StableCrosVersion
- func AddUpdatedFirmware(old, updated []*sv.StableFirmwareVersion) []*sv.StableFirmwareVersion
- func CompareCrOSVersions(v1, v2 string) (int, error)
- func FallbackBuildTargetKey(buildTarget string) string
- func JoinBuildTargetModel(buildTarget string, model string) (string, error)
- func ParseCrOSVersion(v string) (int, int, int, int, error)
- func ParseFirmwareVersion(s string) (string, string, int, int, string, error)
- func SerializeCrOSVersion(release, tip, branch, branchBranch int) string
- func SerializeFirmwareVersion(company string, platform string, tip int, branch int, branchBranch int) string
- func SortSV(s *sv.StableVersions)
- func ValidateCrOSVersion(v string) error
- func ValidateFaftKind(v string) error
- func ValidateFaftVersion(v string) error
- func ValidateFirmwareVersion(r string) error
- func ValidateJoinBuildTargetModel(buildTarget string, model string) error
- func WriteSVToString(s *sv.StableVersions) (string, error)
- type FaftVersionResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddUpdatedCros ¶
func AddUpdatedCros(old, updated []*sv.StableCrosVersion) []*sv.StableCrosVersion
AddUpdatedCros add and update the new cros stable version to old.
func AddUpdatedFirmware ¶
func AddUpdatedFirmware(old, updated []*sv.StableFirmwareVersion) []*sv.StableFirmwareVersion
AddUpdatedFirmware add and update the new firmware stable version to old.
func CompareCrOSVersions ¶
CompareCrOSVersions compares two cros versions' number.
Return:
1 if v1 > v2 0 if v1 == v2 -1 if v1 < v2
func FallbackBuildTargetKey ¶
FallbackBuildTargetKey creates the key based on the given build target This kind of key should only ever be used as a fallback when looking up a stable version.
func JoinBuildTargetModel ¶
JoinBuildTargetModel -- join a buildTarget string and a model string to produce a combined key
func ParseCrOSVersion ¶
ParseCrOSVersion takes a version string and extracts version info
func ParseFirmwareVersion ¶
ParseFirmwareVersion takes a read-write firmware version and extracts semantically meaningful elements.
func SerializeCrOSVersion ¶
SerializeCrOSVersion takes a CrOSVersion specification and produces a string in the canonical format.
func SerializeFirmwareVersion ¶
func SerializeFirmwareVersion(company string, platform string, tip int, branch int, branchBranch int) string
SerializeFirmwareVersion takes a list of components of a RWFirmwareVersion
func SortSV ¶
func SortSV(s *sv.StableVersions)
SortSV sorts all the individual entries in a stable version config file.
func ValidateCrOSVersion ¶
ValidateCrOSVersion checks that a CrOSVersion describes a sensible version such as "R76-12239.46.5"
func ValidateFaftKind ¶
func ValidateFaftVersion ¶
ValidateFaftVersion checks that a given faft version is well-formed such as "octopus-firmware/R72-11297.75.0" or "octopus-release/R72-11297.75.0"
func ValidateFirmwareVersion ¶
ValidateFirmwareVersion checks whether a string is a valid read-write firmware version. e.g. Google_Rammus.11275.41.0
func ValidateJoinBuildTargetModel ¶
ValidateJoinBuildTargetModel -- checks that a buildTarget and model are valid The model is explicitly allowed to be empty.
func WriteSVToString ¶
func WriteSVToString(s *sv.StableVersions) (string, error)
WriteSVToString marshals stable version information into a string.
Types ¶
type FaftVersionResult ¶
type FaftVersionResult struct { // Platform is the name of board in question e.g. octopus. Platform string // Kind is "firmware" or "release". Kind string // Release is the release milestone. Release int // Tip is the 2nd number in a release version string. Tip int // Branch is 3rd number in a release version string. Branch int // BranchBranch is the 4th number in a release version string. BranchBranch int }
FaftVersionResult stores the result of parsing a FAFT version.
func ParseFaftVersion ¶
func ParseFaftVersion(fv string) (*FaftVersionResult, error)
ParseFaftVersion takes a version string and extracts version info
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Package keys provides builder to generate keys for recovery-versions.
|
Package keys provides builder to generate keys for recovery-versions. |