validateconfig

package
v0.0.0-...-e560ebb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const FileJSONNull = "File is null JSON literal"

FileJSONNull indicates that the file is a null value in JSON

View Source
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.

View Source
const FileMissingCrosKey = "File is missing \"cros\" key"

FileMissingCrosKey indicates that a file does not have a "cros" key

View Source
const FileMissingFaftKey = "File is missing \"faft\" key"

FileMissingFaftKey indicates that a file does not have a "faft" key

View Source
const FileMissingFirmwareKey = "File is missing \"firmware\" key"

FileMissingFirmwareKey indicates that a file does not have a "firmware" key

View Source
const FileNoCrosEntries = "File has no \"cros\" entries"

FileNoCrosEntries indicates that the "cros" array is empty.

View Source
const FileNoFaftEntries = "File has no \"faft\" entries"

FileNoFaftEntries indicates that the "faft" array is empty.

View Source
const FileNoFirmwareEntries = "File has no \"firmware\" entries"

FileNoFirmwareEntries indicates that the "firmware" array is empty.

View Source
const FileNotJSON = "File is not valid JSON"

FileNotJSON indicates that a file is not valid JSON.

View Source
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.

View Source
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.

View Source
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.

View Source
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.

View Source
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

View Source
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

View Source
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL