mobiledevices

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: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ENDFIELD is List call attribute string terminator
	ENDFIELD string = ")"
	// KEYNAME is name of key for processing
	KEYNAME string = "resourceId"
	// STARTMOBDEVICESFIELD is List call attribute string prefix
	STARTMOBDEVICESFIELD string = "mobiledevices("
)

Variables

View Source
var MobDevAttrMap = map[string]string{
	"adbstatus":                      "adbStatus",
	"action":                         "action",
	"applications":                   "applications",
	"basebandversion":                "basebandVersion",
	"bootloaderversion":              "bootloaderVersion",
	"brand":                          "brand",
	"buildnumber":                    "buildNumber",
	"defaultlanguage":                "defaultLanguage",
	"developeroptionsstatus":         "developerOptionsStatus",
	"devicecompromisedstatus":        "deviceCompromisedStatus",
	"deviceid":                       "deviceId",
	"devicepasswordstatus":           "devicePasswordStatus",
	"displayname":                    "displayName",
	"email":                          "email",
	"encryptionstatus":               "encryptionStatus",
	"etag":                           "etag",
	"firstsync":                      "firstSync",
	"forcesendfields":                "forceSendFields",
	"hardware":                       "hardware",
	"hardwareid":                     "hardwareId",
	"imei":                           "imei",
	"kernelversion":                  "kernelVersion",
	"kind":                           "kind",
	"lastsync":                       "lastSync",
	"managedaccountisonownerprofile": "managedAccountIsOnOwnerProfile",
	"manufacturer":                   "manufacturer",
	"meid":                           "meid",
	"model":                          "model",
	"name":                           "name",
	"networkoperator":                "networkOperator",
	"os":                             "os",
	"otheraccountsinfo":              "otherAccountsInfo",
	"packagename":                    "packageName",
	"permission":                     "permission",
	"privilege":                      "privilege",
	"releaseversion":                 "releaseVersion",
	"resourceid":                     "resourceId",
	"securitypatchlevel":             "securityPatchLevel",
	"serialnumber":                   "serialNumber",
	"status":                         "status",
	"supportsworkprofile":            "supportsWorkProfile",
	"type":                           "type",
	"unknownsourcesstatus":           "unknownSourcesStatus",
	"useragent":                      "userAgent",
	"versioncode":                    "versionCode",
	"versionname":                    "versionName",
	"wifimacaddress":                 "wifiMacAddress",
}

MobDevAttrMap provides lowercase mappings to valid admin.MobileDevice attributes

View Source
var QueryAttrMap = map[string]string{
	"brand":        "brand",
	"email":        "email",
	"hardware":     "hardware",
	"id":           "id",
	"imei":         "imei",
	"manufacturer": "manufacturer",
	"meid":         "meid",
	"model":        "model",
	"name":         "name",
	"os":           "os",
	"serial":       "serial",
	"status":       "status",
	"sync":         "sync",
	"type":         "type",
}

QueryAttrMap provides lowercase mappings to valid admin.MobileDevice query attributes

View Source
var ValidActions = []string{
	"admin_account_wipe",
	"admin_remote_wipe",
	"approve",
	"block",
	"cancel_remote_wipe_then_activate",
	"cancel_remote_wipe_then_block",
}

ValidActions provide valid strings to be used for admin.MobiledevicesActionCall

View Source
var ValidOrderByStrs = []string{
	"deviceid",
	"email",
	"lastsync",
	"model",
	"name",
	"os",
	"status",
	"type",
}

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

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

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

Functions

func AddFields

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

AddFields adds fields to be returned from admin calls

func AddMaxResults

func AddMaxResults(mdlc *admin.MobiledevicesListCall, maxResults int64) *admin.MobiledevicesListCall

AddMaxResults adds MaxResults to admin calls

func AddOrderBy

func AddOrderBy(mdlc *admin.MobiledevicesListCall, orderBy string) *admin.MobiledevicesListCall

AddOrderBy adds OrderBy to admin calls

func AddPageToken

func AddPageToken(mdlc *admin.MobiledevicesListCall, token string) *admin.MobiledevicesListCall

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(mdlc *admin.MobiledevicesListCall, sortorder string) *admin.MobiledevicesListCall

AddSortOrder adds SortOrder to admin calls

func DoGet

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

func DoList

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

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 ShowAttrValues

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

ShowAttrValues displays enumerated attribute values

func ShowAttrs

func ShowAttrs(filter string)

ShowAttrs displays requested chromeOS device attributes

func ShowCompAttrs

func ShowCompAttrs(filter string)

ShowCompAttrs displays chromeOS device composite attributes

func ShowFlagValues

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

ShowFlagValues displays enumerated flag values

func ShowSubAttrs

func ShowSubAttrs(compAttr string, filter string) error

ShowSubAttrs displays attributes of composite attributes

Types

type ManagedDevice

type ManagedDevice struct {
	Action     string
	ResourceId string
}

ManagedDevice is struct to extract device data

Jump to

Keyboard shortcuts

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