Documentation ¶
Index ¶
- Constants
- func InspectBuffer(contents []byte) (*labPlatform.StableVersions, error)
- func InspectFile(path string) (*labPlatform.StableVersions, error)
- func ParseStableCrosVersion(contents []byte) (*labPlatform.StableCrosVersion, error)
- func ParseStableVersions(contents []byte) (*labPlatform.StableVersions, error)
Constants ¶
const FileJSONNull = "File is null JSON literal"
FileJSONNull indicates that the file is a null value in JSON
const FileLenZero = "File unexpectedly has length zero"
FileLenZero indicates that a file has length zero. This exceptional condition is special-cased because many weird files like /dev/null have length zero.
const FileMissingCrosKey = "File is missing \"cros\" key"
FileMissingCrosKey indicates that a file does not have a "cros" key
const FileMissingFaftKey = "File is missing \"faft\" key"
FileMissingFaftKey indicates that a file does not have a "faft" key
const FileMissingFirmwareKey = "File is missing \"firmware\" key"
FileMissingFirmwareKey indicates that a file does not have a "firmware" key
const FileNoCrosEntries = "File has no \"cros\" entries"
FileNoCrosEntries indicates that the "cros" array is empty.
const FileNoFaftEntries = "File has no \"faft\" entries"
FileNoFaftEntries indicates that the "faft" array is empty.
const FileNoFirmwareEntries = "File has no \"firmware\" entries"
FileNoFirmwareEntries indicates that the "firmware" array is empty.
const FileNotJSON = "File is not valid JSON"
FileNotJSON indicates that a file is not valid JSON.
const FileNotReadable = "File cannot be read (%s)"
FileNotReadable indicates that a given file does not exist or is not readable. For example, a directory is not a readable file.
const FileNotStableVersionProto = "File does not conform to stable_version proto"
FileNotStableVersionProto indicates that a file does not conform to the lab_station.stable_versions proto schema. Not every file satisfying the schema is well-formed, but all files failing to satisfy the schema are definitely ill-formed.
const FileNotUTF8 = "File is not valid UTF-8"
FileNotUTF8 indicates that a file was found but is not valid UTF-8 and therefore not valid JSON either.
const FileSeemsLegit = "File appears to be a valid stable version config file."
FileSeemsLegit indicates that that the given file is not malformed in any of the ways that the tool checks.
const FileShallowlyMalformedCrosEntry = "File has bad CrOS version entry position (%s): (%d) buildTarget: (%s) model:(%s) version: (%s)"
FileShallowlyMalformedCrosEntry indicates that there is at least one CrOS entry with a "shallow" error such as a malformed version string. Free variables: message string, position int, buildTarget string, model string, version string
const FileShallowlyMalformedFaftEntry = "File has bad faft version entry position (%s): (%d) buildTarget: (%s) model:(%s) version: (%s)"
FileShallowlyMalformedFaftEntry indicates that there is at least one CrOS entry with a "shallow" error such as a malformed version string. Free variables: message string, position int, buildTarget string, model string, version string
const FileShallowlyMalformedFirmwareEntry = "File has bad firmware version entry position (%s): (%d) buildTarget: (%s) model:(%s) version: (%s)"
FileShallowlyMalformedFirmwareEntry indicates that there is at least one CrOS entry with a "shallow" error such as a malformed version string. Free variables: message string, position int, buildTarget string, model string, version string
Variables ¶
This section is empty.
Functions ¶
func InspectBuffer ¶
func InspectBuffer(contents []byte) (*labPlatform.StableVersions, error)
InspectBuffer takes file contents and determines what, if anything, is wrong with a stable_versions.cfg file.
func InspectFile ¶
func InspectFile(path string) (*labPlatform.StableVersions, error)
InspectFile takes a path and determines what, if anything, is wrong with a stable_versions.cfg file.
func ParseStableCrosVersion ¶
func ParseStableCrosVersion(contents []byte) (*labPlatform.StableCrosVersion, error)
ParseStableCrosVersion takes a byte array and attempts to parse a stable CrOS version
func ParseStableVersions ¶
func ParseStableVersions(contents []byte) (*labPlatform.StableVersions, error)
ParseStableVersions takes a byte array and attempts to parse a stable version proto file out of it.
Types ¶
This section is empty.