Documentation
¶
Overview ¶
Package stableversion provides functions to store stableversion info in datastore
Package stableversion provides functions to store stableversion info in datastore
Index ¶
- Constants
- func FindVersion(ctx context.Context, deviceType, board, model string, pools []string) (*lab_platform.StableVersion, error)
- func GetCrosStableVersion(ctx context.Context, buildTarget string, model string) (string, error)
- func GetFaftStableVersion(ctx context.Context, buildTarget string, model string) (string, error)
- func GetFirmwareStableVersion(ctx context.Context, buildTarget string, model string) (string, error)
- func PutManyCrosStableVersion(ctx context.Context, crosOfKey map[string]string) error
- func PutManyFaftStableVersion(ctx context.Context, faftOfJoinedKey map[string]string) error
- func PutManyFirmwareStableVersion(ctx context.Context, firmwareOfJoinedKey map[string]string) error
- func PutSingleCrosStableVersion(ctx context.Context, buildTarget string, model string, cros string) error
- func PutSingleFaftStableVersion(ctx context.Context, buildTarget string, model string, faft string) error
- func PutSingleFirmwareStableVersion(ctx context.Context, buildTarget string, model string, firmware string) error
- func WriteVersions(ctx context.Context, versions []*lab_platform.StableVersion) error
- type CrosStableVersionEntity
- type FaftStableVersionEntity
- type FirmwareStableVersionEntity
- type StableVersionEntity
Constants ¶
const ( CrosStableVersionKind = "crosStableVersion" FaftStableVersionKind = "faftStableVersion" FirmwareStableVersionKind = "firmwareStableVersion" )
const (
StableVersionKind = "recoveryVersion"
)
Variables ¶
This section is empty.
Functions ¶
func FindVersion ¶
func FindVersion(ctx context.Context, deviceType, board, model string, pools []string) (*lab_platform.StableVersion, error)
FindVersion find a stable-version from datastore.
func GetCrosStableVersion ¶
GetCrosStableVersion gets a stable version for ChromeOS from datastore
func GetFaftStableVersion ¶
GetFaftStableVersion takes a model and a buildtarget and produces a faft stable version from datastore
func GetFirmwareStableVersion ¶
func GetFirmwareStableVersion(ctx context.Context, buildTarget string, model string) (string, error)
GetFirmwareStableVersion takes a buildtarget and a model and produces a firmware stable version from datastore
func PutManyCrosStableVersion ¶
PutManyCrosStableVersion writes many stable versions for ChromeOS to datastore
func PutManyFaftStableVersion ¶
PutManyFaftStableVersion takes a model, buildtarget, and faft stableversion and persists it to datastore
func PutManyFirmwareStableVersion ¶
PutManyFirmwareStableVersion takes a map from build_target+model keys to firmware versions and persists it to datastore
func PutSingleCrosStableVersion ¶
func PutSingleCrosStableVersion(ctx context.Context, buildTarget string, model string, cros string) error
PutSingleCrosStableVersion is a convenience wrapper around PutManyCrosStableVersion
func PutSingleFaftStableVersion ¶
func PutSingleFaftStableVersion(ctx context.Context, buildTarget string, model string, faft string) error
PutSingleFaftStableVersion is a convenience wrapper around PutManyFaftStableVersion
func PutSingleFirmwareStableVersion ¶
func PutSingleFirmwareStableVersion(ctx context.Context, buildTarget string, model string, firmware string) error
PutSingleFirmwareStableVersion is a convenience wrapper around PutManyFirmwareStableVersion
func WriteVersions ¶
func WriteVersions(ctx context.Context, versions []*lab_platform.StableVersion) error
WriteVersions writes versions to datastore.
Types ¶
type CrosStableVersionEntity ¶
type CrosStableVersionEntity struct { // ID is a board;model e.g. eve, eve. ID string `gae:"$id"` // Cros is a CrOS version e.g. R1-2.3.4. Cros string // contains filtered or unexported fields }
CrosStableVersionEntity is a datastore entity that maps a board;model to a CrOS version.
func (*CrosStableVersionEntity) ImposeVersion ¶
func (e *CrosStableVersionEntity) ImposeVersion(ctx context.Context, cros string) error
ImposeVersion takes in a CrOS stable version entity and a new cros version. If the version is empty, we delete the record.
Silently do nothing if the payload and the ID are the same.
type FaftStableVersionEntity ¶
type FaftStableVersionEntity struct { // ID is a board;model e.g. eve, eve. ID string `gae:"$id"` // Faft is a faft version e.g. octopus-release/R100-10000.100.0. Faft string // contains filtered or unexported fields }
FaftStableVersionEntity is a datastore entity that maps a board;model to a faft version.
func (*FaftStableVersionEntity) ImposeVersion ¶
func (e *FaftStableVersionEntity) ImposeVersion(ctx context.Context, faft string) error
ImposeVersion takes in a Faft stable version entity and a new cros version. If the version is empty, we delete the record.
Silently do nothing if the payload and the ID are the same.
type FirmwareStableVersionEntity ¶
type FirmwareStableVersionEntity struct { // ID is a board;model e.g. eve, eve. ID string `gae:"$id"` // Firmware is a firmware version e.g. Google_Rammus.10000.100.0 Firmware string // contains filtered or unexported fields }
FirmwareStableVersionEntity is a datastore entity that maps a board;model to a firmware version.
func (*FirmwareStableVersionEntity) ImposeVersion ¶
func (e *FirmwareStableVersionEntity) ImposeVersion(ctx context.Context, firmware string) error
ImposeVersion takes in a CrOS stable version entity and a new cros version. If the version is empty, we delete the record.
Silently do nothing if the payload and the ID are the same.
type StableVersionEntity ¶
type StableVersionEntity struct { // ID is a combination of board;model;pool e.g. eve;eve;quota. ID string `gae:"$id"` // Cros is a CrOS version e.g. R1-2.3.4. Version *lab_platform.StableVersion // contains filtered or unexported fields }
StableVersionEntity is a datastore entity that maps a key to a recovery version.