chromeosdevices

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ENDFIELD is List call attribute string terminator
	ENDFIELD string = ")"
	// STARTCHROMEDEVICESFIELD is List call attribute string prefix
	STARTCHROMEDEVICESFIELD string = "chromeosdevices("
)

Variables

View Source
var CrOSDevAttrMap = map[string]string{
	"action":                       "action",
	"activetime":                   "activeTime",
	"activetimeranges":             "activeTimeRanges",
	"annotatedassetid":             "annotatedAssetId",
	"annotatedlocation":            "annotatedLocation",
	"annotateduser":                "annotatedUser",
	"autoupdateexpiration":         "autoUpdateExpiration",
	"bootmode":                     "bootMode",
	"cputemperatureinfo":           "cpuTemperatureInfo",
	"cpuutilizationpercentageinfo": "cpuUtilizationPercentageInfo",
	"cpustatusreports":             "cpuStatusReports",
	"createtime":                   "createTime",
	"date":                         "date",
	"deprovisionreason":            "deprovisionReason",
	"devicefiles":                  "deviceFiles",
	"deviceid":                     "deviceId",
	"diskvolumereports":            "diskVolumeReports",
	"dockmacaddress":               "dockMacAddress",
	"downloadurl":                  "downloadUrl",
	"email":                        "email",
	"etag":                         "etag",
	"ethernetmacaddress":           "ethernetMacAddress",
	"ethernetmacaddress0":          "ethernetMacAddress0",
	"family":                       "family",
	"firmwareversion":              "firmwareVersion",
	"forcesendfields":              "forceSendFields",
	"ipaddress":                    "ipAddress",
	"kind":                         "kind",
	"label":                        "label",
	"lastenrollmenttime":           "lastEnrollmentTime",
	"lastknownnetwork":             "lastKnownNetwork",
	"lastsync":                     "lastSync",
	"macaddress":                   "macAddress",
	"manufacturedate":              "manufactureDate",
	"manufacturer":                 "manufacturer",
	"meid":                         "meid",
	"model":                        "model",
	"name":                         "name",
	"notes":                        "notes",
	"ordernumber":                  "orderNumber",
	"orgunitpath":                  "orgUnitPath",
	"osversion":                    "osVersion",
	"platformversion":              "platformVersion",
	"recentusers":                  "recentUsers",
	"reporttime":                   "reportTime",
	"serialnumber":                 "serialNumber",
	"speclevel":                    "specLevel",
	"status":                       "status",
	"storagefree":                  "storageFree",
	"storagetotal":                 "storageTotal",
	"supportenddate":               "supportEndDate",
	"systemramfreeinfo":            "systemRamFreeInfo",
	"systemramfreereports":         "systemRamFreeReports",
	"systemramtotal":               "systemRamTotal",
	"suspensionreason":             "suspensionReason",
	"temperature":                  "temperature",
	"tpmmodel":                     "tpmModel",
	"tpmversioninfo":               "tpmVersionInfo",
	"type":                         "type",
	"vendorspecific":               "vendorSpecific",
	"volumeid":                     "volumeId",
	"volumeinfo":                   "volumeInfo",
	"wanipaddress":                 "wanIpAddress",
	"willautorenew":                "willAutoRenew",
}

CrOSDevAttrMap provides lowercase mappings to valid admin.ChromeOsDevice attributes

View Source
var QueryAttrMap = map[string]string{
	"assetid":      "asset_id",
	"asset_id":     "asset_id",
	"ethernetmac":  "ethernet_mac",
	"ethernet_mac": "ethernet_mac",
	"id":           "id",
	"location":     "location",
	"note":         "note",
	"recentuser":   "recent_user",
	"recent_user":  "recent_user",
	"register":     "register",
	"status":       "status",
	"sync":         "sync",
	"user":         "user",
	"wifimac":      "wifi_mac",
	"wifi_mac":     "wifi_mac",
}

QueryAttrMap provides lowercase mappings to valid admin.ChromeOsDevice query attributes

View Source
var ValidActions = []string{
	"deprovision",
	"disable",
	"reenable",
}

ValidActions provide valid strings to be used for admin.ChromeosdevicesActionCall

View Source
var ValidDeprovisionReasons = []string{
	"different_model_replacement",
	"retiring_device",
	"same_model_replacement",
	"upgrade_transfer",
}

ValidDeprovisionReasons provide valid strings to be used for admin.ChromeosdevicesActionCall

View Source
var ValidOrderByStrs = []string{
	"annotatedlocation",
	"annotateduser",
	"lastsync",
	"notes",
	"serialnumber",
	"status",
	"supportenddate",
}

ValidOrderByStrs provide valid strings to be used to set admin.ChromeosdevicesListCall OrderBy

View Source
var ValidProjections = []string{
	"basic",
	"full",
}

ValidProjections provide valid strings to be used to set admin.ChromeosdevicesListCall Projection

Functions

func AddFields

func AddFields(callObj interface{}, attrs string) interface{}

AddFields adds fields to be returned from admin calls

func AddMaxResults

func AddMaxResults(cdlc *admin.ChromeosdevicesListCall, maxResults int64) *admin.ChromeosdevicesListCall

AddMaxResults adds MaxResults to admin calls

func AddOrderBy

AddOrderBy adds OrderBy to admin calls

func AddOrgUnitPath

func AddOrgUnitPath(cdlc *admin.ChromeosdevicesListCall, orgUnitPath string) *admin.ChromeosdevicesListCall

AddOrgUnitPath adds OrgUnitPath to admin calls

func AddPageToken

AddPageToken adds PageToken to admin calls

func AddProjection

func AddProjection(callObj interface{}, projection string) interface{}

AddProjection adds Projection to admin calls

func AddQuery

AddQuery adds query to admin calls

func AddSortOrder

func AddSortOrder(cdlc *admin.ChromeosdevicesListCall, sortorder string) *admin.ChromeosdevicesListCall

AddSortOrder adds SortOrder to admin calls

func DoGet

DoGet calls the .Do() function on the admin.ChromeosdevicesGetCall

func DoList

DoList calls the .Do() function on the admin.ChromeosdevicesListCall

func PopulateCrOSDev added in v0.8.0

func PopulateCrOSDev(crosdev *admin.ChromeOsDevice, hdrMap map[int]string, objData []interface{}) error

PopulateCrOSDev is used in batch processing

func PopulateManagedDev added in v0.8.0

func PopulateManagedDev(managedDev *ManagedDevice, hdrMap map[int]string, objData []interface{}) error

PopulateManagedDev is used in batch processing

func PopulateMovedDev added in v0.8.0

func PopulateMovedDev(movedDev *MovedDevice, hdrMap map[int]string, objData []interface{}) error

PopulateMovedDev is used in batch processing

func ShowAttrValues added in v0.6.0

func ShowAttrValues(lenArgs int, args []string, filter string) error

ShowAttrValues displays enumerated attribute values

func ShowAttrs added in v0.6.0

func ShowAttrs(filter string)

ShowAttrs displays requested chromeOS device attributes

func ShowCompAttrs added in v0.6.0

func ShowCompAttrs(filter string)

ShowCompAttrs displays chromeOS device composite attributes

func ShowFlagValues added in v0.6.0

func ShowFlagValues(lenArgs int, args []string, filter string) error

ShowFlagValues displays enumerated flag values

func ShowSubAttrs added in v0.6.0

func ShowSubAttrs(compAttr string, filter string) error

ShowSubAttrs displays attributes of composite attributes

Types

type ManagedDevice added in v0.7.0

type ManagedDevice struct {
	Action            string
	DeviceId          string
	DeprovisionReason string
}

ManagedDevice is struct to extract device data

type MovedDevice added in v0.7.0

type MovedDevice struct {
	DeviceId    string
	OrgUnitPath string
}

MovedDevice is struct to extract device data

Jump to

Keyboard shortcuts

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