Documentation
¶
Index ¶
- func FlushDatastore(ctx context.Context, changes Changes) error
- func Use(ctx context.Context, reason string) context.Context
- type Change
- type Changes
- func LoadFromDatastore(ctx context.Context) (Changes, error)
- func LogChromeOSDeviceChanges(old *lab.ChromeOSDevice, newData *lab.ChromeOSDevice) (changes Changes)
- func LogChromeOSLabstationChange(old *lab.ChromeOSDevice, newData *lab.ChromeOSDevice) (changes Changes)
- func LogDutStateChanges(hostname string, old *lab.DutState, newData *lab.DutState) (changes Changes)
- type LifeCycleEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FlushDatastore ¶
FlushDatastore deletes changes dumped to bigquery from datastore.
Types ¶
type Change ¶
type Change struct {
ID int64 `gae:"$id"`
DeviceID string `gae:",noindex"`
Hostname string `gae:",noindex"`
Label string `gae:",noindex"`
OldValue string `gae:",noindex"`
NewValue string `gae:",noindex"`
Updated time.Time `gae:",noindex"`
ByWhomName string `gae:",noindex"`
ByWhomEmail string `gae:",noindex"`
Comment string `gae:",noindex"`
// contains filtered or unexported fields
}
Change tracks the change of a ChromeOSDevice.
type Changes ¶
type Changes []Change
Changes is a slice of Change.
func LoadFromDatastore ¶
LoadFromDatastore loads all Changes entities from datastore.
func LogChromeOSDeviceChanges ¶
func LogChromeOSDeviceChanges(old *lab.ChromeOSDevice, newData *lab.ChromeOSDevice) (changes Changes)
LogChromeOSDeviceChanges logs the change of the given ChromeOSDevice.
func LogChromeOSLabstationChange ¶
func LogChromeOSLabstationChange(old *lab.ChromeOSDevice, newData *lab.ChromeOSDevice) (changes Changes)
LogChromeOSLabstationChange logs the change of the given labstation
func LogDutStateChanges ¶
func LogDutStateChanges(hostname string, old *lab.DutState, newData *lab.DutState) (changes Changes)
LogDutStateChanges logs the change of the given DutState.
func (*Changes) LogDecommission ¶
LogDecommission logs the decommission of a ChromeOSDevice.
func (*Changes) LogDeployment ¶
LogDeployment logs the deployment of a ChromeOSDevice.
type LifeCycleEvent ¶
type LifeCycleEvent string
LifeCycleEvent is the type for all life cycle events, e.g. deployment, decommission, etc.
const ( // DatastoreKind is the datastore kind. DatastoreKind = "ChangeHistory" // LifeCycleDeployment indicates the deployment of a device. LifeCycleDeployment LifeCycleEvent = "DEPLOYMENT" // LifeCycleDecomm indicates the decommission of a device. LifeCycleDecomm LifeCycleEvent = "DECOMMISSION" )
Click to show internal directories.
Click to hide internal directories.