Documentation ¶
Overview ¶
pkg/google/drive.go
pkg/google/api.go
pkg/google/drive.go
pkg/google/drive.go
pkg/google/entities.go
pkg/google/google.go
pkg/google/permissions.go
pkg/google/sheets.go
pkg/google/users.go
Index ¶
- Constants
- Variables
- func DedupeScopes(slice []string) []string
- func FetchDirectoryEndpoints() (*DirectoryList, *Endpoints, error)
- func LoadScopes(service string) ([]string, error)
- func OrganizeScopes() error
- func ReadDiscoveryDirectory() (*DirectoryList, *Endpoints, error)
- func SaveEndpoints(data interface{}) error
- type ActiveTimeRange
- type ActivityID
- type Actor
- type AdditionalTargetKeyName
- type AdminClient
- func (c *AdminClient) CloneOU(customer *Customer, sourcePath, targetPath string) error
- func (c *AdminClient) GenerateRoleReport(roleId string, customer *Customer) ([]*RoleReport, error)
- func (c *AdminClient) GetAssignmentsForRole(roleId string, customer *Customer) (*RoleAssignment, error)
- func (c *AdminClient) GetFileOwnership(fileID string) (string, error)
- func (c *AdminClient) GetOU(customer *Customer, orgUnitPath string) (*OrgUnit, error)
- func (c *AdminClient) GetRole(roleId string, customer *Customer) (*Role, error)
- func (c *AdminClient) GetUsersFromRoleAssignments(sem chan struct{}, roleAssignments []RoleAssignment) ([]*User, error)
- func (c *AdminClient) ListAllRoleAssignments(customer *Customer) (*RoleAssignment, error)
- func (c *AdminClient) ListAllRoles(customer *Customer) (*Roles, error)
- func (c *AdminClient) MyCustomer() (*Customer, error)
- func (c *AdminClient) RootOU(customer *Customer) (*OrgUnit, error)
- func (c *AdminClient) SaveRoleReport(reports []*RoleReport) (*Spreadsheet, error)
- type AllowedScopes
- type AuthCredentials
- type AuthDetail
- type AutoResizeDimensionsRequest
- type BandedRange
- type BandingProperties
- type BasicFilter
- type BigQueryDataSourceSpec
- type BigQueryQuerySpec
- type BigQueryTableSpec
- type BooleanRule
- type Borders
- type CState
- type Capabilities
- type CellData
- type CellFormat
- type ChartSpec
- type ChromeOSDevice
- type ChromeOSDevices
- type Client
- func (c *Client) Admin() *AdminClient
- func (c *Client) BuildURL(endpoint string, customer *Customer, parameters ...string) string
- func (c *Client) Devices() *DeviceClient
- func (c *Client) Drive() *DriveClient
- func (c *Client) GenerateJWT(data []byte) (*requests.Client, error)
- func (c *Client) GetCache(key string, target interface{}) bool
- func (c *Client) ImpersonateUser(email string) error
- func (c *Client) Permissions() *PermissionsClient
- func (c *Client) SetCache(key string, value interface{}, duration time.Duration)
- func (c *Client) Sheets() *SheetsClient
- func (c *Client) Users() *UsersClient
- type Color
- type ColorStyle
- type ConditionalFormatRule
- type ContentHints
- type ContentRestriction
- type ContentType
- type CpuInfo
- type CpuStatusReport
- type CpuTemperatureInfo
- type Customer
- type CustomerPostalAddress
- type DataExecutionStatus
- type DataSource
- type DataSourceColumn
- type DataSourceColumnReference
- type DataSourceFormula
- type DataSourceParameter
- type DataSourceRefreshDailySchedule
- type DataSourceRefreshMonthlySchedule
- type DataSourceRefreshSchedule
- type DataSourceRefreshWeeklySchedule
- type DataSourceSheetDimensionRange
- type DataSourceSheetProperties
- type DataSourceSpec
- type DataSourceTable
- type DataValidationRule
- type DayOfWeek
- type DescriptorProto
- type DeveloperMetadata
- type DeveloperMetadataLocation
- type DeveloperMetadataLocationType
- type DeviceClient
- func (c *DeviceClient) ListAllChromeOS(customer *Customer) (*ChromeOSDevices, error)
- func (c *DeviceClient) ListAllDevicePolicySchemas(customer *Customer) (*PolicySchemas, error)
- func (c *DeviceClient) ListAllProvisionedChromeOS(customer *Customer) (*ChromeOSDevices, error)
- func (c *DeviceClient) MaxResults(max int) *DeviceClient
- func (c *DeviceClient) PageToken(token string) *DeviceClient
- func (c *DeviceClient) Query(query string) *DeviceClient
- func (c *DeviceClient) ResolvePolicySchemas(customer *Customer, ou *OrgUnit) (*ResolvedPolicies, error)
- type DeviceFile
- type DeviceQuery
- type DimensionGroup
- type DimensionProperties
- type DimensionRange
- type DirectoryItem
- type DirectoryList
- type DiskVolumeReport
- type DriveClient
- func (c *DriveClient) CopyFileToFolder(file *File, folder *File) error
- func (c *DriveClient) CreateFile(file *File) (*File, error)
- func (c *DriveClient) GetFile(driveID string) (*File, error)
- func (c *DriveClient) GetFileList(file *File, q *DriveFileQuery) (*FileList, error)
- func (c *DriveClient) GetFilePath(id string) (string, error)
- func (c *DriveClient) GetRootFileList() (*FileList, error)
- func (c *DriveClient) MoveFileToFolder(file *File, folder *File) error
- func (c *DriveClient) SaveFileListToSheet(fileList *FileList, sheetID string, headers *[]string) error
- type DriveFileQuery
- type Editors
- type Email
- type EmbeddedChart
- type EmbeddedObjectBorder
- type EmbeddedObjectPosition
- type Endpoint
- type Endpoints
- type Entity
- type ErrorDetail
- type ErrorItem
- type ErrorResponse
- type ErrorValue
- type Event
- type ExtendedValue
- type ExternalID
- type Field
- type FieldConstraints
- type FieldDescriptorProto
- type File
- type FileDescriptorProto
- type FileList
- type FileUser
- type FilterCriteria
- type FilterSpec
- type FilterView
- type Gender
- type GoogleAPIResponse
- type GoogleConfig
- type GradientRule
- type GridData
- type GridProperties
- type GridRange
- type HorizontalAlign
- type IM
- type Icon
- type ImageMediaMetadata
- type Interval
- type IterativeCalculationSettings
- type Label
- type LabelInfo
- type Language
- type LastKnownNetwork
- type LinkShareMetadata
- type Location
- type LogicalCpu
- type NamedRange
- type Note
- type NumberFormat
- type NumericRangeConstraint
- type Oauth2Scopes
- type OrderBy
- type OrgUnit
- type Organization
- type OsUpdateStatus
- type POSIXAccount
- type Padding
- type Password
- type Permission
- type PermissionDetail
- type PermissionList
- type PermissionsClient
- type PermissionsQuery
- type Phone
- type PivotFilterCriteria
- type PivotFilterSpec
- type PivotGroup
- type PivotGroupLimit
- type PivotGroupRule
- type PivotGroupSortValueBucket
- type PivotGroupValueMetadata
- type PivotTable
- type PivotValue
- type PivotValueLayout
- type PolicyAPILifecycle
- type PolicyAPILifecycleStage
- type PolicyModificationRequest
- type PolicyModificationRequests
- type PolicyQuery
- type PolicyRequest
- type PolicySchema
- type PolicySchemaFieldDependencies
- type PolicySchemaFieldDescription
- type PolicySchemaFieldKnownValueDescription
- type PolicySchemaNoticeDescription
- type PolicySchemaRequiredItems
- type PolicySchemas
- type PolicyTargetKey
- type PolicyValue
- type ProtectedRange
- type RecalculationInterval
- type RecentUser
- type Relation
- type RepeatCellRequest
- type Report
- type ReportParameter
- type ReportsQuery
- type ResolvedPolicies
- type ResolvedPolicy
- type Role
- type RoleAssignment
- type RolePrivilege
- type RoleReport
- type Roles
- type RowData
- type SSHPublicKey
- type ScopeDetail
- type ScreenshotFile
- type ServiceAccount
- type SetBasicFilterRequest
- type Sheet
- type SheetBatchRequest
- type SheetLink
- type SheetProperties
- type SheetRequest
- type SheetType
- type SheetValueQuery
- type SheetsClient
- func (c *SheetsClient) AppendSpreadsheet(spreadsheetID string, vr *ValueRange) error
- func (c *SheetsClient) CreateSpreadsheet(s *Spreadsheet) (*Spreadsheet, error)
- func (c *SheetsClient) FormatHeaderAndAutoSize(spreadsheetID string, sheet *Sheet, rows, columns int) error
- func (c *SheetsClient) GenerateValueRange(data []interface{}, sheetName string, headers *[]string) *ValueRange
- func (c *SheetsClient) GetSpreadsheet(sheetID string) (*Spreadsheet, error)
- func (c *SheetsClient) ReadSpreadsheetValues(sheetID, rangeNotation string) (*ValueRange, error)
- func (c *SheetsClient) SaveToSheet(data interface{}, sheetID, sheetName string, headers *[]string) error
- func (c *SheetsClient) UpdateSpreadsheet(spreadsheetID string, vr *ValueRange) error
- func (c *SheetsClient) VerifySheetValueRange(vr *ValueRange) error
- type ShortcutDetails
- type Slicer
- type SlicerSpec
- type SortOrder
- type SortSpec
- type SortedPolicies
- type Spreadsheet
- type SpreadsheetProperties
- type SpreadsheetTheme
- type SystemRamFreeReport
- type TargetResource
- type TextFormat
- type TextFormatRun
- type TextRotation
- type ThemeColorPair
- type Thumbnail
- type TimeOfDay
- type TpmVersionInfo
- type UpdateDimensionPropertiesRequest
- type UploadedFileConstraints
- type User
- type UserEvent
- type UserLocation
- type UserName
- type UserProjection
- type UserQuery
- type UserViewType
- type Users
- type UsersClient
- type ValueRange
- type VideoMediaMetadata
- type VolumeInfo
- type Warning
- type WarningData
- type Website
Constants ¶
const ( API_KEY = "api_key" OAUTH_CLIENT = "oauth_client" SERVICE_ACCOUNT = "service_account" BaseURL = "https://www.googleapis.com" AdminBaseURL = "https://admin.googleapis.com" ChromeBaseURL = "https://chromepolicy.googleapis.com" OAuthURL = "https://accounts.google.com/o/oauth2/auth" OAuthTokenURL = "https://oauth2.googleapis.com/token" JWTTokenURL = "https://oauth2.googleapis.com/token" )
Variables ¶
var ( AdminDirectory = fmt.Sprintf("%s/admin/directory/v1", AdminBaseURL) // https://developers.google.com/admin-sdk/reference-overview DirectoryASPS = fmt.Sprintf("%s/users/%s/asps", AdminDirectory, "%s") // https://developers.google.com/admin-sdk/directory/reference/rest/v1/asps DirectoryChannels = fmt.Sprintf("%s/channels", AdminDirectory) // https://developers.google.com/admin-sdk/directory/reference/rest/v1/channels DirectoryChromeOSDevices = fmt.Sprintf("%s/customer/%s/devices/chromeos", AdminDirectory, "%s") // https://developers.google.com/admin-sdk/directory/reference/rest/v1/chromeosdevices DirectoryCustomers = fmt.Sprintf("%s/customers/%s", AdminDirectory, "%s") // https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers DirectoryDomains = fmt.Sprintf("%s/domains", AdminDirectory) // https://developers.google.com/admin-sdk/directory/reference/rest/v1/domains DirectoryGroups = fmt.Sprintf("%s/groups", AdminDirectory) // https://developers.google.com/admin-sdk/directory/reference/rest/v1/groups DirectoryMembers = fmt.Sprintf("%s/groups/%s/members", AdminDirectory, "%s") // https://developers.google.com/admin-sdk/directory/reference/rest/v1/members DirectoryMobileDevices = fmt.Sprintf("%s/customer/%s/devices/mobile", AdminDirectory, "%s") // https://developers.google.com/admin-sdk/directory/reference/rest/v1/mobiledevices DirectoryOrgUnits = fmt.Sprintf("%s/customer/%s/orgunits", AdminDirectory, "%s") // https://developers.google.com/admin-sdk/directory/reference/rest/v1/orgunits DirectoryPrivileges = fmt.Sprintf("%s/privileges", AdminDirectory) // https://developers.google.com/admin-sdk/directory/reference/rest/v1/privileges DirectoryResources = fmt.Sprintf("%s/customer/%s/resources", AdminDirectory, "%s") // https://developers.google.com/admin-sdk/directory/reference/rest/v1/resources DirectoryRoleAssignments = fmt.Sprintf("%s/customer/%s/roleassignments", AdminDirectory, "%s") // https://developers.google.com/admin-sdk/directory/reference/rest/v1/roleassignments DirectoryRoles = fmt.Sprintf("%s/customer/%s/roles", AdminDirectory, "%s") // https://developers.google.com/admin-sdk/directory/reference/rest/v1/roles DirectorySchemas = fmt.Sprintf("%s/schemas", AdminDirectory) // https://developers.google.com/admin-sdk/directory/reference/rest/v1/schemas DirectoryTokens = fmt.Sprintf("%s/tokens", AdminDirectory) // https://developers.google.com/admin-sdk/directory/reference/rest/v1/tokens DirectoryUsers = fmt.Sprintf("%s/users", AdminDirectory) // https://developers.google.com/admin-sdk/directory/reference/rest/v1/users AdminDirectoryBeta = fmt.Sprintf("%s/admin/directory/v1.1beta1", AdminBaseURL) // https://support.google.com/chrome/a/answer/9681204?ref_topic=9301744 DirectoryChromeBrowsers = fmt.Sprintf("%s/customer/%s/devices/chromebrowsers", AdminDirectoryBeta, "%s") // https://support.google.com/chrome/a/answer/9681204?ref_topic=9301744 AdminReports = fmt.Sprintf("%s/admin/reports/v1", AdminBaseURL) // https://developers.google.com/admin-sdk/reports/reference/rest ReportsActivities = fmt.Sprintf("%s/activity/users/%s/applications/%s", AdminReports, "%s", "%s") // https://developers.google.com/admin-sdk/reports/reference/rest/v1/activities ReportsChannels = fmt.Sprintf("%s/channels", AdminReports) // https://developers.google.com/admin-sdk/reports/reference/rest/v1/channels ReportsCustomerUsage = fmt.Sprintf("%s/customerUsageReports", AdminReports) // https://developers.google.com/admin-sdk/reports/reference/rest/v1/customerUsageReports ReportsEntityUsage = fmt.Sprintf("%s/entityUsageReports", AdminReports) // https://developers.google.com/admin-sdk/reports/reference/rest/v1/entityUsageReports ReportsUserUsage = fmt.Sprintf("%s/userUsageReport", AdminReports) // https://developers.google.com/admin-sdk/reports/reference/rest/v1/userUsageReport )
var ( V1_ChromeBaseURL = fmt.Sprintf("%s/v1/customers", ChromeBaseURL) DevicePolicies = fmt.Sprintf("%s/%s/policies", V1_ChromeBaseURL, "%s") DevicePolicySchemas = fmt.Sprintf("%s/%s/policySchemas", V1_ChromeBaseURL, "%s") )
var ( DriveBaseURL = fmt.Sprintf("%s/drive/v3", BaseURL) // https://developers.google.com/drive/api/v3/reference/ DriveAbout = fmt.Sprintf("%s/about", DriveBaseURL) // https://developers.google.com/drive/api/v3/reference/about DriveChanges = fmt.Sprintf("%s/changes", DriveBaseURL) // https://developers.google.com/drive/api/v3/reference/changes DriveChannels = fmt.Sprintf("%s/channels", DriveBaseURL) // https://developers.google.com/drive/api/v3/reference/channels DriveComments = fmt.Sprintf("%s/comments", DriveBaseURL) // https://developers.google.com/drive/api/v3/reference/comments DriveFiles = fmt.Sprintf("%s/files", DriveBaseURL) // https://developers.google.com/drive/api/v3/reference/files DrivePermissions = fmt.Sprintf("%s/permissions", DriveBaseURL) // https://developers.google.com/drive/api/v3/reference/permissions DriveReplies = fmt.Sprintf("%s/replies", DriveBaseURL) // https://developers.google.com/drive/api/v3/reference/replies DriveRevisions = fmt.Sprintf("%s/revisions", DriveBaseURL) // https://developers.google.com/drive/api/v3/reference/revisions )
var ( SheetsBaseURL = "https://sheets.googleapis.com/v4" Sheets = fmt.Sprintf("%s/spreadsheets", SheetsBaseURL) // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets SheetByID = fmt.Sprintf("%s/%s", Sheets, "%s") // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/get SheetValuesRange = fmt.Sprintf("%s/%s/values/%s", Sheets, "%s", "%s") // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/get SheetValuesBatchGet = fmt.Sprintf("%s/%s/values:batchGet", Sheets, "%s") // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/batchGet SheetValuesBatchUpdate = fmt.Sprintf("%s/%s/values:batchUpdate", Sheets, "%s") // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/batchUpdate SheetValuesAppend = fmt.Sprintf("%s/%s/values/%s:append", Sheets, "%s", "%s") // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append )
Functions ¶
func FetchDirectoryEndpoints ¶
func FetchDirectoryEndpoints() (*DirectoryList, *Endpoints, error)
FetchGoogleAPIScopes ¶
func OrganizeScopes ¶
func OrganizeScopes() error
Organize Scopes from Google API Endpoints ¶
Organizes the scopes from the Google API endpoints into a map of scopes by service
func ReadDiscoveryDirectory ¶
func ReadDiscoveryDirectory() (*DirectoryList, *Endpoints, error)
ReadDiscoveryDirectory ¶
Reads the Google API discovery directory from a local file
func SaveEndpoints ¶
func SaveEndpoints(data interface{}) error
SaveEndpoints ¶
Saves Google API endpoints to a JSON file
Types ¶
type ActiveTimeRange ¶
type ActiveTimeRange struct { ActiveTime int `json:"activeTime,omitempty"` // Duration of usage in milliseconds. Date string `json:"date,omitempty"` // Date of usage. }
ActiveTimeRange represents an active time range of the device.
type ActivityID ¶
type ActivityID struct { Time string `json:"time,omitempty"` // Time of occurrence of the activity UniqueQualifier string `json:"uniqueQualifier,omitempty"` // Unique qualifier if multiple events have the same time ApplicationName string `json:"applicationName,omitempty"` // Application name to which the event belongs CustomerID string `json:"customerId,omitempty"` // The unique identifier for a Google Workspace account }
type Actor ¶
type Actor struct { ProfileID string `json:"profileId,omitempty"` // The unique Google Workspace profile ID of the actor Email string `json:"email,omitempty"` // The primary email address of the actor CallerType string `json:"callerType,omitempty"` // The type of actor Key string `json:"key,omitempty"` // Key present when callerType is KEY }
type AdditionalTargetKeyName ¶
type AdditionalTargetKeyName struct { Key string `json:"key,omitempty"` // Key name. KeyDescription string `json:"keyDescription,omitempty"` // Key description. }
AdditionalTargetKeyName represents additional key names for identifying policy value targets.
type AdminClient ¶
type AdminClient struct {
*Client
}
AdminClient for chaining methods
func (*AdminClient) CloneOU ¶
func (c *AdminClient) CloneOU(customer *Customer, sourcePath, targetPath string) error
* Clone Chrome Policies for Organization Units by Path * chromepolicy.googleapis.com/v1/{customer=customers/*}/policies/orgunits:batchModify * https://developers.google.com/chrome/policy/reference/rest/v1/customers.policies.orgunits/batchModify
func (*AdminClient) GenerateRoleReport ¶
func (c *AdminClient) GenerateRoleReport(roleId string, customer *Customer) ([]*RoleReport, error)
* Get all Users assigned to a Role within a target customer/domain * /admin/directory/v1/customer/{customer}/roleassignments/{roleId}/users * https://developers.google.com/admin-sdk/directory/v1/reference/roleAssignments/list
func (*AdminClient) GetAssignmentsForRole ¶
func (c *AdminClient) GetAssignmentsForRole(roleId string, customer *Customer) (*RoleAssignment, error)
* Get assignments for a targeted Role * /admin/directory/v1/customer/{customer}/roleassignments * https://developers.google.com/admin-sdk/directory/reference/rest/v1/roleAssignments/list#query-parameters
func (*AdminClient) GetFileOwnership ¶
func (c *AdminClient) GetFileOwnership(fileID string) (string, error)
* Find the file ownership using the Reports API
func (*AdminClient) GetOU ¶
func (c *AdminClient) GetOU(customer *Customer, orgUnitPath string) (*OrgUnit, error)
* Get Organization Unit ID by Path * /admin/directory/v1/customer/{customerId}/orgunits/{orgUnitPath=**} * https://developers.google.com/admin-sdk/directory/reference/rest/v1/orgunits/get
func (*AdminClient) GetRole ¶
func (c *AdminClient) GetRole(roleId string, customer *Customer) (*Role, error)
* Get a Role by ID * /admin/directory/v1/customer/{customer}/roles/{roleId} * https://developers.google.com/admin-sdk/directory/v1/reference/roles/get
func (*AdminClient) GetUsersFromRoleAssignments ¶
func (c *AdminClient) GetUsersFromRoleAssignments(sem chan struct{}, roleAssignments []RoleAssignment) ([]*User, error)
* Create user list from a role's assignments * /admin/directory/v1/customer/{customer}/roleassignments * https://developers.google.com/admin-sdk/directory/v1/reference/roleAssignments/list
func (*AdminClient) ListAllRoleAssignments ¶
func (c *AdminClient) ListAllRoleAssignments(customer *Customer) (*RoleAssignment, error)
* Get all Role's Assignments within a target customer/domain * /admin/directory/v1/customer/{customer}/roleassignments * https://developers.google.com/admin-sdk/directory/v1/reference/roleAssignments/list
func (*AdminClient) ListAllRoles ¶
func (c *AdminClient) ListAllRoles(customer *Customer) (*Roles, error)
* List all Roles in the domain with pagination support * /admin/directory/v1/customer/{customer}/roles * https://developers.google.com/admin-sdk/directory/v1/reference/roles/list
func (*AdminClient) MyCustomer ¶
func (c *AdminClient) MyCustomer() (*Customer, error)
* List all Roles in the domain with pagination support * /admin/directory/v1/customer/{customer}/roles * https://developers.google.com/admin-sdk/directory/v1/reference/roles/list
func (*AdminClient) RootOU ¶
func (c *AdminClient) RootOU(customer *Customer) (*OrgUnit, error)
* Get Root Organization Unit of current customer * /admin/directory/v1/customer/{customerId}/orgunits/{orgUnitPath=**} * https://developers.google.com/admin-sdk/directory/reference/rest/v1/orgunits/get
func (*AdminClient) SaveRoleReport ¶
func (c *AdminClient) SaveRoleReport(reports []*RoleReport) (*Spreadsheet, error)
* Save a RoleReport to a new spreadsheet * @param reports: A slice of RoleReport structs * @return *Spreadsheet: A pointer to the newly created spreadsheet
type AllowedScopes ¶
type AllowedScopes map[string]ScopeDetail
type AuthCredentials ¶
type AuthCredentials struct { Type string // api_key, oauth_client, service_account Credentials string CICD bool // If true, will use environmental variables Scopes []string // Scopes to use for OAuth Subject string // Subject to impersonate }
### Google Client Structs ---------------------------------------------------------------------
type AuthDetail ¶
type AuthDetail struct {
Oauth2 Oauth2Scopes `json:"oauth2,omitempty"`
}
type AutoResizeDimensionsRequest ¶
type AutoResizeDimensionsRequest struct { Dimensions interface{} `json:"dimensions,omitempty"` // The dimensions to resize on the sheet DataSourceSheetDimensions interface{} `json:"dataSourceSheetDimensions,omitempty"` // The dimensions to resize on the data source sheet }
AutoResizeDimensionsRequest represents a request to auto resize dimensions. https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#autoresizedimensionsrequest
type BandedRange ¶
type BandedRange struct { BandedRangeID int `json:"bandedRangeId,omitempty"` // ID of the banded range ColumnProperties *BandingProperties `json:"columnProperties,omitempty"` // Properties of the columns in the banded range Range *GridRange `json:"range,omitempty"` // Range of the banded range RowProperties *BandingProperties `json:"rowProperties,omitempty"` // Properties of the rows in the banded range }
BandedRange represents a banded (alternating colors) range.
type BandingProperties ¶
type BandingProperties interface{}
type BasicFilter ¶
type BasicFilter struct { Criteria map[string]FilterCriteria `json:"criteria,omitempty"` // Criteria of the basic filter FilterSpecs []FilterSpec `json:"filterSpecs,omitempty"` // Specifications of the basic filter Range *GridRange `json:"range,omitempty"` // Range of the basic filter SortSpecs []SortSpec `json:"sortSpecs,omitempty"` // Sort specifications of the basic filter }
BasicFilter represents a basic filter. https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/sheets#basicfilter
type BigQueryDataSourceSpec ¶
type BigQueryDataSourceSpec struct { ProjectID string `json:"projectId,omitempty"` // Project ID of the BigQuery data source QuerySpec *BigQueryQuerySpec `json:"querySpec,omitempty"` // Specifications for a BigQuery query TableSpec *BigQueryTableSpec `json:"tableSpec,omitempty"` // Specifications for a BigQuery table }
BigQueryDataSourceSpec represents the specifications of a BigQuery data source.
type BigQueryQuerySpec ¶
type BigQueryQuerySpec struct {
RawQuery string `json:"rawQuery,omitempty"` // Raw query string for the BigQuery
}
BigQueryQuerySpec represents the specifications of a BigQuery query.
type BigQueryTableSpec ¶
type BigQueryTableSpec struct { TableProjectID string `json:"tableProjectId,omitempty"` // Project ID of the table TableID string `json:"tableId,omitempty"` // ID of the table DatasetID string `json:"datasetId,omitempty"` // ID of the dataset }
BigQueryTableSpec represents the specifications of a BigQuery table.
type BooleanRule ¶
type BooleanRule struct { }
BooleanRule represents a boolean rule for conditional formatting.
type CState ¶
type CState struct { DisplayName string `json:"displayName,omitempty"` // Name of the state. SessionDuration string `json:"sessionDuration,omitempty"` // Duration in the state. }
CState represents a C-State in the CPU of a Chrome device.
type Capabilities ¶
type Capabilities struct { CanAddChildren bool `json:"canAddChildren,omitempty"` // Whether the current user can add children to this folder. This is always false when the item is not a folder. CanAddFolderFromAnotherDrive bool `json:"canAddFolderFromAnotherDrive,omitempty"` // Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives. CanAddMyDriveParent bool `json:"canAddMyDriveParent,omitempty"` // Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files. CanChangeCopyRequiresWriterPermission bool `json:"canChangeCopyRequiresWriterPermission,omitempty"` // Whether the current user can change the copyRequiresWriterPermission restriction of this file. CanChangeSecurityUpdateEnabled bool `json:"canChangeSecurityUpdateEnabled,omitempty"` // Whether the current user can modify the content restrictions of this file. CanChangeViewersCanCopyContent bool `json:"canChangeViewersCanCopyContent,omitempty"` // Whether the current user can modify the viewersCanCopyContent restriction of this file. CanComment bool `json:"canComment,omitempty"` // Whether the current user can comment on this file. CanCopy bool `json:"canCopy,omitempty"` // Whether the current user can copy this file. For a Team Drive item, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder. CanDelete bool `json:"canDelete,omitempty"` // Whether the current user can delete this file. CanDeleteChildren bool `json:"canDeleteChildren,omitempty"` // Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives. CanDownload bool `json:"canDownload,omitempty"` // Whether the current user can download this file. CanEdit bool `json:"canEdit,omitempty"` // Whether the current user can edit this file. CanListChildren bool `json:"canListChildren,omitempty"` // Whether the current user can list the children of this folder. This is always false when the item is not a folder. CanModifyContent bool `json:"canModifyContent,omitempty"` // Whether the current user can modify the content of this file. CanModifyContentRestriction bool `json:"canModifyContentRestriction,omitempty"` // Whether the current user can modify restrictions on content of this file. CanModifyLabels bool `json:"canModifyLabels,omitempty"` // Whether the current user can modify the file's metadata. CanMoveChildrenOutOfDrive bool `json:"canMoveChildrenOutOfDrive,omitempty"` // Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives. CanMoveChildrenOutOfTeamDrive bool `json:"canMoveChildrenOutOfTeamDrive,omitempty"` // Deprecated - use canMoveChildrenOutOfDrive instead. CanMoveChildrenWithinDrive bool `json:"canMoveChildrenWithinDrive,omitempty"` // Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user's access to the child and to the destination folder. CanMoveChildrenWithinTeamDrive bool `json:"canMoveChildrenWithinTeamDrive,omitempty"` // Deprecated - use canMoveChildrenWithinDrive instead. CanMoveItemIntoTeamDrive bool `json:"canMoveItemIntoTeamDrive,omitempty"` // Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead. CanMoveItemOutOfDrive bool `json:"canMoveItemOutOfDrive,omitempty"` // Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. CanMoveItemOutOfTeamDrive bool `json:"canMoveItemOutOfTeamDrive,omitempty"` // Deprecated - use canMoveItemOutOfDrive instead. CanMoveItemWithinDrive bool `json:"canMoveItemWithinDrive,omitempty"` // Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed. CanMoveItemWithinTeamDrive bool `json:"canMoveItemWithinTeamDrive,omitempty"` // Deprecated - use canMoveItemWithinDrive instead. CanMoveTeamDriveItem bool `json:"canMoveTeamDriveItem,omitempty"` // Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead. CanReadDrive bool `json:"canReadDrive,omitempty"` // Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives. CanReadLabels bool `json:"canReadLabels,omitempty"` // Whether the current user can read the revisions resource of this file. For a Team Drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read. CanReadRevisions bool `json:"canReadRevisions,omitempty"` // Whether the current user can read the revisions resource of this file. For a Team Drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read. CanReadTeamDrive bool `json:"canReadTeamDrive,omitempty"` // Deprecated - use canReadDrive instead. CanRemoveChildren bool `json:"canRemoveChildren,omitempty"` // Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a Team Drive item, whether the current user can remove descendants of this item, or this item itself if it is not a folder, from a shared drive. CanRemoveMyDriveParent bool `json:"canRemoveMyDriveParent,omitempty"` // Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files. CanRename bool `json:"canRename,omitempty"` // Whether the current user can rename this file. CanTrash bool `json:"canTrash,omitempty"` // Whether the current user can move this file to trash. CanTrashChildren bool `json:"canTrashChildren,omitempty"` // Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives. CanUntrash bool `json:"canUntrash,omitempty"` // Whether the current user can restore this file from trash. }
type CellData ¶
type CellData struct { UserEnteredValue *ExtendedValue `json:"userEnteredValue,omitempty"` // User-entered value EffectiveValue *ExtendedValue `json:"effectiveValue,omitempty"` // Effective value FormattedValue string `json:"formattedValue,omitempty"` // Formatted value UserEnteredFormat *CellFormat `json:"userEnteredFormat,omitempty"` // User-entered format EffectiveFormat *CellFormat `json:"effectiveFormat,omitempty"` // Effective format Hyperlink string `json:"hyperlink,omitempty"` // Hyperlink in the cell Note string `json:"note,omitempty"` // Note in the cell TextFormatRuns []TextFormatRun `json:"textFormatRuns,omitempty"` // List of text format runs DataValidation *DataValidationRule `json:"dataValidation,omitempty"` // Data validation rule PivotTable *PivotTable `json:"pivotTable,omitempty"` // Pivot table DataSourceTable *DataSourceTable `json:"dataSourceTable,omitempty"` // Data source table DataSourceFormula *DataSourceFormula `json:"dataSourceFormula,omitempty"` // Data source formula }
CellData represents data in a cell. https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/cells#celldata
type CellFormat ¶
type CellFormat struct { BackgroundColor *Color `json:"backgroundColor,omitempty"` // Background color of the cell BackgroundColorStyle *ColorStyle `json:"backgroundColorStyle,omitempty"` // Style of the background color of the cell Borders *Borders `json:"borders,omitempty"` // Borders of the cell HorizontalAlignment string `json:"horizontalAlignment,omitempty"` // Horizontal alignment of the cell HyperlinkDisplayType string `json:"hyperlinkDisplayType,omitempty"` // Display type of hyperlinks in the cell NumberFormat *NumberFormat `json:"numberFormat,omitempty"` // Number format of the cell Padding *Padding `json:"padding,omitempty"` // Padding of the cell TextDirection string `json:"textDirection,omitempty"` // Text direction in the cell TextFormat *TextFormat `json:"textFormat,omitempty"` // Text format of the cell TextRotation *TextRotation `json:"textRotation,omitempty"` // Text rotation in the cell VerticalAlignment string `json:"verticalAlignment,omitempty"` // Vertical alignment of the cell WrapStrategy string `json:"wrapStrategy,omitempty"` // Wrap strategy of the cell }
CellFormat represents the formatting of a cell. https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/cells#CellFormat
type ChromeOSDevice ¶
type ChromeOSDevice struct { ActiveTimeRanges []ActiveTimeRange `json:"activeTimeRanges,omitempty"` // List of active time ranges. AnnotatedAssetId string `json:"annotatedAssetId,omitempty"` // Asset ID of the device. AnnotatedLocation string `json:"annotatedLocation,omitempty"` // Location of the device. AnnotatedUser string `json:"annotatedUser,omitempty"` // User of the device. AutoUpdateExpiration string `json:"autoUpdateExpiration,omitempty"` // Auto-update expiration date. BootMode string `json:"bootMode,omitempty"` // Boot mode of the device. CpuInfo []CpuInfo `json:"cpuInfo,omitempty"` // Information about the CPU. CpuStatusReports []CpuStatusReport `json:"cpuStatusReports,omitempty"` // CPU status reports. DeprovisionReason string `json:"deprovisionReason,omitempty"` // Reason for deprovisioning. DeviceFiles []DeviceFile `json:"deviceFiles,omitempty"` // Files on the device. DeviceId string `json:"deviceId"` // Unique identifier of the device. DeviceLicenseType string `json:"deviceLicenseType,omitempty"` // License type of the device. DiskVolumeReports []DiskVolumeReport `json:"diskVolumeReports,omitempty"` // Disk volume reports. Etag string `json:"etag,omitempty"` // ETag of the resource. EthernetMacAddress string `json:"ethernetMacAddress,omitempty"` // Ethernet MAC address. EthernetMacAddress0 string `json:"ethernetMacAddress0,omitempty"` // Secondary Ethernet MAC address. FirmwareVersion string `json:"firmwareVersion,omitempty"` // Firmware version. FirstEnrollmentTime string `json:"firstEnrollmentTime,omitempty"` // First enrollment time. Kind string `json:"kind,omitempty"` // Kind of the resource. LastDeprovisionTimestamp string `json:"lastDeprovisionTimestamp,omitempty"` // Last deprovision timestamp. LastEnrollmentTime string `json:"lastEnrollmentTime,omitempty"` // Last enrollment time. LastKnownNetwork []LastKnownNetwork `json:"lastKnownNetwork,omitempty"` // Last known network. LastSync string `json:"lastSync,omitempty"` // Last synchronization time. MacAddress string `json:"macAddress,omitempty"` // MAC address. ManufactureDate string `json:"manufactureDate,omitempty"` // Manufacture date of the device. Meid string `json:"meid,omitempty"` // MEID or IMEI of the mobile card. Model string `json:"model,omitempty"` // Model of the device. Notes string `json:"notes,omitempty"` // Notes about the device. OrderNumber string `json:"orderNumber,omitempty"` // Order number. OrgUnitId string `json:"orgUnitId,omitempty"` // Organizational unit ID. OrgUnitPath string `json:"orgUnitPath,omitempty"` // Organizational unit path. OsUpdateStatus *OsUpdateStatus `json:"osUpdateStatus,omitempty"` // OS update status. OsVersion string `json:"osVersion,omitempty"` // OS version. PlatformVersion string `json:"platformVersion,omitempty"` // Platform version. RecentUsers []RecentUser `json:"recentUsers,omitempty"` // Recent users. ScreenshotFiles []ScreenshotFile `json:"screenshotFiles,omitempty"` // Screenshot files. SerialNumber string `json:"serialNumber"` // Serial number. Status string `json:"status,omitempty"` // Status of the device. SupportEndDate string `json:"supportEndDate,omitempty"` // Support end date. SystemRamFreeReports []SystemRamFreeReport `json:"systemRamFreeReports,omitempty"` // System RAM free reports. SystemRamTotal string `json:"systemRamTotal,omitempty"` // Total system RAM. TPMVersionInfo *TpmVersionInfo `json:"tpmVersionInfo,omitempty"` // TPM version information. WillAutoRenew bool `json:"willAutoRenew,omitempty"` // Auto-renewal status. }
ChromeOSDevice represents a ChromeOS device resource.
type ChromeOSDevices ¶
type ChromeOSDevices struct { Kind string `json:"kind,omitempty"` // The kind of the response ChromeOSDevices *[]*ChromeOSDevice `json:"chromeosdevices,omitempty"` // List of ChromeOS devices NextPageToken string `json:"nextPageToken,omitempty"` // Token for the next page of results }
### Device Structs ---------------------------------------------------------------------------- https://developers.google.com/admin-sdk/directory/v1/guides/manage-chrome-devices
func (ChromeOSDevices) Append ¶
func (c ChromeOSDevices) Append(result interface{})
func (ChromeOSDevices) PageToken ¶
func (c ChromeOSDevices) PageToken() string
type Client ¶
type Client struct { Auth AuthCredentials // Credentials to use for authentication BaseURL string // Base URL to use for API calls OAuth *auth.OAuthConfig // OAuth Config JWT *jwt.Config // JWT Config HTTP *requests.Client // HTTP Client Error *ErrorResponse // Error Log *log.Logger // Logger Cache *cache.Cache // Cache Customer *Customer // Google Workspace Account }
func NewClient ¶
func NewClient(ac AuthCredentials, verbosity int) (*Client, error)
- # Generate Google Workspace Client
- @param auth AuthCredentials
- @param log *log.Logger
- @return *Client
- @return error
- Example:
```go
ac := google.AuthCredentials{ CICD: true, Type: google.SERVICE_ACCOUNT, Scopes: []string{ "Admin SDK API", "Google Drive API", "Google Sheets API", }, Subject: "super.user@domain.com", } g, _ := google.NewClient(ac, log.DEBUG)
```
- Example 2: (Some Scopes may not work with Subject)
```go
ac := google.AuthCredentials{ CICD: true, Type: google.SERVICE_ACCOUNT, Scopes: []string{ "Chrome Policy API", "Chrome Management API", }, } g, _ := google.NewClient(ac, log.DEBUG)
```
- Example 3: Direct URLs
```go
ac := google.AuthCredentials{ CICD: true, Type: google.SERVICE_ACCOUNT, Scopes: []string{ "https://www.googleapis.com/auth/admin.directory.user", }, } g, _ := google.NewClient(ac, log.DEBUG)
```
- Example 4: Transfer Customer context to a new client
```go
ac := google.AuthCredentials{ CICD: true, Type: google.SERVICE_ACCOUNT, Scopes: []string{ "Admin SDK API", }, Subject: "super.user@domain.com", } g, _ := google.NewClient(ac, log.DEBUG) ac.Scopes = []string{ "Chrome Policy API", "Chrome Management API", } chrome, _ := google.NewClient(ac, log.DEBUG) chrome.Customer, _ = g.MyCustomer()
```
func (*Client) Admin ¶
func (c *Client) Admin() *AdminClient
Entry point for admin-related operations
func (*Client) BuildURL ¶
* Build a URL for the Google Workspace API * @param endpoint string * @param customer *Customer * @param parameters ...string * @return string
func (*Client) Devices ¶
func (c *Client) Devices() *DeviceClient
Entry point for device-related operations
func (*Client) Drive ¶
func (c *Client) Drive() *DriveClient
Entry point for drive-related operations
func (*Client) GenerateJWT ¶
* # Generate JWT Client/Tokens for Google Workspace * @param auth AuthCredentials * @param Log *log.Logger * @return *Client * @return error * https://developers.google.com/identity/protocols/oauth2/service-account#jwt-auth
func (*Client) ImpersonateUser ¶
func (*Client) Permissions ¶
func (c *Client) Permissions() *PermissionsClient
Entry point for permissions-related operations
func (*Client) Sheets ¶
func (c *Client) Sheets() *SheetsClient
Entry point for sheets-related operations
func (*Client) Users ¶
func (c *Client) Users() *UsersClient
Entry point for user-related operations
type Color ¶
type Color struct { Alpha float64 `json:"alpha,omitempty"` // Alpha represents the alpha channel value of the color, which should be between 0 and 1 (inclusive) Blue float64 `json:"blue,omitempty"` // Blue represents the blue component of the color, which should be between 0 and 1 (inclusive) Green float64 `json:"green,omitempty"` // Green represents the green component of the color, which should be between 0 and 1 (inclusive) Red float64 `json:"red,omitempty"` // Red represents the red component of the color, which should be between 0 and 1 (inclusive) }
Color represents the color object https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/other#color
type ColorStyle ¶
type ColorStyle struct { RGBColor *Color `json:"rgbColor,omitempty"` // RGBColor represents the RGB color of the style ThemeColor string `json:"themeColor,omitempty"` // ThemeColor represents the theme color type of the style }
ColorStyle represents the color style object https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/other#colorstyle
type ConditionalFormatRule ¶
type ConditionalFormatRule struct { BooleanRule *BooleanRule `json:"booleanRule,omitempty"` // Boolean rule for the conditional format GradientRule *GradientRule `json:"gradientRule,omitempty"` // Gradient rule for the conditional format Ranges []GridRange `json:"ranges,omitempty"` // Ranges that the conditional format rule is applied to }
ConditionalFormatRule represents a conditional formatting rule.
type ContentHints ¶
type ContentHints struct { IndexableText string `json:"indexableText,omitempty"` // Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements. Thumbnail Thumbnail `json:"thumbnail,omitempty"` // A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail. }
type ContentRestriction ¶
type ContentRestriction struct { OwnerRestricted bool `json:"ownerRestricted,omitempty"` // Whether the content restriction can only be modified or removed by a user who owns the file. ReadOnly bool `json:"readOnly,omitempty"` // Whether the content of the file is read-only. Reason string `json:"reason,omitempty"` // Reason for why the content of the file is restricted. RestrictingUser *User `json:"restrictingUser,omitempty"` // The user who set the content restriction. RestrictionTime string `json:"restrictionTime,omitempty"` // The time at which the content restriction was set. Type string `json:"type,omitempty"` // The type of the content restriction. }
https://developers.google.com/drive/api/reference/rest/v3/files#contentrestriction
type ContentType ¶
type ContentType string
ContentType represents types of files that can be uploaded.
const ( CONTENT_TYPE_UNSPECIFIED ContentType = "CONTENT_TYPE_UNSPECIFIED" // Unspecified content type. CONTENT_TYPE_PLAIN_TEXT ContentType = "CONTENT_TYPE_PLAIN_TEXT" // Plain text. CONTENT_TYPE_HTML ContentType = "CONTENT_TYPE_HTML" // HTML. CONTENT_TYPE_IMAGE_JPEG ContentType = "CONTENT_TYPE_IMAGE_JPEG" // JPEG. CONTENT_TYPE_IMAGE_GIF ContentType = "CONTENT_TYPE_IMAGE_GIF" // GIF. CONTENT_TYPE_IMAGE_PNG ContentType = "CONTENT_TYPE_IMAGE_PNG" // PNG. CONTENT_TYPE_JSON ContentType = "CONTENT_TYPE_JSON" // JSON. CONTENT_TYPE_ZIP ContentType = "CONTENT_TYPE_ZIP" // ZIP. CONTENT_TYPE_GZIP ContentType = "CONTENT_TYPE_GZIP" // GZIP. CONTENT_TYPE_CSV ContentType = "CONTENT_TYPE_CSV" // CSV. CONTENT_TYPE_YAML ContentType = "CONTENT_TYPE_YAML" // YAML. CONTENT_TYPE_IMAGE_WEBP ContentType = "CONTENT_TYPE_IMAGE_WEBP" // WEBP. )
type CpuInfo ¶
type CpuInfo struct { Architecture string `json:"architecture,omitempty"` // CPU architecture. LogicalCpus []LogicalCpu `json:"logicalCpus,omitempty"` // Information about logical CPUs. MaxClockSpeedKhz int `json:"maxClockSpeedKhz,omitempty"` // Max CPU clock speed in kHz. Model string `json:"model,omitempty"` // CPU model name. }
CpuInfo represents information about the CPU of the Chrome device.
type CpuStatusReport ¶
type CpuStatusReport struct { ReportTime string `json:"reportTime,omitempty"` // Date and time the report was received. CpuUtilizationPercentageInfo []int `json:"cpuUtilizationPercentageInfo,omitempty"` // CPU utilization percentages. CpuTemperatureInfo []CpuTemperatureInfo `json:"cpuTemperatureInfo,omitempty"` // Information about CPU temperature. }
CpuStatusReport represents a CPU status report of a Chrome device. CpuStatusReport represents a CPU status report of a Chrome device.
type CpuTemperatureInfo ¶
type CpuTemperatureInfo struct { Temperature int `json:"temperature,omitempty"` // Temperature in Celsius degrees. Label string `json:"label,omitempty"` // Label of the CPU. }
CpuTemperatureInfo represents information about CPU temperature in a Chrome device.
type Customer ¶
type Customer struct { ID string `json:"id,omitempty"` // The unique ID for the customer's Google Workspace account. CustomerDomain string `json:"customerDomain,omitempty"` // The customer's primary domain name string. Kind string `json:"kind,omitempty"` // Identifies the resource as a customer. Etag string `json:"etag,omitempty"` // ETag of the resource. AlternateEmail string `json:"alternateEmail,omitempty"` // The customer's secondary contact email address. CustomerCreationTime string `json:"customerCreationTime,omitempty"` // The customer's creation time. PostalAddress *CustomerPostalAddress `json:"postalAddress,omitempty"` // The customer's postal address information. PhoneNumber string `json:"phoneNumber,omitempty"` // The customer's contact phone number in E.164 format. Language string `json:"language,omitempty"` // The customer's ISO 639-2 language code. }
Customer represents a Google Workspace account.
type CustomerPostalAddress ¶
type CustomerPostalAddress struct { CountryCode string `json:"countryCode,omitempty"` // ISO 3166 country code. AddressLine2 string `json:"addressLine2,omitempty"` // Address line 2 of the address. Region string `json:"region,omitempty"` // Name of the region. AddressLine3 string `json:"addressLine3,omitempty"` // Address line 3 of the address. Locality string `json:"locality,omitempty"` // Name of the locality. PostalCode string `json:"postalCode,omitempty"` // The postal code. AddressLine1 string `json:"addressLine1,omitempty"` // A customer's physical address line 1. OrganizationName string `json:"organizationName,omitempty"` // The company or company division name. ContactName string `json:"contactName,omitempty"` // The customer contact's name. }
CustomerPostalAddress represents a customer's physical address.
type DataExecutionStatus ¶
type DataExecutionStatus interface{}
type DataSource ¶
type DataSource struct { CalculatedColumns []DataSourceColumn `json:"calculatedColumns,omitempty"` // Calculated columns in the data source DataSourceID string `json:"dataSourceId,omitempty"` // ID of the data source SheetID int `json:"sheetId,omitempty"` // ID of the sheet the data source is in Spec *DataSourceSpec `json:"spec,omitempty"` // Specification of the data source }
DataSource represents a data source in a spreadsheet.
type DataSourceColumn ¶
type DataSourceColumn struct { Formula string `json:"formula,omitempty"` // Formula of the data source column Reference *DataSourceColumnReference `json:"reference,omitempty"` // Reference to the data source column }
DataSourceColumn represents a column in the data source.
type DataSourceColumnReference ¶
type DataSourceColumnReference struct {
Name string `json:"name,omitempty"` // Name of the data source column reference
}
DataSourceColumnReference represents a reference to a column in the data source. https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/other#DataSourceColumnReference
type DataSourceFormula ¶
type DataSourceFormula interface{}
type DataSourceParameter ¶
type DataSourceParameter struct { Name string `json:"name,omitempty"` // Name of the parameter NamedRangeID string `json:"namedRangeId,omitempty"` // ID of the named range Range *GridRange `json:"range,omitempty"` // Grid range of the parameter }
DataSourceParameter represents a parameter of a data source.
type DataSourceRefreshDailySchedule ¶
type DataSourceRefreshDailySchedule struct {
StartTime *TimeOfDay `json:"startTime,omitempty"` // Start time of the daily schedule
}
DataSourceRefreshDailySchedule represents a daily schedule for data source refresh.
type DataSourceRefreshMonthlySchedule ¶
type DataSourceRefreshMonthlySchedule struct { DaysOfMonth []int `json:"daysOfMonth,omitempty"` // Days of the month for the monthly schedule StartTime *TimeOfDay `json:"startTime,omitempty"` // Start time of the monthly schedule }
DataSourceRefreshMonthlySchedule represents a monthly schedule for data source refresh.
type DataSourceRefreshSchedule ¶
type DataSourceRefreshSchedule struct { DailySchedule *DataSourceRefreshDailySchedule `json:"dailySchedule,omitempty"` // Daily refresh schedule Enabled bool `json:"enabled,omitempty"` // Whether the refresh schedule is enabled MonthlySchedule *DataSourceRefreshMonthlySchedule `json:"monthlySchedule,omitempty"` // Monthly refresh schedule NextRun *Interval `json:"nextRun,omitempty"` // The next scheduled run RefreshScope string `json:"refreshScope,omitempty"` // Scope of the refresh WeeklySchedule *DataSourceRefreshWeeklySchedule `json:"weeklySchedule,omitempty"` // Weekly refresh schedule }
DataSourceRefreshSchedule represents a refresh schedule of a data source.
type DataSourceRefreshWeeklySchedule ¶
type DataSourceRefreshWeeklySchedule struct { DaysOfWeek []DayOfWeek `json:"daysOfWeek,omitempty"` // Days of the week for the weekly schedule StartTime *TimeOfDay `json:"startTime,omitempty"` // Start time of the weekly schedule }
DataSourceRefreshWeeklySchedule represents a weekly schedule for data source refresh.
type DataSourceSheetDimensionRange ¶
type DataSourceSheetDimensionRange struct { ColumnReferences []DataSourceColumnReference `json:"columnReferences,omitempty"` // ColumnReferences represents the list of data source column references SheetID int `json:"sheetId,omitempty"` // SheetID represents the ID of the sheet }
DataSourceSheetDimensionRange represents the data source sheet dimension range object https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets#DataDourceSheetDimensionRange
type DataSourceSheetProperties ¶
type DataSourceSheetProperties struct { DataSourceID string `json:"dataSourceId,omitempty"` // ID of the data source Columns []DataSourceColumn `json:"columns,omitempty"` // List of data source columns DataExecutionStatus *DataExecutionStatus `json:"dataExecutionStatus,omitempty"` // Status of the data execution }
DataSourceSheetProperties represents the properties of a data source sheet. https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/sheets#datasourcesheetproperties
type DataSourceSpec ¶
type DataSourceSpec struct { BigQuery *BigQueryDataSourceSpec `json:"bigQuery,omitempty"` // Specifications for a BigQuery data source Parameters []*DataSourceParameter `json:"parameters,omitempty"` // Parameters of the data source }
DataSourceSpec represents the specifications of a data source.
type DataSourceTable ¶
type DataSourceTable interface{}
type DataValidationRule ¶
type DataValidationRule struct { Condition bool `json:"condition,omitempty"` // Condition for the data validation InputMessage string `json:"inputMessage,omitempty"` // Input message for the data validation Strict bool `json:"strict,omitempty"` // Whether the data validation is strict ShowCustomUi bool `json:"showCustomUi,omitempty"` // Whether to show a custom UI for the data validation }
DataValidationRule represents a rule for data validation. https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/other#ExtendedValue
type DescriptorProto ¶
type DescriptorProto struct { Name string `json:"name,omitempty"` // Message type name. Field []FieldDescriptorProto `json:"field,omitempty"` // Fields within this message type. NestedType []DescriptorProto `json:"nestedType,omitempty"` // Nested message types. EnumType []interface{} `json:"enumType,omitempty"` // Enum types within this message. OneofDecl []interface{} `json:"oneofDecl,omitempty"` // Oneof declarations. }
DescriptorProto describes a message type.
type DeveloperMetadata ¶
type DeveloperMetadata struct { Location *DeveloperMetadataLocation `json:"location,omitempty"` // Location of the metadata MetadataID int `json:"metadataId,omitempty"` // ID of the metadata MetadataKey string `json:"metadataKey,omitempty"` // Key of the metadata MetadataValue string `json:"metadataValue,omitempty"` // Value of the metadata Visibility string `json:"visibility,omitempty"` // Visibility of the metadata }
DeveloperMetadata represents metadata associated with a developer.
type DeveloperMetadataLocation ¶
type DeveloperMetadataLocation interface{}
type DeveloperMetadataLocationType ¶
type DeveloperMetadataLocationType int
DeveloperMetadataLocationType represents the type of location on which developer metadata may be associated.
type DeviceClient ¶
type DeviceClient struct { *Client DeviceQuery }
DeviceClient for chaining methods
func (*DeviceClient) ListAllChromeOS ¶
func (c *DeviceClient) ListAllChromeOS(customer *Customer) (*ChromeOSDevices, error)
* List all ChromeOS Devices in the domain with pagination support * admin/directory/v1/customer/{customerId}/devices/chromeos * https://developers.google.com/admin-sdk/directory/reference/rest/v1/chromeosdevices/list
func (*DeviceClient) ListAllDevicePolicySchemas ¶
func (c *DeviceClient) ListAllDevicePolicySchemas(customer *Customer) (*PolicySchemas, error)
* Gets a list of policy schemas that match a specified filter value for a given customer * chromepolicy.googleapis.com/v1/{customerId}/policySchemas * https://developers.google.com/chrome/policy/reference/rest/v1/customers.policySchemas/list
func (*DeviceClient) ListAllProvisionedChromeOS ¶
func (c *DeviceClient) ListAllProvisionedChromeOS(customer *Customer) (*ChromeOSDevices, error)
* List all Provisioned ChromeOS Devices in the domain with pagination support * admin/directory/v1/customer/{customerId}/devices/chromeos * https://developers.google.com/admin-sdk/directory/reference/rest/v1/chromeosdevices/list
func (*DeviceClient) MaxResults ¶
func (c *DeviceClient) MaxResults(max int) *DeviceClient
### Chainable DeviceClient Methods ---------------------------------------------------------------------
func (*DeviceClient) PageToken ¶
func (c *DeviceClient) PageToken(token string) *DeviceClient
func (*DeviceClient) Query ¶
func (c *DeviceClient) Query(query string) *DeviceClient
func (*DeviceClient) ResolvePolicySchemas ¶
func (c *DeviceClient) ResolvePolicySchemas(customer *Customer, ou *OrgUnit) (*ResolvedPolicies, error)
* Gets the resolved policy values for a list of policies that match a search query. * chromepolicy.googleapis.com/v1/{customerId}/policies:resolve * https://developers.google.com/chrome/policy/reference/rest/v1/customers.policies/resolve
type DeviceFile ¶
type DeviceFile struct { CreateTime string `json:"createTime,omitempty"` // Date and time the file was created. DownloadUrl string `json:"downloadUrl,omitempty"` // File download URL. Name string `json:"name,omitempty"` // File name. Type string `json:"type,omitempty"` // File type. }
DeviceFile represents a file on a Chrome device.
type DeviceQuery ¶
type DeviceQuery struct { IncludeChildOrgunits bool `url:"includeChildOrgunits,omitempty"` // If true, return devices from all child org units as well as the specified org unit. MaxResults int `url:"maxResults,omitempty"` // Maximum number of results to return. Default is 100 OrderBy string `url:"orderBy,omitempty"` // Device property to use for sorting results. Should be one of the defined OrderBy enums. OrgUnitPath string `url:"orgUnitPath,omitempty"` // Full path of the organizational unit (minus the leading /) or its unique ID. PageToken string `url:"pageToken,omitempty"` // Token for requesting the next page of query results. Projection string `url:"projection,omitempty"` // Restrict information returned to a set of selected fields. Should be one of the defined Projection enums. Query string `url:"query,omitempty"` // https://developers.google.com/admin-sdk/directory/v1/list-query-operators SortOrder string `url:"sortOrder,omitempty"` // Whether to return results in ascending or descending order. Should be one of the defined SortOrder enums. }
* Query Parameters for ChromeOS Devices * https://developers.google.com/admin-sdk/directory/reference/rest/v1/chromeosdevices/list#query-parameters
type DimensionGroup ¶
type DimensionGroup struct { Collapsed bool `json:"collapsed,omitempty"` // Whether the dimension group is collapsed Depth int `json:"depth,omitempty"` // Depth of the dimension group Range *DimensionRange `json:"range,omitempty"` // Range of the dimension group }
DimensionGroup represents a group of dimensions.
type DimensionProperties ¶
type DimensionProperties struct { HiddenByFilter bool `json:"hiddenByFilter,omitempty"` // Indicates whether this dimension is hidden by a filter. HiddenByUser bool `json:"hiddenByUser,omitempty"` // Indicates whether this dimension is hidden by the user. PixelSize int `json:"pixelSize,omitempty"` // The size of the dimension. DeveloperMetadata []*DeveloperMetadata `json:"developerMetadata,omitempty"` // Metadata about this dimension. DataSourceColumnReference *DataSourceColumnReference `json:"dataSourceColumnReference,omitempty"` // The reference to the data source column. }
DimensionProperties represents properties of dimensions within a sheet. https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/sheets#dimensionproperties
type DimensionRange ¶
type DimensionRange struct { Dimension string `json:"dimension,omitempty"` // // Dimension represents the dimension type, which could be ROWS or COLUMNS EndIndex int `json:"endIndex,omitempty"` // EndIndex represents the end index of the dimension SheetID int `json:"sheetId,omitempty"` // SheetID represents the ID of the sheet StartIndex int `json:"startIndex,omitempty"` // StartIndex represents the start index of the dimension }
DimensionRange represents the dimension range object https://developers.google.com/sheets/api/reference/rest/v4/DimensionRange
type DirectoryItem ¶
type DirectoryItem struct { Description string `json:"description,omitempty"` // Lets you access information about other Google Workspace services" DiscoveryRestUrl string `json:"discoveryRestUrl,omitempty"` // https://www.googleapis.com/discovery/v1/apis/admin/directory_v1/rest DocumentationLink string `json:"documentationLink,omitempty"` // https://developers.google.com/admin-sdk/directory/ ID string `json:"id,omitempty"` // "admin:directory_v1" Icons Icon `json:"icons,omitempty"` // Icons for the API Kind string `json:"kind,omitempty"` // "discovery#directoryItem" Name string `json:"name,omitempty"` // "admin" Preferred bool `json:"preferred,omitempty"` // true Title string `json:"title,omitempty"` // "Admin SDK" Version string `json:"version,omitempty"` // "directory_v1" }
type DirectoryList ¶
type DirectoryList struct { DiscoveryVersion string `json:"discoveryVersion,omitempty"` // "v1" Items []DirectoryItem `json:"items,omitempty"` // List of Google API's Kind string `json:"kind,omitempty"` // "discovery#directoryList" }
type DiskVolumeReport ¶
type DiskVolumeReport struct {
VolumeInfo []VolumeInfo `json:"volumeInfo,omitempty"` // Information about disk volumes.
}
DiskVolumeReport represents a disk volume report of a Chrome device.
type DriveClient ¶
type DriveClient struct {
*Client
}
DriveClient for chaining methods
func (*DriveClient) CopyFileToFolder ¶
func (c *DriveClient) CopyFileToFolder(file *File, folder *File) error
* # Move Google Drive File/Folder * drive/v3/files/{fileId} * @param {File} file - The file to move * @param {File} folder - The folder to move the file to * https://developers.google.com/drive/api/v3/reference/files/update
func (*DriveClient) CreateFile ¶
func (c *DriveClient) CreateFile(file *File) (*File, error)
_Create Google Drive File/Folder_
- If no file is provided, a folder will be created
- drive/v3/files
- https://developers.google.com/drive/api/v3/reference/files/update
func (*DriveClient) GetFile ¶
func (c *DriveClient) GetFile(driveID string) (*File, error)
# Get Google Drive File - drive/v3/files/{fileId} - @param {string} fileId - The ID of the file or shortcut. - https://developers.google.com/drive/api/v3/reference/files/get
func (*DriveClient) GetFileList ¶
func (c *DriveClient) GetFileList(file *File, q *DriveFileQuery) (*FileList, error)
* # Get File List * Fetches all files in a folder, recursively * drive/v3/files * @param {File} file - The file to source the list from * @param {DriveFileQuery} q - The query parameters to use * https://developers.google.com/drive/api/v3/reference/files/list
func (*DriveClient) GetFilePath ¶
func (c *DriveClient) GetFilePath(id string) (string, error)
* # Get File Path * Constructs the path of a file * drive/v3/files/{fileId} * @param {string} id - The ID of the file or shortcut to get the path of. * https://developers.google.com/drive/api/v3/reference/files/get
func (*DriveClient) GetRootFileList ¶
func (c *DriveClient) GetRootFileList() (*FileList, error)
* # Get File List ("My Drive") * drive/v3/files * https://developers.google.com/drive/api/v3/reference/files/list
func (*DriveClient) MoveFileToFolder ¶
func (c *DriveClient) MoveFileToFolder(file *File, folder *File) error
* # Move Google Drive File/Folder * drive/v3/files/{fileId} * @param {File} file - The file to move * @param {File} folder - The folder to move the file to * https://developers.google.com/drive/api/v3/reference/files/update
func (*DriveClient) SaveFileListToSheet ¶
func (c *DriveClient) SaveFileListToSheet(fileList *FileList, sheetID string, headers *[]string) error
Save File List to Google Sheet ¶
type DriveFileQuery ¶
type DriveFileQuery struct { AcknowledgeAbuse bool `url:"acknowledgeAbuse,omitempty"` // Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media. Corpora string `url:"corpora,omitempty"` // Bodies of items (files/documents) to which the query applies. Supported bodies are 'user', 'domain', 'drive', and 'allDrives'. Prefer 'user' or 'drive' to 'allDrives' for efficiency. DriveID string `url:"driveId,omitempty"` // ID of the shared drive to search. Depth int `url:"depth,omitempty"` // The depth of the traversal. **ReGo only** IncludeItemsFromAllDrives bool `url:"includeItemsFromAllDrives,omitempty"` // Whether both My Drive and shared drive items should be included in results. OrderBy string `url:"orderBy,omitempty"` // A comma-separated list of sort keys. PageSize int `url:"pageSize,omitempty"` // The maximum number of files to return per page. Partial or empty result pages are possible even before the end of the files list has been reached. Default: 100. Max: 1000. https://developers.google.com/drive/api/guides/limits PageToken string `url:"pageToken,omitempty"` // The token for continuing a previous list request on the next page. Q string `url:"q,omitempty"` // A query for filtering the file results. See the [Search for Files](https://developers.google.com/drive/api/guides/search-files) guide for supported syntax. Spaces string `url:"spaces,omitempty"` // A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'. SupportsAllDrives bool `url:"supportsAllDrives,omitempty"` // Whether the requesting application supports both My Drives and shared drives. IncludePermissionsForView string `url:"includePermissionsForView,omitempty"` // Specifies which additional view's permissions to include in the response. Only 'published' is supported. IncludeLabels string `url:"includeLabels,omitempty"` // A comma-separated list of IDs of labels to include in the labelInfo part of the response. Fields string `url:"fields,omitempty"` // Examples: `files(id, name, parents)` or `id,name,parents` https://developers.google.com/drive/api/guides/fields-parameter#format UploadType string `url:"uploadType,omitempty"` // https://developers.google.com/drive/api/reference/rest/v3/files/update AddParents string `url:"addParents,omitempty"` // A comma-separated list of parent IDs to add. KeepRevisionForever bool `url:"keepRevisionForever,omitempty"` // Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive. OCRLanguage string `url:"ocrLanguage,omitempty"` // A language hint for OCR processing during image import (ISO 639-1 code). RemoveParents string `url:"removeParents,omitempty"` // A comma-separated list of parent IDs to remove. UseContentAsIndexableText bool `url:"useContentAsIndexableText,omitempty"` // Whether to use the uploaded content as indexable text. }
* Query Parameters for Drive Files * Reference: https://developers.google.com/drive/api/reference/rest/v3/files/list#query-parameters
func (*DriveFileQuery) IsEmpty ¶
func (d *DriveFileQuery) IsEmpty() bool
* Check if the DriveQuery is empty
func (*DriveFileQuery) ValidateQuery ¶
func (d *DriveFileQuery) ValidateQuery() error
* Validate the query parameters for the Files resource
type Email ¶
type Email struct { Address string `json:"address,omitempty"` // The user's email address CustomType string `json:"customType,omitempty"` // The custom value if the email address type is custom Primary bool `json:"primary,omitempty"` // Indicator if this is the user's primary email Type string `json:"type,omitempty"` // The type of the email account }
type EmbeddedChart ¶
type EmbeddedChart struct { Border *EmbeddedObjectBorder `json:"border,omitempty"` // Border of the embedded chart ChartID int `json:"chartId,omitempty"` // ID of the embedded chart Position *EmbeddedObjectPosition `json:"position,omitempty"` // Position of the embedded chart Spec *ChartSpec `json:"spec,omitempty"` // Specification of the embedded chart }
EmbeddedChart represents an embedded chart.
type EmbeddedObjectBorder ¶
type EmbeddedObjectBorder interface{}
type EmbeddedObjectPosition ¶
type EmbeddedObjectPosition interface{}
type Endpoint ¶
type Endpoint struct { BasePath string `json:"basePath,omitempty"` BaseUrl string `json:"baseUrl,omitempty"` Description string `json:"description,omitempty"` Name string `json:"name,omitempty"` Revision string `json:"revision,omitempty"` Title string `json:"title,omitempty"` Version string `json:"version,omitempty"` Auth AuthDetail `json:"auth,omitempty"` }
type Entity ¶
type Entity struct { CustomerID string `json:"customerId,omitempty"` // The unique identifier of the customer's account UserEmail string `json:"userEmail,omitempty"` // The user's email address ProfileID string `json:"profileId,omitempty"` // The user's immutable Google Workspace profile identifier EntityID string `json:"entityId,omitempty"` // Object key Type string `json:"type,omitempty"` // The type of item }
type ErrorDetail ¶
type ErrorDetail struct { Code int `json:"code,omitempty"` // The HTTP status code for the error. Message string `json:"message,omitempty"` // The error message. Errors []*ErrorItem `json:"errors,omitempty"` // An array of more detailed error items. }
ErrorDetail contains detailed information about an error.
func (*ErrorDetail) Error ¶
func (e *ErrorDetail) Error() string
Implement the error interface for ErrorDetail.
type ErrorItem ¶
type ErrorItem struct { Domain string `json:"domain,omitempty"` // The domain of the error. Message string `json:"message,omitempty"` // The error message. Reason string `json:"reason,omitempty"` // The reason for the error. }
ErrorItem contains detailed information about an individual error.
type ErrorResponse ¶
type ErrorResponse struct {
Error *ErrorDetail `json:"error,omitempty"` // The details of the error.
}
* # ErrorResponse * ErrorResponse represents the structure of an error response. * Example: https://developers.google.com/drive/api/guides/handle-errors
type ErrorValue ¶
type ErrorValue interface{}
type Event ¶
type Event struct { Type string `json:"type,omitempty"` // Type of event Name string `json:"name,omitempty"` // Name of the event Parameters []ReportParameter `json:"parameters,omitempty"` // Parameter value pairs for various applications }
type ExtendedValue ¶
type ExtendedValue struct { NumberValue float64 `json:"numberValue,omitempty"` // Number value entered by the user StringValue string `json:"stringValue,omitempty"` // String value entered by the user BoolValue bool `json:"boolValue,omitempty"` // Boolean value entered by the user FormulaValue string `json:"formulaValue,omitempty"` // Formula value entered by the user ErrorValue *ErrorValue `json:"errorValue,omitempty"` // Error value entered by the user }
ExtendedValue represents a user-entered value. https://developers.google.com/sheets/api/reference/rest/v4/sheets#ExtendedValue
type ExternalID ¶
type Field ¶
type Field struct { DateString []string `json:"dateString,omitempty"` // Only present if valueType is dateString. RFC 3339 formatted date: YYYY-MM-DD. ID string `json:"id,omitempty"` // The identifier of this label field. Integer []string `json:"integer,omitempty"` // Only present if valueType is integer. Kind string `json:"kind,omitempty"` // drive#labelField. Selection []string `json:"selection,omitempty"` // Only present if valueType is selection. Text []string `json:"text,omitempty"` // Only present if valueType is text. User []User `json:"user,omitempty"` // Only present if valueType is user. ValueType string `json:"valueType,omitempty"` // The field type. While new values may be supported in the future, the following are currently allowed: dateString, integer, selection, text, user. }
* Field represents a field, which is a typed key-value pair. * https://developers.google.com/drive/api/reference/rest/v3/Label#Field
type FieldConstraints ¶
type FieldConstraints struct { NumericRangeConstraint *NumericRangeConstraint `json:"numericRangeConstraint,omitempty"` // Constraints on numeric range. UploadedFileConstraints *UploadedFileConstraints `json:"uploadedFileConstraints,omitempty"` // Constraints on uploaded files. }
type FieldDescriptorProto ¶
type FieldDescriptorProto struct { Name string `json:"name,omitempty"` // Field name. Number int `json:"number,omitempty"` // Field number. Label string `json:"label,omitempty"` // Field label. (enum) Type string `json:"type,omitempty"` // Field type. (enum) TypeName string `json:"typeName,omitempty"` // For message and enum types, this is the name of the type. DefaultValue string `json:"defaultValue,omitempty"` // Default value for the field. OneofIndex int `json:"oneofIndex,omitempty"` // Index of a oneof in the containing type's oneofDecl list. JsonName string `json:"jsonName,omitempty"` // JSON name of this field. Proto3Optional bool `json:"proto3Optional,omitempty"` // Indicates if this is a proto3 "optional". }
FieldDescriptorProto describes a field within a message.
type File ¶
type File struct { Kind string `json:"kind,omitempty"` // drive#file DriveID string `json:"driveId,omitempty"` // The ID of the shared drive the file resides in. Only populated for items in shared drives. FileExtension string `json:"fileExtension,omitempty"` // The extension of the file. This is populated even when Drive is unable to determine the extension. This field can be cleared by writing a new empty value to this field. CopyRequiresWriterPermission bool `json:"copyRequiresWriterPermission,omitempty"` // Whether the file has been created or opened in a Google editor. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files. MD5Checksum string `json:"md5Checksum,omitempty"` // The MD5 checksum for the content of the file. This is populated only for files with content stored in Drive. ContentHints ContentHints `json:"contentHints,omitempty"` // Additional information about the content of the file. These fields are never populated in responses. ViewedByMe bool `json:"viewedByMe,omitempty"` // Whether the file has been viewed by this user. MimeType string `json:"mimeType,omitempty"` // The MIME type of the file. Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded. If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource. ExportLinks map[string]string `json:"exportLinks,omitempty"` // A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used. Parents []string `json:"parents,omitempty"` // The IDs of the parent folders which contain the file. If not specified as part of a create request, the file will be placed directly in the user's My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to modify the parents list. ThumbnailLink string `json:"thumbnailLink,omitempty"` // A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content. IconLink string `json:"iconLink,omitempty"` // A static, unauthenticated link to the file's icon. LastModifyingUser FileUser `json:"lastModifyingUser,omitempty"` // The user who last modified the file. Owners []FileUser `json:"owners,omitempty"` // The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives. HeadRevisionID string `json:"headRevisionId,omitempty"` // The ID of the file's head revision. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files. SharingUser FileUser `json:"sharingUser,omitempty"` // The user who shared the file with the requesting user, if applicable. WebViewLink string `json:"webViewLink,omitempty"` // A link for opening the file in a relevant Google editor or viewer in a browser. WebContentLink string `json:"webContentLink,omitempty"` // A link for downloading the content of the file in a browser. This is only available for files with binary content in Drive. Size string `json:"size,omitempty"` // The size of the file's content in bytes. This is only applicable to files with binary content in Drive. ViewersCanCopyContent bool `json:"viewersCanCopyContent,omitempty"` // Whether users with only reader or commenter permission can copy the file's content. This affects copy, download, and print operations. Permissions []Permission `json:"permissions,omitempty"` // The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives. HasThumbnail bool `json:"hasThumbnail,omitempty"` // Whether the file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field. Spaces []string `json:"spaces,omitempty"` // The spaces which contain the file. The currently supported values are 'drive', 'appDataFolder' and 'photos'. FolderColorRgb string `json:"folderColorRgb,omitempty"` // The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource. ID string `json:"id,omitempty"` // The ID of the file. Name string `json:"name,omitempty"` // The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant. Description string `json:"description,omitempty"` // A short description of the file. Starred bool `json:"starred,omitempty"` // Whether the user has starred the file. Trashed bool `json:"trashed,omitempty"` // Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file. ExplicitlyTrashed bool `json:"explicitlyTrashed,omitempty"` // Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder. CreatedTime string `json:"createdTime,omitempty"` // The time at which the file was created (RFC 3339 date-time). ModifiedTime string `json:"modifiedTime,omitempty"` // The last time the file was modified by anyone (RFC 3339 date-time). Note that setting modifiedTime will also update modifiedByMeTime for the user. ModifiedByMeTime string `json:"modifiedByMeTime,omitempty"` // The last time the file was modified by the user (RFC 3339 date-time). If the file has been modified by anyone other than the user, this will be set to the time the file was last updated. (Read-only) ViewedByMeTime string `json:"viewedByMeTime,omitempty"` // The last time the file was viewed by the user (RFC 3339 date-time). QuotaBytesUsed string `json:"quotaBytesUsed,omitempty"` // The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled. Version string `json:"version,omitempty"` // A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user. OriginalFilename string `json:"originalFilename,omitempty"` // The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Drive. OwnedByMe bool `json:"ownedByMe,omitempty"` // Whether the user owns the file. Not populated for items in shared drives. FullFileExtension string `json:"fullFileExtension,omitempty"` // The full file extension extracted from the name field. May contain multiple concatenated extensions, such as "tar.gz". This is only available for files with binary content in Drive. Properties map[string]string `json:"properties,omitempty"` // Additional metadata about video media. This may not be available immediately upon upload. AppProperties map[string]string `json:"appProperties,omitempty"` // Additional metadata about image media, if available. IsAppAuthorized bool `json:"isAppAuthorized,omitempty"` // Whether the file has been shared. Not populated for items in shared drives. TeamDriveID string `json:"teamDriveId,omitempty"` // The ID of the Team Drive that owns the file. Not populated for items in shared drives. Capabilities Capabilities `json:"capabilities,omitempty"` // Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take. HasAugmentedPermissions bool `json:"hasAugmentedPermissions,omitempty"` // Whether the options to copy, print, or download this file, should be disabled for readers and commenters. TrashingUser FileUser `json:"trashingUser,omitempty"` // The user who trashed the file. Only populated for items in shared drives. ThumbnailVersion string `json:"thumbnailVersion,omitempty"` // A monotonically increasing version number for the thumbnail image for this file. This reflects every change made to the thumbnail on the server, including those not visible to the requesting user. TrashedTime string `json:"trashedTime,omitempty"` // The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives. ModifiedByMe bool `json:"modifiedByMe,omitempty"` // Whether the file has been modified by this user. PermissionIds []string `json:"permissionIds,omitempty"` // A collection of arbitrary key-value pairs which are private to the requesting app. Entries with null values are cleared in update and copy requests. ImageMediaMetadata ImageMediaMetadata `json:"imageMediaMetadata,omitempty"` // Additional metadata about image media, if available. VideoMediaMetadata VideoMediaMetadata `json:"videoMediaMetadata,omitempty"` // Additional metadata about video media. This may not be available immediately upon upload. ShortcutDetails ShortcutDetails `json:"shortcutDetails,omitempty"` // Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut. ContentRestrictions []ContentRestriction `json:"contentRestrictions,omitempty"` // Restrictions for accessing the content of the file. Only populated if such a restriction exists. ResourceKey string `json:"resourceKey,omitempty"` // A key needed to access the item via a shared link. LabelInfo LabelInfo `json:"labelInfo,omitempty"` // Additional information about the content of the file. These fields are never populated in responses. SHA1Checksum string `json:"sha1Checksum,omitempty"` // The SHA1 checksum for the content of the file. It is computed by Drive and guaranteed to be up-to-date at all times. A change in the content of the file will cause a change in its SHA256 checksum. SHA256Checksum string `json:"sha256Checksum,omitempty"` // The SHA256 checksum for the content of the file. It is computed by Drive and guaranteed to be up-to-date at all times. A change in the content of the file will cause a change in its SHA256 checksum. Path string `json:"path,omitempty"` // The path of this file. Google Drive doesn't have path concept internally, but we construct a slash-separated path for UX }
https://developers.google.com/drive/api/reference/rest/v3/files#resource:-file
type FileDescriptorProto ¶
type FileDescriptorProto struct { Name string `json:"name,omitempty"` // File name, relative to root of source tree. Package string `json:"package,omitempty"` // e.g. "foo", "foo.bar", etc. MessageType []DescriptorProto `json:"messageType,omitempty"` // All top-level definitions in this file. EnumType []interface{} `json:"enumType,omitempty"` // Enum types defined in this file. Syntax string `json:"syntax,omitempty"` // The syntax of the proto file. "proto2", "proto3", or "editions". }
FileDescriptorProto describes a complete .proto file.
type FileList ¶
type FileList struct { Kind string `json:"kind,omitempty"` // drive#fileList IncompleteSearch bool `json:"incompleteSearch,omitempty"` // Whether the search process was incomplete. If true, then some search results may be missing, since all documents were not searched. This may occur when searching multiple Team Drives with the "default,allTeamDrives" corpora, but all corpora could not be searched. When this happens, it is suggested that clients narrow their query by choosing a different corpus such as "default" or "teamDrive". Files *[]*File `json:"files,omitempty"` // The list of files. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. NextPageToken string `json:"nextPageToken,omitempty"` // The page token for the next page of files. This will be absent if the end of the files list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. }
### Google Drive Structs --------------------------------------------------------------------- https://developers.google.com/drive/api/reference/rest/v3/files/list#response-body
type FileUser ¶
type FileUser struct { DisplayName string `json:"displayName,omitempty"` // Output only. A plain text displayable name for this user. Kind string `json:"kind,omitempty"` // Output only. Identifies what kind of resource this is. Value: the fixed string "drive#user". Me bool `json:"me,omitempty"` // Output only. Whether this user is the requesting user. PermissionID string `json:"permissionId,omitempty"` // Output only. The user's ID as visible in Permission resources. EmailAddress string `json:"emailAddress,omitempty"` // Output only. The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. PhotoLink string `json:"photoLink,omitempty"` // Output only. A link to the user's profile photo, if available. }
https://developers.google.com/drive/api/reference/rest/v3/User FileUser represents information about a Drive user.
type FilterView ¶
type FilterView struct { Criteria map[string]FilterCriteria `json:"criteria,omitempty"` // Criteria of the filter view FilterSpecs []FilterSpec `json:"filterSpecs,omitempty"` // Specifications of the filter view FilterViewID int `json:"filterViewId,omitempty"` // ID of the filter view NamedRangeID string `json:"namedRangeId,omitempty"` // ID of the named range of the filter view Range *GridRange `json:"range,omitempty"` // Range of the filter view SortSpecs []SortSpec `json:"sortSpecs,omitempty"` // Sort specifications of the filter view Title string `json:"title,omitempty"` // Title of the filter view }
FilterView represents a filter view.
type GoogleAPIResponse ¶
type GoogleAPIResponse interface { Append(interface{}) PageToken() string }
GoogleAPIResponse is an interface for Google API responses involving pagination
type GoogleConfig ¶
type GoogleConfig struct { Web auth.OAuthConfig `json:"web"` Installed auth.OAuthConfig `json:"installed"` }
type GradientRule ¶
type GradientRule struct { }
GradientRule represents a gradient rule for conditional formatting.
type GridData ¶
type GridData struct { ColumnMetadata []DimensionProperties `json:"columnMetadata,omitempty"` // Metadata about the columns in the grid RowData []RowData `json:"rowData,omitempty"` // The actual data in the rows of the grid RowMetadata []DimensionProperties `json:"rowMetadata,omitempty"` // Metadata about the rows in the grid StartColumn int `json:"startColumn,omitempty"` // Starting column index of the grid StartRow int `json:"startRow,omitempty"` // Starting row index of the grid }
GridData represents the data in a grid (or sheet). https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/sheets#griddata
type GridProperties ¶
type GridProperties struct { RowCount int `json:"rowCount,omitempty"` // Number of rows in the grid ColumnCount int `json:"columnCount,omitempty"` // Number of columns in the grid FrozenRowCount int `json:"frozenRowCount,omitempty"` // Number of frozen rows in the grid FrozenColumnCount int `json:"frozenColumnCount,omitempty"` // Number of frozen columns in the grid HideGridlines bool `json:"hideGridlines,omitempty"` // Whether to hide gridlines RowGroupControlAfter bool `json:"rowGroupControlAfter,omitempty"` // Whether to control the row group after the grid ColumnGroupControlAfter bool `json:"columnGroupControlAfter,omitempty"` // Whether to control the column group after the grid }
GridProperties represents the properties of a grid. https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/sheets#gridproperties
type GridRange ¶
type GridRange struct { EndColumnIndex int `json:"endColumnIndex,omitempty"` // Ending column index of the range EndRowIndex int `json:"endRowIndex,omitempty"` // Ending row index of the range SheetID int `json:"sheetId,omitempty"` // ID of the sheet where the range is found StartColumnIndex int `json:"startColumnIndex,omitempty"` // Starting column index of the range StartRowIndex int `json:"startRowIndex,omitempty"` // Starting row index of the range }
GridRange represents a range in a grid (or sheet).
type HorizontalAlign ¶
type HorizontalAlign interface{}
type IM ¶
type IM struct { CustomProtocol string `json:"customProtocol,omitempty"` // The custom protocol's string if the protocol value is custom_protocol CustomType string `json:"customType,omitempty"` // The custom value if the IM type is custom IM string `json:"im,omitempty"` // The user's IM network ID Primary bool `json:"primary,omitempty"` // Indicator if this is the user's primary IM Protocol string `json:"protocol,omitempty"` // The IM protocol identifies the IM network Type string `json:"type,omitempty"` // The type of IM account }
type ImageMediaMetadata ¶
type ImageMediaMetadata struct { FlashUsed bool `json:"flashUsed,omitempty"` // Whether a flash was used to create the photo. MeteringMode string `json:"meteringMode,omitempty"` // The metering mode used to create the photo. Sensor string `json:"sensor,omitempty"` // The type of sensor used to create the photo. ExposureMode string `json:"exposureMode,omitempty"` // The exposure mode used to create the photo. ColorSpace string `json:"colorSpace,omitempty"` // The color space of the photo. WhiteBalance string `json:"whiteBalance,omitempty"` // The white balance mode used to create the photo. Width int `json:"width,omitempty"` // The width of the image in pixels. Height int `json:"height,omitempty"` // The height of the image in pixels. Location Location `json:"location,omitempty"` // Geographic location information stored in the image. Rotation int `json:"rotation,omitempty"` // The rotation in clockwise degrees from the image's original orientation. Time string `json:"time,omitempty"` // The date and time the photo was taken (EXIF DateTime). CameraMake string `json:"cameraMake,omitempty"` // The make of the camera used to create the photo. CameraModel string `json:"cameraModel,omitempty"` // The model of the camera used to create the photo. ExposureTime float64 `json:"exposureTime,omitempty"` // The length of the exposure, in seconds. Aperture float64 `json:"aperture,omitempty"` // The aperture used to create the photo (f-number). FocalLength float64 `json:"focalLength,omitempty"` // The focal length used to create the photo, in millimeters. ISOSpeed int `json:"isoSpeed,omitempty"` // The ISO speed used to create the photo. ExposureBias float64 `json:"exposureBias,omitempty"` // The exposure bias of the photo (APEX value). MaxApertureValue float64 `json:"maxApertureValue,omitempty"` // The smallest f-number of the lens at the focal length used to create the photo (APEX value). SubjectDistance int `json:"subjectDistance,omitempty"` // The distance to the subject of the photo, in meters. Lens string `json:"lens,omitempty"` // The lens used to create the photo. }
type Interval ¶
type Interval struct { EndTime string `json:"endTime,omitempty"` // End time of the interval StartTime string `json:"startTime,omitempty"` // Start time of the interval }
Interval represents a time interval.
type IterativeCalculationSettings ¶
type IterativeCalculationSettings struct { ConvergenceThreshold float64 `json:"convergenceThreshold,omitempty"` // Convergence threshold for iterative calculations MaxIterations int `json:"maxIterations,omitempty"` // Maximum number of iterations for calculations }
IterativeCalculationSettings represents the settings for iterative calculations. https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets#IterativeCalculationSettings
type Label ¶
type Label struct { Fields map[string]Field `json:"fields,omitempty"` // A map of the fields on the label, keyed by the field's ID. ID string `json:"id,omitempty"` // The ID of the label. Kind string `json:"kind,omitempty"` // drive#label. RevisionID string `json:"revisionId,omitempty"` // The revision ID of the label. }
* Label represents a label and its fields. * https://developers.google.com/drive/api/reference/rest/v3/Label
type LabelInfo ¶
type LabelInfo struct {
Labels []Label `json:"labels,omitempty"` // The list of labels belonging to this account.
}
type Language ¶
type Language struct { CustomLanguage string `json:"customLanguage,omitempty"` // User provided language name if there is no corresponding ISO 639 language code LanguageCode string `json:"languageCode,omitempty"` // ISO 639 string representation of a language Preference string `json:"preference,omitempty"` // Controls whether the specified languageCode is the user's preferred language }
type LastKnownNetwork ¶
type LastKnownNetwork struct { IpAddress string `json:"ipAddress,omitempty"` // IP address. WanIpAddress string `json:"wanIpAddress,omitempty"` // WAN IP address. }
LastKnownNetwork represents the last known network of a Chrome device.
type LinkShareMetadata ¶
type LinkShareMetadata struct {}
type LogicalCpu ¶
type LogicalCpu struct { CStates []CState `json:"cStates,omitempty"` // C-States of the CPU. CurrentScalingFrequencyKhz int `json:"currentScalingFrequencyKhz,omitempty"` // Current scaling frequency in kHz. IdleDuration string `json:"idleDuration,omitempty"` // Idle duration since last boot. MaxScalingFrequencyKhz int `json:"maxScalingFrequencyKhz,omitempty"` // Max scaling frequency allowed by policy. }
LogicalCpu represents a logical CPU in the Chrome device.
type NamedRange ¶
type NamedRange struct { Name string `json:"name,omitempty"` // Name of the range NamedRangeID string `json:"namedRangeId,omitempty"` // ID of the named range Range *GridRange `json:"range,omitempty"` // Range the named range refers to }
NamedRange represents a named range in a spreadsheet.
type NumberFormat ¶
type NumberFormat interface{}
type NumericRangeConstraint ¶
type Oauth2Scopes ¶
type Oauth2Scopes struct {
Scopes map[string]ScopeDetail `json:"scopes,omitempty"`
}
type OrderBy ¶
type OrderBy string
https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/list#orderby
type OrgUnit ¶
type OrgUnit struct { Kind string `json:"kind,omitempty"` // The type of the API resource. Name string `json:"name,omitempty"` // The organizational unit's path name. Description string `json:"description,omitempty"` // Description of the organizational unit. Etag string `json:"etag,omitempty"` // ETag of the resource. BlockInheritance bool `json:"blockInheritance,omitempty"` // Determines if sub-organizational units can inherit the settings of the parent organization. This field is deprecated. ID string `json:"orgUnitId,omitempty"` // The unique ID of the organizational unit. Path string `json:"orgUnitPath,omitempty"` // The full path to the organizational unit. ParentID string `json:"parentOrgUnitId,omitempty"` // The unique ID of the parent organizational unit. ParentPath string `json:"parentOrgUnitPath,omitempty"` // The organizational unit's parent path. OrganizationUnits []*OrgUnit `json:"organizationUnits,omitempty"` // List of sub-organizational units. }
https://developers.google.com/admin-sdk/directory/reference/rest/v1/orgunits
type Organization ¶
type Organization struct { CostCenter string `json:"costCenter,omitempty"` // The cost center of the user's organization CustomType string `json:"customType,omitempty"` // The custom value if the organization type is custom Department string `json:"department,omitempty"` // Specifies the department within the organization Description string `json:"description,omitempty"` // The description of the organization Domain string `json:"domain,omitempty"` // The domain the organization belongs to FullTimeEquivalent int `json:"fullTimeEquivalent,omitempty"` // The full-time equivalent millipercent within the organization Location string `json:"location,omitempty"` // The physical location of the organization Name string `json:"name,omitempty"` // The name of the organization Primary bool `json:"primary,omitempty"` // Indicator if this is the user's primary organization Symbol string `json:"symbol,omitempty"` // Text string symbol of the organization Title string `json:"title,omitempty"` // The user's title within the organization Type string `json:"type,omitempty"` // The type of organization }
type OsUpdateStatus ¶
type OsUpdateStatus struct { State string `json:"state,omitempty"` // The state of the update. TargetOsVersion string `json:"targetOsVersion,omitempty"` // The target version of the update. TargetKioskAppVersion string `json:"targetKioskAppVersion,omitempty"` // The target version of the kiosk app. UpdateTime string `json:"updateTime,omitempty"` // The time the update was applied. UpdateCheckTime string `json:"updateCheckTime,omitempty"` // The time the update was checked. RebootTime string `json:"rebootTime,omitempty"` // The time the device will reboot. }
https://developers.google.com/admin-sdk/directory/reference/rest/v1/chromeosdevices#OsUpdateStatus
type POSIXAccount ¶
type POSIXAccount struct { AccountId string `json:"accountId,omitempty"` // A POSIX account field identifier Gecos string `json:"gecos,omitempty"` // The GECOS (user information) for this account Gid uint64 `json:"gid,omitempty"` // The default group ID HomeDirectory string `json:"homeDirectory,omitempty"` // The path to the home directory for this account OperatingSystemType string `json:"operatingSystemType,omitempty"` // The operating system type for this account Primary bool `json:"primary,omitempty"` // If this is user's primary account within the SystemId Shell string `json:"shell,omitempty"` // The path to the login shell for this account SystemId string `json:"systemId,omitempty"` // System identifier for which account Username or Uid apply to Uid uint64 `json:"uid,omitempty"` // The POSIX compliant user ID Username string `json:"username,omitempty"` // The username of the account }
type Password ¶
type Password struct {
Value string `json:"value,omitempty"` // The password for the user account
}
type Permission ¶
type Permission struct { AllowFileDiscovery bool `json:"allowFileDiscovery,omitempty"` // Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. Deleted bool `json:"deleted,omitempty"` // Output only. Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions. DisplayName string `json:"displayName,omitempty"` // Output only. The "pretty" name of the value of the permission. Domain string `json:"domain,omitempty"` // The domain to which this permission refers. EmailAddress string `json:"emailAddress,omitempty"` // The email address of the user or group to which this permission refers. ExpirationTime string `json:"expirationTime,omitempty"` // The time at which this permission will expire (RFC 3339 date-time). ID string `json:"id,omitempty"` // Output only. The ID of this permission. Kind string `json:"kind,omitempty"` // Output only. Identifies what kind of resource this is. Value: the fixed string "drive#permission". PermissionDetails []PermissionDetail `json:"permissionDetails,omitempty"` // Output only. Details of whether the permissions on this shared drive item are inherited or directly on this item. PhotoLink string `json:"photoLink,omitempty"` // Output only. A link to the user's profile photo, if available. PendingOwner bool `json:"pendingOwner,omitempty"` // Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that are not in a shared drive. Role string `json:"role,omitempty"` // The role granted by this permission. While new values may be supported in the future, the following are currently allowed: owner, organizer, fileOrganizer, writer, commenter, reader Type string `json:"type,omitempty"` // The type of the grantee. Valid values are: `user`, `group`, `domain`, `anyone`. When creating a permission, if type is `user“ or `group`, you must provide an `emailAddress` for the user or group. When type is `domain`, you must provide a `domain`. There isn't extra information required for `anyone`. View string `json:"view,omitempty"` // Indicates the view for this permission. Only populated for permissions that belong to a view. 'published' is the only supported value. }
https://developers.google.com/drive/api/reference/rest/v3/permissions#resource:-permission
type PermissionDetail ¶
type PermissionDetail struct { Inherited bool `json:"inherited,omitempty"` // Output only. Whether this permission is inherited. This field is always populated. This is an output-only field. InheritedFrom string `json:"inheritedFrom,omitempty"` // Output only. The ID of the item from which this permission is inherited. This is an output-only field. PermissionType string `json:"permissionType,omitempty"` // Output only. The permission type for this user. While new values may be added in future, the following are currently possible: file, member Role string `json:"role,omitempty"` // Output only. The primary role for this user. While new values may be added in the future, the following are currently possible: organizer, fileOrganizer, writer, commenter, reader }
type PermissionList ¶
type PermissionList struct { Kind string `json:"kind,omitempty"` // drive#permissionList IncompleteSearch bool `json:"incompleteSearch,omitempty"` // Whether the search process was incomplete. If true, then some search results may be missing, since all documents were not searched. This may occur when searching multiple Team Drives with the "default,allTeamDrives" corpora, but all corpora could not be searched. When this happens, it is suggested that clients narrow their query by choosing a different corpus such as "default" or "teamDrive". Permissions []Permission `json:"permissions,omitempty"` // The list of permissions. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. NextPageToken string `json:"nextPageToken,omitempty"` // The page token for the next page of files. This will be absent if the end of the files list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. }
https://developers.google.com/drive/api/reference/rest/v3/permissions/list#response-body
type PermissionsClient ¶
type PermissionsClient struct {
*Client
}
PermissionsClient for chaining methods
func (*PermissionsClient) GetPermissionDetails ¶
func (c *PermissionsClient) GetPermissionDetails(driveID string, permissionID string) (*Permission, error)
* # Get Google Drive File Permission Details * drive/v3/files/{fileId}/permissions/{permissionId} * @param {string} fileId - The ID of the file or shortcut. * @param {string} permissionId - The ID of the permission. * https://developers.google.com/drive/api/reference/rest/v3/permissions/get
func (*PermissionsClient) GetPermissionList ¶
func (c *PermissionsClient) GetPermissionList(driveID string) (*PermissionList, error)
* # Get Google Drive File Permissions * drive/v3/files/{fileId}/permissions * @param {string} fileId - The ID of the file or shortcut. * https://developers.google.com/drive/api/reference/rest/v3/permissions/list
func (*PermissionsClient) TransferOwnership ¶
func (c *PermissionsClient) TransferOwnership(driveID string, newOwner string) (*Permission, error)
* # Transfer Google Drive File Ownership * drive/v3/files/{fileId}/permissions/{permissionId}/update * Warning: Concurrent permissions operations on the same file are not supported; only the last update is applied. * @param {string} fileId - The ID of the file or shortcut. * @param {string} permissionId - The ID of the permission. * https://developers.google.com/drive/api/reference/rest/v3/permissions/create
type PermissionsQuery ¶
type PermissionsQuery struct { EmailMessage string `url:"emailMessage,omitempty"` // A plain text custom message to include in the notification email. IncludePermissionsForView string `url:"includePermissionsForView,omitempty"` // Specifies which additional view's permissions to include in the response. PageSize int `url:"pageSize,omitempty"` // The maximum number of permissions to return per page. PageToken string `url:"pageToken,omitempty"` // The token for continuing a previous list request on the next page. MoveToNewOwnersRoot bool `url:"moveToNewOwnersRoot,omitempty"` // This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. SendNotificationEmail bool `url:"sendNotificationEmail,omitempty"` // Whether to send a notification email when sharing to users or groups. SupportsAllDrives bool `url:"supportsAllDrives,omitempty"` // Whether the requesting application supports both My Drives and shared drives. TransferOwnership bool `url:"transferOwnership,omitempty"` // Whether to transfer ownership to the specified user and downgrade the current owner to a writer. UseDomainAdminAccess bool `url:"useDomainAdminAccess,omitempty"` // Issue the request as a domain administrator. }
* Query Parameters for Permissions * Reference: https://developers.google.com/drive/api/reference/rest/v3/permissions/create#query-parameters
func (*PermissionsQuery) IsEmpty ¶
func (d *PermissionsQuery) IsEmpty() bool
* Check if the PermissionsQuery is empty
type Phone ¶
type Phone struct { CustomType string `json:"customType,omitempty"` // The custom value if the phone type is custom Primary bool `json:"primary,omitempty"` // If true, this is the user's primary phone number Type string `json:"type,omitempty"` // The type of phone number Value string `json:"value,omitempty"` // A human-readable phone number }
type PivotFilterCriteria ¶
type PivotFilterCriteria interface{}
type PivotFilterSpec ¶
type PivotFilterSpec interface{}
type PivotGroup ¶
type PivotGroup struct { ShowTotals bool `json:"showTotals,omitempty"` // Whether to show totals ValueMetadata []PivotGroupValueMetadata `json:"valueMetadata,omitempty"` // Metadata for pivot group values SortOrder SortOrder `json:"sortOrder,omitempty"` // Sort order of the pivot group ValueBucket *PivotGroupSortValueBucket `json:"valueBucket,omitempty"` // Bucket for sorting pivot group values RepeatHeadings bool `json:"repeatHeadings,omitempty"` // Whether to repeat headings Label string `json:"label,omitempty"` // Label for the pivot group GroupRule *PivotGroupRule `json:"groupRule,omitempty"` // Rule for grouping GroupLimit *PivotGroupLimit `json:"groupLimit,omitempty"` // Limit for the pivot group SourceColumnOffset int `json:"sourceColumnOffset,omitempty"` // Offset for source column DataSourceColumnReference *DataSourceColumnReference `json:"dataSourceColumnReference,omitempty"` // Reference for data source column }
PivotGroup represents a group in a pivot table. https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/pivot-tables#pivotgroup
type PivotGroupLimit ¶
type PivotGroupLimit interface{}
type PivotGroupRule ¶
type PivotGroupRule interface{}
type PivotGroupSortValueBucket ¶
type PivotGroupSortValueBucket interface{}
type PivotGroupValueMetadata ¶
type PivotGroupValueMetadata interface{}
type PivotTable ¶
type PivotTable struct { Rows []PivotGroup `json:"rows,omitempty"` // Rows of the pivot table Columns []PivotGroup `json:"columns,omitempty"` // Columns of the pivot table Criteria map[int]PivotFilterCriteria `json:"criteria,omitempty"` // Criteria for the pivot table FilterSpecs []PivotFilterSpec `json:"filterSpecs,omitempty"` // Filter specifications for the pivot table Values []PivotValue `json:"values,omitempty"` // Values of the pivot table ValueLayout PivotValueLayout `json:"valueLayout,omitempty"` // Layout of the pivot table values DataExecutionStatus *DataExecutionStatus `json:"dataExecutionStatus,omitempty"` // Status of the data execution Source *GridRange `json:"source,omitempty"` // Source data range for the pivot table DataSourceID string `json:"dataSourceId,omitempty"` // ID of the data source }
PivotTable represents a pivot table. https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/pivot-tables
type PivotValue ¶
type PivotValue interface{}
type PivotValueLayout ¶
type PivotValueLayout interface{}
type PolicyAPILifecycle ¶
type PolicyAPILifecycle struct {
Stage PolicyAPILifecycleStage `json:"policyAPILifecycleStage,omitempty"` // The lifecycle stage of the policy API.
}
type PolicyAPILifecycleStage ¶
type PolicyAPILifecycleStage string
PolicyAPILifecycleStage represents the lifecycle stage of the policy API.
const ( API_UNSPECIFIED PolicyAPILifecycleStage = "API_UNSPECIFIED" // Unspecified API lifecycle stage API_PREVIEW PolicyAPILifecycleStage = "API_PREVIEW" // Policy is not working yet, but giving developers heads up on format. This stage can transfer to API_DEVELOPEMNT or API_CURRENT. API_DEVELOPMENT PolicyAPILifecycleStage = "API_DEVELOPMENT" // Policy can change format in backward incompatible way (breaking change). This stage can transfer to API_CURRENT or API_DEPRECATED. This could be used for policies launched only to TTs or launched to selected customers for emergency usage. API_CURRENT PolicyAPILifecycleStage = "API_CURRENT" // Policy in official format. Policy can change format in backward compatible way (non-breaking change). Example: this policy can introduce a new field, which is considered non-breaking change, when field masks are properly utilized. This stage can transfer to API_DEPRECATED. API_DEPRECATED PolicyAPILifecycleStage = "API_DEPRECATED" // Please stop using this policy. This policy is deprecated and may/will be removed in the future. Most likely a new policy was introduced to replace this one. )
type PolicyModificationRequest ¶
type PolicyModificationRequest struct { PolicyTargetKey PolicyTargetKey `json:"policyTargetKey,omitempty"` // https://developers.google.com/chrome/policy/reference/rest/v1/PolicyTargetKey PolicyValue PolicyValue `json:"policyValue,omitempty"` // https://developers.google.com/chrome/policy/reference/rest/v1/PolicyValue UpdateMask string `json:"updateMask,omitempty"` // The field mask to restrict which fields are updated. Must be set if the policy value is being updated. }
type PolicyModificationRequests ¶
type PolicyModificationRequests struct {
Requests []*PolicyModificationRequest `json:"requests,omitempty"` // The list of requests.
}
type PolicyQuery ¶
type PolicyQuery struct { Filter string `url:"filter,omitempty"` // https://developers.google.com/chrome/policy/guides/list-policy-schemas#filter_syntax PageSize int `url:"pageSize,omitempty"` // The maximum number of policy schemas to return, defaults to 100 and has a maximum of 1000. PageToken string `url:"pageToken,omitempty"` // Token for requesting the next page of query results. }
* Query Parameters for Device Policy Schemas * https://developers.google.com/chrome/policy/reference/rest/v1/customers.policySchemas/list#query-parameters
type PolicyRequest ¶
type PolicyRequest struct { PolicySchemaFilter string `json:"policySchemaFilter,omitempty"` // https://developers.google.com/chrome/policy/guides/policy-schemas#policy_schema_names PolicyTargetKey PolicyTargetKey `json:"policyTargetKey,omitempty"` // https://developers.google.com/chrome/policy/reference/rest/v1/PolicyTargetKey PageSize int `json:"pageSize,omitempty"` // The maximum number of resolved policies to return, defaults to 100 and has a maximum of 1000. PageToken string `json:"pageToken,omitempty"` // Token for requesting the next page of query results. }
* Request Parameters for Device Policies * https://developers.google.com/chrome/policy/reference/rest/v1/customers.policies/resolve#PolicyRequest
type PolicySchema ¶
type PolicySchema struct { Name string `json:"name,omitempty"` // Format: name=customers/{customer}/policySchemas/{schema_namespace} PolicyDescription string `json:"policyDescription,omitempty"` // Output only. Description about the policy schema for user consumption. AdditionalTargetKeyNames []AdditionalTargetKeyName `json:"additionalTargetKeyNames,omitempty"` // Output only. Additional key names for identifying the target of the policy value. Definition FileDescriptorProto `json:"definition,omitempty"` // Schema definition using proto descriptor. FieldDescriptions []PolicySchemaFieldDescription `json:"fieldDescriptions,omitempty"` // Output only. Detailed description of each field in the schema. AccessRestrictions []string `json:"accessRestrictions,omitempty"` // Output only. Specific access restrictions related to this policy. Notices []PolicySchemaNoticeDescription `json:"notices,omitempty"` // Output only. Special notice messages related to setting values in certain fields. SupportUri string `json:"supportUri,omitempty"` // Output only. URI to related support article for this schema. SchemaName string `json:"schemaName,omitempty"` // Output only. Fully qualified name of the policy schema. ValidTargetResources []TargetResource `json:"validTargetResources,omitempty"` // Output only. Information about applicable target resources for the policy. PolicyApiLifecycle PolicyAPILifecycle `json:"policyApiLifecycle,omitempty"` // Output only. Current lifecycle information. CategoryTitle string `json:"categoryTitle,omitempty"` // Title of the category in which a setting belongs. }
PolicySchema represents the schema of a policy.
type PolicySchemaFieldDependencies ¶
type PolicySchemaFieldDescription ¶
type PolicySchemaFieldDescription struct { DefaultValue interface{} `json:"defaultValue,omitempty"` // Output only. Client default if the policy is unset. We'll revisit this with the source. Description string `json:"description,omitempty"` // Deprecated. Use name and fieldDescription instead. Field string `json:"field,omitempty"` // Output only. The name of the field for associated with this description. FieldConstraints *FieldConstraints `json:"fieldConstraints,omitempty"` // Output only. Information on input constraints for the field. FieldDependencies []*PolicySchemaFieldDependencies `json:"fieldDependencies,omitempty"` // Output only. List of field dependencies. FieldDescription string `json:"fieldDescription,omitempty"` // Output only. The description of the field. InputConstraint string `json:"inputConstraint,omitempty"` // Output only. Any input constraints on the field values. KnownValueDescriptions []*PolicySchemaFieldKnownValueDescription `json:"knownValueDescriptions,omitempty"` // Output only. Descriptions for known values of the field. Name string `json:"name,omitempty"` // Output only. The name of the field. NestedFieldDescriptions []*PolicySchemaFieldDescription `json:"nestedFieldDescriptions,omitempty"` // Output only. Descriptions of nested fields. RequiredItems []*PolicySchemaRequiredItems `json:"requiredItems,omitempty"` // Output only. List of required fields based on field value. }
type PolicySchemaFieldKnownValueDescription ¶
type PolicySchemaNoticeDescription ¶
type PolicySchemaNoticeDescription struct { AcknowledgementRequired bool `json:"acknowledgementRequired,omitempty"` // Output only. Indicates if user acknowledgment is required. Field string `json:"field,omitempty"` // Output only. The field name associated with the notice. NoticeMessage string `json:"noticeMessage,omitempty"` // Output only. The notice message associated with the value of the field. NoticeValue string `json:"noticeValue,omitempty"` // Output only. The value of the field that has a notice. }
type PolicySchemaRequiredItems ¶
type PolicySchemas ¶
type PolicySchemas struct { PolicySchemas *[]*PolicySchema `json:"policySchemas,omitempty"` // List of policy schemas. NextPageToken string `json:"nextPageToken,omitempty"` // Token for the next page of results. }
https://developers.google.com/chrome/policy/reference/rest/v1/customers.policySchemas
func (PolicySchemas) Append ¶
func (p PolicySchemas) Append(result interface{})
func (PolicySchemas) PageToken ¶
func (p PolicySchemas) PageToken() string
type PolicyTargetKey ¶
type PolicyValue ¶
type PolicyValue struct { PolicySchema string `json:"policySchema,omitempty"` // The fully qualified name of the policy schema associated with this policy. Value map[string]interface{} `json:"value,omitempty"` // The value of the policy that is compatible with the schema that it is associated with. }
https://developers.google.com/chrome/policy/reference/rest/v1/PolicyValue
type ProtectedRange ¶
type ProtectedRange struct { Description string `json:"description,omitempty"` // Description of the protected range Editors *Editors `json:"editors,omitempty"` // Editors of the protected range NamedRangeID string `json:"namedRangeId,omitempty"` // ID of the named range ProtectedRangeID int `json:"protectedRangeId,omitempty"` // ID of the protected range Range *GridRange `json:"range,omitempty"` // Range that is protected RequestingUserCanEdit bool `json:"requestingUserCanEdit,omitempty"` // Whether the requesting user can edit the protected range UnprotectedRanges []GridRange `json:"unprotectedRanges,omitempty"` // Unprotected ranges within the protected range WarningOnly bool `json:"warningOnly,omitempty"` // Whether the protected range is warning only }
ProtectedRange represents a range that is protected.
type RecalculationInterval ¶
type RecalculationInterval interface{}
type RecentUser ¶
type RecentUser struct { Type string `json:"type,omitempty"` // Type of the user Email string `json:"email,omitempty"` // Email of the user }
RecentUser represents a recent user of a Chrome device.
type RepeatCellRequest ¶
type RepeatCellRequest struct { Range *GridRange `json:"range,omitempty"` // The range within the sheet that the repeated cell will cover Cell *CellData `json:"cell,omitempty"` // The data to be repeated in the range Fields string `json:"fields,omitempty"` // The fields of the cell to be updated }
RepeatCellRequest sets the values of cells in a range to a set of values in a certain pattern. https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#repeatcellrequest
type Report ¶
type Report struct { Kind string `json:"kind,omitempty"` // The type of API resource Etag string `json:"etag,omitempty"` // ETag of the entry Items []Report `json:"items,omitempty"` // Activity events in the report OwnerDomain string `json:"ownerDomain,omitempty"` // Domain that is affected by the event IPAddress string `json:"ipAddress,omitempty"` // IP address of the user doing the action Events []Event `json:"events,omitempty"` // Activity events in the report ID ActivityID `json:"id,omitempty"` // Unique identifier for each activity record Actor Actor `json:"actor,omitempty"` // User doing the action Warnings []Warning `json:"warnings,omitempty"` // Warnings, if any Date string `json:"date,omitempty"` // The date of the report request Entity Entity `json:"entity,omitempty"` // Information about the type of the item NextPageToken string `json:"nextPageToken,omitempty"` // Token to specify next page UsageReports []Report `json:"usageReports,omitempty"` // Various application parameter records }
https://developers.google.com/admin-sdk/reports/reference/rest/v1/activities/list#Activity
type ReportParameter ¶
type ReportParameter struct { Name string `json:"name,omitempty"` // The name of the parameter Value string `json:"value,omitempty"` // String value of the parameter MultiValue []string `json:"multiValue,omitempty"` // String values of the parameter IntValue string `json:"intValue,omitempty"` // Integer value of the parameter MultiIntValue []string `json:"multiIntValue,omitempty"` // Integer values of the parameter BoolValue bool `json:"boolValue,omitempty"` // Boolean value of the parameter MessageValue []ReportParameter `json:"messageValue,omitempty"` // Nested parameter value pairs MultiMessageValue []ReportParameter `json:"multiMessageValue,omitempty"` // Activities list of messageValue objects StringValue string `json:"stringValue,omitempty"` // String value of the parameter DatetimeValue string `json:"datetimeValue,omitempty"` // The RFC 3339 formatted value of the parameter }
https://developers.google.com/admin-sdk/reports/reference/rest/v1/NestedParameter
type ReportsQuery ¶
type ReportsQuery struct { ActorIpAddress string `url:"actorIpAddress,omitempty"` // The Internet Protocol (IP) Address of host where the event was performed. CustomerId string `url:"customerId,omitempty"` // The unique ID of the customer to retrieve data for. EndTime string `url:"endTime,omitempty"` // Sets the end of the range of time shown in the report. EventName string `url:"eventName,omitempty"` // The name of the event being queried by the API. Filters string `url:"filters,omitempty"` // The filters query string is a comma-separated list composed of event parameters manipulated by relational operators. MaxResults int `url:"maxResults,omitempty"` // Determines how many activity records are shown on each response page. OrgUnitId string `url:"orgUnitId,omitempty"` // ID of the organizational unit to report on. PageToken string `url:"pageToken,omitempty"` // The token to specify next page. StartTime string `url:"startTime,omitempty"` // Sets the beginning of the range of time shown in the report. GroupIdFilter string `url:"groupIdFilter,omitempty"` // Comma separated group ids (obfuscated) on which user activities are filtered. RoleId string `url:"roleId,omitempty"` // ID of the role to report on. UserKey string `url:"userKey,omitempty"` // Represents the profile id or the user email for which the data should be filtered. IncludeIndirectRoleAssignments bool `url:"includeIndirectRoleAssignments,omitempty"` // Whether to include indirect role assignments. }
* Query Parameters for Admin Reports * https://developers.google.com/admin-sdk/reports/reference/rest/v1/activities/list#query-parameters
type ResolvedPolicies ¶
type ResolvedPolicies struct { *SortedPolicies Users *ResolvedPolicies `json:"userPolicies,omitempty"` // chrome.users.* Devices *ResolvedPolicies `json:"devicePolicies,omitempty"` // chrome.devices.* ResolvedPolicies *[]*ResolvedPolicy `json:"resolvedPolicies,omitempty"` // The list of resolved policies found by the resolve request. NextPageToken string `json:"nextPageToken,omitempty"` // The page token used to get the next set of resolved policies found by the request. }
### Chrome Policy Structs ---------------------------------------------------------------------------- ResolvedPolicies represents a list of resolved policies found by the resolve request.
func (ResolvedPolicies) Append ¶
func (r ResolvedPolicies) Append(result interface{})
func (*ResolvedPolicies) Init ¶
func (r *ResolvedPolicies) Init()
func (ResolvedPolicies) PageToken ¶
func (r ResolvedPolicies) PageToken() string
type ResolvedPolicy ¶
type ResolvedPolicy struct { TargetKey PolicyTargetKey `json:"targetKey,omitempty"` // The target resource for which the resolved policy value applies. Value PolicyValue `json:"value,omitempty"` // The resolved value of the policy. SourceKey PolicyTargetKey `json:"sourceKey,omitempty"` // The source resource from which this policy value is obtained. AddedSourceKey PolicyTargetKey `json:"addedSourceKey,omitempty"` // The added source key for management level. }
type Role ¶
type Role struct { Etag string `json:"etag,omitempty"` // ETag of the resource IsSuperAdminRole bool `json:"isSuperAdminRole,omitempty"` // Returns true if the role is a super admin role IsSystemRole bool `json:"isSystemRole,omitempty"` // Returns true if this is a pre-defined system role Kind string `json:"kind,omitempty"` // The type of the API resource RoleDescription string `json:"roleDescription,omitempty"` // A short description of the role RoleID string `json:"roleId,omitempty"` // ID of the role RoleName string `json:"roleName,omitempty"` // Name of the role RolePrivileges []RolePrivilege `json:"rolePrivileges,omitempty"` // The set of privileges that are granted to this role }
type RoleAssignment ¶
type RoleAssignment struct { RoleAssignmentId string `json:"roleAssignmentId,omitempty"` // The unique ID of the role assignment RoleId string `json:"roleId,omitempty"` // The ID of the role that is assigned Kind string `json:"kind,omitempty"` // The type of the API resource Etag string `json:"etag,omitempty"` // ETag of the resource AssignedTo string `json:"assignedTo,omitempty"` // The unique ID of the user this role is assigned to AssigneeType string `json:"assigneeType,omitempty"` // The type of entity this role is assigned to. ScopeType string `json:"scopeType,omitempty"` // The type of the scope. OrgUnitId string `json:"orgUnitId,omitempty"` // If the role is restricted to an organization unit, this contains the ID for the organization unit the exercise of this role is restricted to. Condition string `json:"condition,omitempty"` // The condition which determines if this assignment is active. If not specified, the assignment is always active. NextPageToken string `json:"nextPageToken,omitempty"` // Token to specify the next page in the list Items []RoleAssignment `json:"items,omitempty"` // The list of matching role assignments. }
type RolePrivilege ¶
type RoleReport ¶
type RowData ¶
type RowData struct {
Values []CellData `json:"values,omitempty"` // List of cell data
}
RowData represents data in a row. https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/sheets#rowdata
type SSHPublicKey ¶
type ScopeDetail ¶
type ScreenshotFile ¶
type ScreenshotFile struct { CreateTime string `json:"createTime,omitempty"` // Date and time the file was created. DownloadUrl string `json:"downloadUrl,omitempty"` // File download URL. Name string `json:"name,omitempty"` // File name. Type string `json:"type,omitempty"` // File type. }
ScreenshotFile represents a screenshot file on a Chrome device.
type ServiceAccount ¶
type SetBasicFilterRequest ¶
type SetBasicFilterRequest struct {
Filter *BasicFilter `json:"filter,omitempty"` // Filter is the basic filter to be set
}
SetBasicFilterRequest represents the request to set a basic filter Source: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#setbasicfilterrequest
type Sheet ¶
type Sheet struct { BandedRanges []BandedRange `json:"bandedRanges,omitempty"` // List of banded (alternate colors) ranges in a sheet BasicFilter *BasicFilter `json:"basicFilter,omitempty"` // Basic filter applied to the sheet data Charts []EmbeddedChart `json:"charts,omitempty"` // List of charts in a sheet ColumnGroups []DimensionGroup `json:"columnGroups,omitempty"` // List of column groups in a sheet ConditionalFormats []ConditionalFormatRule `json:"conditionalFormats,omitempty"` // List of conditional formatting rules in a sheet Data []GridData `json:"data,omitempty"` // Data in the grid DeveloperMetadata []DeveloperMetadata `json:"developerMetadata,omitempty"` // Developer metadata in a sheet FilterViews []FilterView `json:"filterViews,omitempty"` // List of filter views in a sheet Merges []GridRange `json:"merges,omitempty"` // List of merges in a sheet Properties *SheetProperties `json:"properties,omitempty"` // Properties of a sheet ProtectedRanges []ProtectedRange `json:"protectedRanges,omitempty"` // List of protected ranges in a sheet RowGroups []DimensionGroup `json:"rowGroups,omitempty"` // List of row groups in a sheet Slicers []Slicer `json:"slicers,omitempty"` // List of slicers in a sheet }
Sheet represents a sheet within a spreadsheet. https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/sheets
type SheetBatchRequest ¶
type SheetBatchRequest struct { IncludeSpreadsheetInResponse bool `json:"includeSpreadsheetInResponse,omitempty"` // Determines if the update response should include the spreadsheet resource Requests []*SheetRequest `json:"requests,omitempty"` // List of requests to be processed by the API ResponseIncludeGridData bool `json:"responseIncludeGridData,omitempty"` // Determines if the response should include grid data ResponseRanges []string `json:"responseRanges,omitempty"` // The ranges that are returned in the response }
SheetBatchRequest represents a batch of updates to apply to a spreadsheet. https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#Request
type SheetLink ¶
type SheetLink struct { // URI represents the uniform resource identifier Uri string `json:"uri,omitempty"` }
Link represents the link object https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/cells#link
type SheetProperties ¶
type SheetProperties struct { DataSourceSheetProperties *DataSourceSheetProperties `json:"dataSourceSheetProperties,omitempty"` // Properties of a data source sheet GridProperties *GridProperties `json:"gridProperties,omitempty"` // Properties of a grid Index int `json:"index,omitempty"` // Index of the sheet Hidden bool `json:"hidden,omitempty"` // Indicates whether the sheet is hidden RightToLeft bool `json:"rightToLeft,omitempty"` // Indicates whether the sheet is right-to-left SheetID int `json:"sheetId,omitempty"` // ID of the sheet SheetType SheetType `json:"sheetType,omitempty"` // Type of the sheet TabColor *Color `json:"tabColor,omitempty"` // Color of the tab TabColorStyle *ColorStyle `json:"tabColorStyle,omitempty"` // Style of the tab color Title string `json:"title,omitempty"` // Title of the sheet }
SheetProperties represents properties of a sheet. https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/sheets#sheetproperties
type SheetRequest ¶
type SheetRequest struct { AddChart interface{} `json:"addChart,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#addchartrequest AddConditionalFormatRule interface{} `json:"addConditionalFormatRule,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#addconditionalformatrulerequest AddDataSource interface{} `json:"addDataSource,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#adddatasourcerequest AddDimensionGroup interface{} `json:"addDimensionGroup,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#adddimensiongrouprequest AddFilterView interface{} `json:"addFilterView,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#addfilterviewrequest AddNamedRange interface{} `json:"addNamedRange,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#addnamedrangerequest AddProtectedRange interface{} `json:"addProtectedRange,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#addprotectedrangerequest AddSheet interface{} `json:"addSheet,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#addsheetrequest AddSlicer interface{} `json:"addSlicer,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#addslicerrequest AppendCells interface{} `json:"appendCells,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#appendcellsrequest AppendDimension interface{} `json:"appendDimension,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#appenddimensionrequest AutoFill interface{} `json:"autoFill,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#autofillrequest AutoResizeDimensions interface{} `json:"autoResizeDimensions,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#autoresizedimensionsrequest ClearBasicFilter interface{} `json:"clearBasicFilter,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#clearbasicfilterrequest CopyPaste interface{} `json:"copyPaste,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#copypasterequest CreateDeveloperMetadata interface{} `json:"createDeveloperMetadata,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#createdevelopermetadatarequest CutPaste interface{} `json:"cutPaste,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#cutpasterequest DeleteBanding interface{} `json:"deleteBanding,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#deletebandingrequest DeleteConditionalFormatRule interface{} `json:"deleteConditionalFormatRule,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#deleteconditionalformatrulerequest DeleteDataSource interface{} `json:"deleteDataSource,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#deletedatasourcerequest DeleteDeveloperMetadata interface{} `json:"deleteDeveloperMetadata,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#deletedevelopermetadatarequest DeleteDimension interface{} `json:"deleteDimension,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#deletedimensionrequest DeleteDimensionGroup interface{} `json:"deleteDimensionGroup,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#deletedimensiongrouprequest DeleteDuplicates interface{} `json:"deleteDuplicates,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#deleteduplicatesrequest DeleteEmbeddedObject interface{} `json:"deleteEmbeddedObject,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#deleteembeddedobjectrequest DeleteFilterView interface{} `json:"deleteFilterView,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#deletefilterviewrequest DeleteNamedRange interface{} `json:"deleteNamedRange,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#deletenamedrangerequest DeleteProtectedRange interface{} `json:"deleteProtectedRange,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#deleteprotectedrangerequest DeleteRange interface{} `json:"deleteRange,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#deleterangerequest DeleteSheet interface{} `json:"deleteSheet,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#deletesheetrequest DuplicateFilterView interface{} `json:"duplicateFilterView,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#duplicatefilterviewrequest DuplicateSheet interface{} `json:"duplicateSheet,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#duplicatesheetrequest FindReplace interface{} `json:"findReplace,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#findreplacerequest InsertDimension interface{} `json:"insertDimension,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#insertdimensionrequest InsertRange interface{} `json:"insertRange,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#insertrangerequest MergeCells interface{} `json:"mergeCells,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#mergecellsrequest MoveDimension interface{} `json:"moveDimension,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#movedimensionrequest PasteData interface{} `json:"pasteData,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#pastedatarequest RandomizeRange interface{} `json:"randomizeRange,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#randomizerangerequest RefreshDataSource interface{} `json:"refreshDataSource,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#refreshdatasourcerequest RepeatCell *RepeatCellRequest `json:"repeatCell,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#repeatcellrequest SetBasicFilter *SetBasicFilterRequest `json:"setBasicFilter,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#setbasicfilterrequest SetDataValidation interface{} `json:"setDataValidation,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#setdatavalidationrequest SortRange interface{} `json:"sortRange,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#sortrangerequest TextToColumns interface{} `json:"textToColumns,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#texttocolumnsrequest TrimWhitespace interface{} `json:"trimWhitespace,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#trimwhitespacerequest UpdateBanding interface{} `json:"updateBanding,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#updatebandingrequest UpdateBorders interface{} `json:"updateBorders,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#updatebordersrequest UpdateCells interface{} `json:"updateCells,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#updatecellsrequest UpdateChartSpec interface{} `json:"updateChartSpec,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#updatechartspecrequest UpdateConditionalFormatRule interface{} `json:"updateConditionalFormatRule,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#updateconditionalformatrulerequest UpdateDataSource interface{} `json:"updateDataSource,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#updatedatasourcerequest UpdateDeveloperMetadata interface{} `json:"updateDeveloperMetadata,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#updatedevelopermetadatarequest UpdateDimensionGroup interface{} `json:"updateDimensionGroup,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#updatedimensiongrouprequest UpdateDimensionProperties *UpdateDimensionPropertiesRequest `json:"updateDimensionProperties,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#updatedimensionpropertiesrequest UpdateEmbeddedObjectBorder interface{} `json:"updateEmbeddedObjectBorder,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#updateembeddedobjectborderrequest UpdateEmbeddedObjectPosition interface{} `json:"updateEmbeddedObjectPosition,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#updateembeddedobjectpositionrequest UpdateFilterView interface{} `json:"updateFilterView,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#updatefilterviewrequest UpdateNamedRange interface{} `json:"updateNamedRange,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#updatenamedrangerequest UpdateProtectedRange interface{} `json:"updateProtectedRange,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#updateprotectedrangerequest UpdateSheetProperties interface{} `json:"updateSheetProperties,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#updatesheetpropertiesrequest UpdateSlicerSpec interface{} `json:"updateSlicerSpec,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#updateslicerspecrequest }
SheetRequest represents a single kind of update to apply to a spreadsheet. https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#Request
type SheetValueQuery ¶
type SheetValueQuery struct { Ranges []string `url:"ranges,omitempty"` // The ranges to retrieve from the spreadsheet. IncludeGridData bool `url:"includeGridData,omitempty"` // True if grid data should be returned. This parameter is ignored if a field mask was set in the request. MajorDimension string `url:"majorDimension,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/Dimension ValueRenderOption string `url:"valueRenderOption,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/ValueRenderOption DateTimeRenderOption string `url:"dateTimeRenderOption,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/DateTimeRenderOption ValueInputOption string `url:"valueInputOption,omitempty"` // How the input data should be interpreted. Accepted values are: RAW or USER_ENTERED. The default is USER_ENTERED. IncludeValuesInResponse bool `url:"includeValuesInResponse,omitempty"` // Determines if the update response should include the values of the cells that were updated. By default, responses do not include the updated values. If the range to write was larger than the range actually written, the response includes all values in the requested range (excluding trailing empty rows and columns). ResponseValueRenderOption string `url:"responseValueRenderOption,omitempty"` // Determines how values in the response should be rendered. The default render option is FORMATTED_VALUE. ResponseDateTimeRenderOption string `url:"responseDateTimeRenderOption,omitempty"` // Determines how dates, times, and durations in the response should be rendered. This is ignored if responseValueRenderOption is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER. }
* Query Parameters for Sheet Values
type SheetsClient ¶
type SheetsClient struct {
*Client
}
SheetsClient for chaining methods
func (*SheetsClient) AppendSpreadsheet ¶
func (c *SheetsClient) AppendSpreadsheet(spreadsheetID string, vr *ValueRange) error
* # Spreadsheet Values: Append * - Appends values within the range of a spreadsheet. The caller must specify the spreadsheet ID, range, and a valueInputOption * - https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values/{range} * - https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/update
func (*SheetsClient) CreateSpreadsheet ¶
func (c *SheetsClient) CreateSpreadsheet(s *Spreadsheet) (*Spreadsheet, error)
* # Spreadsheet: Create * - Creates a new spreadsheet, with basic properties. * - https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/create
func (*SheetsClient) FormatHeaderAndAutoSize ¶
func (c *SheetsClient) FormatHeaderAndAutoSize(spreadsheetID string, sheet *Sheet, rows, columns int) error
* # Format Header and AutoSize * - Sets the header row to bold and green, and auto-sizes all columns
func (*SheetsClient) GenerateValueRange ¶
func (c *SheetsClient) GenerateValueRange(data []interface{}, sheetName string, headers *[]string) *ValueRange
* Generate Google Sheets ValueRange from a slice of any structs
func (*SheetsClient) GetSpreadsheet ¶
func (c *SheetsClient) GetSpreadsheet(sheetID string) (*Spreadsheet, error)
* # Spreadsheet: Get * Get a spreadsheet and its properties by ID * spreadsheets/{spreadsheetId} * https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/get
func (*SheetsClient) ReadSpreadsheetValues ¶
func (c *SheetsClient) ReadSpreadsheetValues(sheetID, rangeNotation string) (*ValueRange, error)
* # Spreadsheet: Read * Reads values from a spreadsheet * spreadsheets/{spreadsheetId}/values/{range} * https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/get
func (*SheetsClient) SaveToSheet ¶
func (c *SheetsClient) SaveToSheet(data interface{}, sheetID, sheetName string, headers *[]string) error
* # Save to Sheet * - Saves a variety of data types to a Google Sheet (array, map, slice, struct)
func (*SheetsClient) UpdateSpreadsheet ¶
func (c *SheetsClient) UpdateSpreadsheet(spreadsheetID string, vr *ValueRange) error
* # Spreadsheet Values: Update * Sets/Replaces values in a range of a spreadsheet. The caller must specify the spreadsheet ID, range, and a valueInputOption * spreadsheets/{spreadsheetId}/values/{range} * https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/update
func (*SheetsClient) VerifySheetValueRange ¶
func (c *SheetsClient) VerifySheetValueRange(vr *ValueRange) error
* # Set Sheet Value Defaults * - Sets default values for ValueRange if they are not defined
type ShortcutDetails ¶
type ShortcutDetails struct { TargetID string `json:"targetId,omitempty"` // The ID of the file that this shortcut points to. TargetMimeType string `json:"targetMimeType,omitempty"` // The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created. TargetResourceKey string `json:"targetResourceKey,omitempty"` // The resource key of the target file. This is a unique identifier of the target file and is guaranteed to be immutable across file renames. }
type Slicer ¶
type Slicer struct { Position *EmbeddedObjectPosition `json:"position,omitempty"` // Position of the slicer SlicerID int `json:"slicerId,omitempty"` // ID of the slicer Spec *SlicerSpec `json:"spec,omitempty"` // Specification of the slicer }
Slicer represents a slicer.
type SlicerSpec ¶
type SlicerSpec struct { DataRange *GridRange `json:"dataRange,omitempty"` // Range for the data FilterCriteria *FilterCriteria `json:"filterCriteria,omitempty"` // Criteria for filtering ColumnIndex int `json:"columnIndex,omitempty"` // Index of the column ApplyToPivotTables bool `json:"applyToPivotTables,omitempty"` // Whether to apply to pivot tables Title string `json:"title,omitempty"` // Title for the slicer TextFormat *TextFormat `json:"textFormat,omitempty"` // Format for the text BackgroundColor *Color `json:"backgroundColor,omitempty"` // Color for the background BackgroundColorStyle *ColorStyle `json:"backgroundColorStyle,omitempty"` // Style for the background color HorizontalAlignment HorizontalAlign `json:"horizontalAlignment,omitempty"` // Horizontal alignment }
SlicerSpec represents the specification for a slicer.
type SortOrder ¶
type SortOrder string
https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/list#sortorder
type SortedPolicies ¶
type SortedPolicies struct { Direct *[]*ResolvedPolicy `json:"directPolicies,omitempty"` // (Calculated) Policies directly set on the orgunit. Inherited *[]*ResolvedPolicy `json:"inheritedPolicies,omitempty"` // (Calculated) Policies inherited from the orgunit hierarchy. }
type Spreadsheet ¶
type Spreadsheet struct { DataSources []DataSource `json:"dataSources,omitempty"` // List of data sources in the spreadsheet DataSourceSchedules []DataSourceRefreshSchedule `json:"dataSourceSchedules,omitempty"` // List of data source refresh schedules in the spreadsheet DeveloperMetadata []DeveloperMetadata `json:"developerMetadata,omitempty"` // Developer metadata associated with the spreadsheet NamedRanges []NamedRange `json:"namedRanges,omitempty"` // List of named ranges in the spreadsheet Properties *SpreadsheetProperties `json:"properties,omitempty"` // Properties of the spreadsheet Sheets []Sheet `json:"sheets,omitempty"` // List of sheets in the spreadsheet SpreadsheetID string `json:"spreadsheetId,omitempty"` // ID of the spreadsheet SpreadsheetURL string `json:"spreadsheetUrl,omitempty"` // URL of the spreadsheet }
### Spreadsheet Structs --------------------------------------------------------------------- Spreadsheet represents a spreadsheet.
type SpreadsheetProperties ¶
type SpreadsheetProperties struct { AutoRecalc string `json:"autoRecalc,omitempty"` // Recalculation interval setting DefaultFormat *CellFormat `json:"defaultFormat,omitempty"` // Default cell format for the spreadsheet IterativeCalculationSettings *IterativeCalculationSettings `json:"iterativeCalculationSettings,omitempty"` // Iterative calculation settings for the spreadsheet Locale string `json:"locale,omitempty"` // Locale of the spreadsheet SpreadsheetTheme *SpreadsheetTheme `json:"spreadsheetTheme,omitempty"` // Theme applied to the spreadsheet TimeZone string `json:"timeZone,omitempty"` // Timezone of the spreadsheet Title string `json:"title,omitempty"` // Title of the spreadsheet }
SpreadsheetProperties represents properties of a spreadsheet.
type SpreadsheetTheme ¶
type SpreadsheetTheme struct { PrimaryFontFamily string `json:"primaryFontFamily,omitempty"` // Primary font family of the theme ThemeColors []ThemeColorPair `json:"themeColors,omitempty"` // Theme color pairs }
SpreadsheetTheme represents a theme of a spreadsheet.
type SystemRamFreeReport ¶
type SystemRamFreeReport struct { ReportTime string `json:"reportTime,omitempty"` // Date and time the report was received. SystemRamFreeInfo []string `json:"systemRamFreeInfo,omitempty"` // Free RAM information. }
SystemRamFreeReport represents a report of free RAM on a Chrome device.
type TargetResource ¶
type TargetResource string
TargetResource represents target resource types for policies.
const ( TARGET_RESOURCE_UNSPECIFIED TargetResource = "TARGET_RESOURCE_UNSPECIFIED" // Unspecified target resource. ORG_UNIT TargetResource = "ORG_UNIT" // Organizational unit target resource. GROUP TargetResource = "GROUP" // Group target resource. )
Enumeration of TargetResource.
type TextFormat ¶
type TextFormat struct { ForegroundColor *Color `json:"foregroundColor,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/cells#color ForegroundColorStyle *ColorStyle `json:"foregroundColorStyle,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/cells#colorstyle FontFamily string `json:"fontFamily,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/cells#fontfamily FontSize int `json:"fontSize,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/cells#fontsize Bold bool `json:"bold,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/cells#bold Italic bool `json:"italic,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/cells#italic Strikethrough bool `json:"strikethrough,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/cells#strikethrough Underline bool `json:"underline,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/cells#underline Link *SheetLink `json:"link,omitempty"` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/cells#link }
TextFormat represents the text format https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/other#textformat
type TextFormatRun ¶
type TextFormatRun interface{}
type TextRotation ¶
type TextRotation interface{}
type ThemeColorPair ¶
type ThemeColorPair struct { }
ThemeColorPair represents a pair of theme color.
type Thumbnail ¶
type Thumbnail struct { Image string `json:"image,omitempty"` // The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5). MimeType string `json:"mimeType,omitempty"` // The MIME type of the thumbnail. }
type TimeOfDay ¶
type TimeOfDay struct { Hours int `json:"hours,omitempty"` // Hours of the time of day Minutes int `json:"minutes,omitempty"` // Minutes of the time of day Nanos int `json:"nanos,omitempty"` // Nanoseconds of the time of day Seconds int `json:"seconds,omitempty"` // Seconds of the time of day }
TimeOfDay represents a time of a day.
type TpmVersionInfo ¶
type TpmVersionInfo struct { Family string `json:"family,omitempty"` // TPM family. FirmwareVersion string `json:"firmwareVersion,omitempty"` // TPM firmware version. Manufacturer string `json:"manufacturer,omitempty"` // TPM manufacturer code. SpecLevel string `json:"specLevel,omitempty"` // TPM specification level. TpmModel string `json:"tpmModel,omitempty"` // TPM model number. VendorSpecific string `json:"vendorSpecific,omitempty"` // Vendor-specific information. }
TpmVersionInfo represents TPM version information of a Chrome device.
type UpdateDimensionPropertiesRequest ¶
type UpdateDimensionPropertiesRequest struct { Properties *DimensionProperties `json:"properties,omitempty"` // Dimension properties to update Fields string `json:"fields,omitempty"` // Fields to update Range *DimensionRange `json:"range,omitempty"` // Range of the dimension to update DataSourceSheetRange *DataSourceSheetDimensionRange `json:"dataSourceSheetRange,omitempty"` // Range of the dataSource sheet dimension to update }
UpdateDimensionPropertiesRequest represents the request to update dimension properties https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#updatedimensionpropertiesrequest
type UploadedFileConstraints ¶
type UploadedFileConstraints struct { SizeLimitBytes string `json:"sizeLimitBytes,omitempty"` // Size limit of uploaded files (int64 format). SupportedContentTypes []ContentType `json:"supportedContentTypes,omitempty"` // Supported file types for upload. }
type User ¶
type User struct { AgreedToTerms bool `json:"agreedToTerms,omitempty"` // User's agreement to terms status Aliases []string `json:"aliases,omitempty"` // User aliases Archived bool `json:"archived,omitempty"` // User's archival status ChangePasswordAtNextLogin bool `json:"changePasswordAtNextLogin,omitempty"` // User's change password at next login status CreationTime string `json:"creationTime,omitempty"` // User's creation time CustomerID string `json:"customerId,omitempty"` // User's customer ID DeletionTime string `json:"deletionTime,omitempty"` // User's deletion time Emails []Email `json:"emails,omitempty"` // User's emails Etag string `json:"etag,omitempty"` // ETag of the user ExternalIds []ExternalID `json:"externalIds,omitempty"` // User's external IDs Gender Gender `json:"gender,omitempty"` // User's gender HashFunction string `json:"hashFunction,omitempty"` // User's hash function ID string `json:"id,omitempty"` // User's ID IncludeInGlobalAddressList bool `json:"includeInGlobalAddressList,omitempty"` // User's inclusion status in global address list IsAdmin bool `json:"isAdmin,omitempty"` // User's admin status IsDelegatedAdmin bool `json:"isDelegatedAdmin,omitempty"` // User's delegated admin status IsEnforcedIn2Sv bool `json:"isEnforcedIn2Sv,omitempty"` // User's 2SV enforcement status IsEnrolledIn2Sv bool `json:"isEnrolledIn2Sv,omitempty"` // User's 2SV enrolment status IsMailboxSetup bool `json:"isMailboxSetup,omitempty"` // User's mailbox setup status IMs []IM `json:"ims,omitempty"` // User's instant messaging addresses IpWhitelisted bool `json:"ipWhitelisted,omitempty"` // User's IP whitelist status Kind string `json:"kind,omitempty"` // The type of the API resource Languages []Language `json:"languages,omitempty"` // User's languages LastLoginTime string `json:"lastLoginTime,omitempty"` // User's last login time Locations []UserLocation `json:"locations,omitempty"` // User's locations Name UserName `json:"name,omitempty"` // User's name NonEditableAliases []string `json:"nonEditableAliases,omitempty"` // User's non-editable aliases Notes Note `json:"notes,omitempty"` // User's notes OrgUnitPath string `json:"orgUnitPath,omitempty"` // User's organizational unit path Organizations []Organization `json:"organizations,omitempty"` // User's organizations Password Password `json:"password,omitempty"` // User's password Phones []Phone `json:"phones,omitempty"` // A list of the user's phone numbers PosixAccounts []POSIXAccount `json:"posixAccounts,omitempty"` // The list of POSIX account information for the user PrimaryEmail string `json:"primaryEmail,omitempty"` // User's primary email RecoveryEmail string `json:"recoveryEmail,omitempty"` // User's recovery email RecoveryPhone string `json:"recoveryPhone,omitempty"` // User's recovery phone number Relations []Relation `json:"relations,omitempty"` // User's relations Roles []Role `json:"roles,omitempty"` // User's roles SshPublicKeys []SSHPublicKey `json:"sshPublicKeys,omitempty"` // A list of SSH public keys Suspended bool `json:"suspended,omitempty"` // User's suspension status SuspensionReason string `json:"suspensionReason,omitempty"` // User's suspension reason ThumbnailPhotoEtag string `json:"thumbnailPhotoEtag,omitempty"` // User's thumbnail photo ETag ThumbnailPhotoUrl string `json:"thumbnailPhotoUrl,omitempty"` // User's thumbnail photo URL Websites []Website `json:"websites,omitempty"` // The list of the user's websites }
https://developers.google.com/admin-sdk/directory/reference/rest/v1/users#resource:-user
type UserEvent ¶
type UserEvent string
### Enums --------------------------------------------------------------------- https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/list#event
type UserLocation ¶
type UserLocation struct { Area string `json:"area,omitempty"` // Textual location BuildingId string `json:"buildingId,omitempty"` // Building identifier CustomType string `json:"customType,omitempty"` // The custom value if the location type is custom DeskCode string `json:"deskCode,omitempty"` // Most specific textual code of individual desk location FloorName string `json:"floorName,omitempty"` // Floor name/number FloorSection string `json:"floorSection,omitempty"` // Floor section Type string `json:"type,omitempty"` // The location type }
type UserName ¶
type UserName struct { FullName string `json:"fullName,omitempty"` // The user's full name FamilyName string `json:"familyName,omitempty"` // The user's last name GivenName string `json:"givenName,omitempty"` // The user's first name DisplayName string `json:"displayName,omitempty"` // The user's display name }
https://developers.google.com/admin-sdk/directory/reference/rest/v1/users#username
type UserProjection ¶
type UserProjection string
https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/list#projection
const ( BASIC UserProjection = "BASIC" // Do not include any custom fields for the user CUSTOM UserProjection = "CUSTOM" // Include custom fields from scemas requested i nthe customFieldMask FULL UserProjection = "FULL" // Include all fields associated with this user. )
type UserQuery ¶
type UserQuery struct { CustomFieldMask string `url:"customFieldMask,omitempty"` // A comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom. Customer string `url:"customer,omitempty"` // The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, use this field instead of domain. You can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource. You must provide either the customer or the domain parameter. Domain string `url:"domain,omitempty"` // The domain name. Use this field to get groups from only one domain. To return all domains for a customer account, use the customer query parameter instead. Either the customer or the domain parameter must be provided. Event UserEvent `url:"event,omitempty"` // Event on which subscription is intended (if subscribing) MaxResults int `url:"maxResults,omitempty"` // Maximum number of results to return. Default: 100. Max 500. https://developers.google.com/admin-sdk/directory/v1/limits#api-limits-and-quotas OrderBy OrderBy `url:"orderBy,omitempty"` // Property to use for sorting results. PageToken string `url:"pageToken,omitempty"` // Token to specify next page in the list Projection UserProjection `url:"projection,omitempty"` // What subset of fields to fetch for this user. Query string `url:"query,omitempty"` // Query string for searching user fields. For more information on constructing user queries, see [Search for Users](https://developers.google.com/admin-sdk/directory/v1/guides/search-users). ShowDeleted string `url:"showDeleted,omitempty"` // If set to true, retrieves the list of deleted users. (Default: false) SortOrder SortOrder `url:"sortOrder,omitempty"` // Whether to return results in ascending or descending order, ignoring case. ViewType UserViewType `url:"viewType,omitempty"` // Whether to fetch the administrator-only or domain-wide public view of the user. For more information, see Retrieve a user as a non-administrator. }
* Query Parameters for Drive Files * Reference: https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/list#query-parameters
func (*UserQuery) ValidateQuery ¶
* Validate the query parameters for the Users resource
type UserViewType ¶
type UserViewType string
https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/list#viewtype
const ( ADMIN_VIEW UserViewType = "admin_view" // Results include both administrator-only and domain-public fields for the user. DOMAIN_PUBLIC UserViewType = "domain_public" // Results only include fields for the user that are publicly visible to other users )
type Users ¶
type Users struct { Kind string `json:"kind,omitempty"` // The type of the API resource TriggerEvent string `json:"trigger_event,omitempty"` // Event that triggered this response (only used in case of Push Response) Etag string `json:"etag,omitempty"` // ETag of the resource Users []*User `json:"users,omitempty"` // A list of user objects NextPageToken string `json:"nextPageToken,omitempty"` // Token to specify the next page in the list }
### User Structs --------------------------------------------------------------------------------------- https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/list#response-body
type UsersClient ¶
type UsersClient struct {
*Client
}
UsersClient for chaining methods
func (*UsersClient) GetUser ¶
func (c *UsersClient) GetUser(userKey string) (*User, error)
* Retrieves a User's Profile * /admin/directory/v1/users/{userKey} * https://developers.google.com/admin-sdk/directory/v1/reference/users/get
func (*UsersClient) ListAllUsers ¶
func (c *UsersClient) ListAllUsers() (*Users, error)
* List all users * /admin/directory/v1/users * https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/list
func (*UsersClient) SearchUsers ¶
func (c *UsersClient) SearchUsers(q *UserQuery) (*Users, error)
* Search for users based on filter conditions * /admin/directory/v1/users * https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/list
func (*UsersClient) UpdateUser ¶
func (c *UsersClient) UpdateUser(userKey string, u *User) (*User, error)
* Update a User's Profile * /admin/directory/v1/users/{userKey} * https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/update
type ValueRange ¶
type ValueRange struct { Range string `json:"range"` // The range the values cover, in A1 notation MajorDimension string `json:"majorDimension"` // The major dimension of the values Values [][]string `json:"values"` // The data that was read or to be written }
ValueRange represents a value range in a spreadsheet.
type VideoMediaMetadata ¶
type VolumeInfo ¶
type VolumeInfo struct { StorageFree string `json:"storageFree,omitempty"` // Free disk space in bytes. StorageTotal string `json:"storageTotal,omitempty"` // Total disk space in bytes. VolumeId string `json:"volumeId,omitempty"` // Volume ID. }
VolumeInfo represents information about a disk volume on a Chrome device.
type Warning ¶
type Warning struct { Code string `json:"code,omitempty"` // Machine readable code or warning type Message string `json:"message,omitempty"` // The human readable messages for a warning Data []WarningData `json:"data,omitempty"` // Key-value pairs to give detailed information on the warning }
type WarningData ¶
type Website ¶
type Website struct { CustomType string `json:"customType,omitempty"` // The custom value if the website type is custom Primary bool `json:"primary,omitempty"` // If true, this is the user's primary website Type string `json:"type,omitempty"` // The type or purpose of the website Value string `json:"value,omitempty"` // The URL of the website }