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 ParseFaftVersion(fv string) (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 SerializeFaftVersion(platform string, 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 ValidateFaftVersion(v string) error
- func ValidateFirmwareVersion(r string) error
- func ValidateJoinBuildTargetModel(buildTarget string, model string) error
- func WriteSVToString(s *sv.StableVersions) (string, error)
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 ParseFaftVersion ¶
ParseFaftVersion 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 SerializeFaftVersion ¶
SerializeFaftVersion takes arguments describing a faft version 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 ValidateFaftVersion ¶
ValidateFaftVersion checks that a given faft version is well-formed such as "octopus-firmware/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 ¶
This section is empty.