stableversion

package
v0.0.0-...-6070400 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2025 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package stableversion provides functions to store stableversion info in datastore

Package stableversion provides functions to store stableversion info in datastore

Index

Constants

View Source
const (
	CrosStableVersionKind     = "crosStableVersion"
	FaftStableVersionKind     = "faftStableVersion"
	FirmwareStableVersionKind = "firmwareStableVersion"
)
View Source
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

func GetCrosStableVersion(ctx context.Context, buildTarget string, model string) (string, error)

GetCrosStableVersion gets a stable version for ChromeOS from datastore

func GetFaftStableVersion

func GetFaftStableVersion(ctx context.Context, buildTarget string, model string) (string, error)

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

func PutManyCrosStableVersion(ctx context.Context, crosOfKey map[string]string) error

PutManyCrosStableVersion writes many stable versions for ChromeOS to datastore

func PutManyFaftStableVersion

func PutManyFaftStableVersion(ctx context.Context, faftOfJoinedKey map[string]string) error

PutManyFaftStableVersion takes a model, buildtarget, and faft stableversion and persists it to datastore

func PutManyFirmwareStableVersion

func PutManyFirmwareStableVersion(ctx context.Context, firmwareOfJoinedKey map[string]string) error

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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