package
0.0.0-20240717021838-601228c88e2b
Repository: https://github.com/gemini-oss/rego.git
Documentation: pkg.go.dev
# Functions
# DedupeScopes
Removes duplicate scopes from a slice
*/.
# FetchGoogleAPIScopes
*/.
# LoadScopes
Loads scopes from a JSON file
*/.
- # 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: "[email protected]",
}
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: "[email protected]",
}
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()
```
*/.
# Organize Scopes from Google API Endpoints
Organizes the scopes from the Google API endpoints into a map of scopes by service
*/.
# ReadDiscoveryDirectory
Reads the Google API discovery directory from a local file
*/.
# SaveEndpoints
Saves Google API endpoints to a JSON file
*/.
# Constants
User Created Event.
Results include both administrator-only and domain-public fields for the user.
No description provided by the author
Policy in official format.
Please stop using this policy.
Policy can change format in backward incompatible way (breaking change).
No description provided by the author
Policy is not working yet, but giving developers heads up on format.
Unspecified API lifecycle stage.
Ascending order.
No description provided by the author
Do not include any custom fields for the user.
No description provided by the author
CSV.
GZIP.
HTML.
GIF.
JPEG.
PNG.
WEBP.
JSON.
Plain text.
Unspecified content type.
YAML.
ZIP.
Include custom fields from scemas requested i nthe customFieldMask.
User Deleted Event.
Descending order.
Results only include fields for the user that are publicly visible to other users.
User's family name.
Include all fields associated with this user.
User's given name.
Group target resource.
No description provided by the author
User Admin Status Change Event.
No description provided by the author
No description provided by the author
No description provided by the author
Organizational unit target resource.
Primary email of the user.
No description provided by the author
Unspecified target resource.
User Undeleted Event.
User Updated Event.
# Variables
https://developers.google.com/admin-sdk/reference-overview.
https://support.google.com/chrome/a/answer/9681204?ref_topic=9301744.
https://developers.google.com/admin-sdk/reports/reference/rest.
No description provided by the author
No description provided by the author
https://developers.google.com/admin-sdk/directory/reference/rest/v1/asps.
https://developers.google.com/admin-sdk/directory/reference/rest/v1/channels.
https://support.google.com/chrome/a/answer/9681204?ref_topic=9301744.
https://developers.google.com/admin-sdk/directory/reference/rest/v1/chromeosdevices.
https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers.
https://developers.google.com/admin-sdk/directory/reference/rest/v1/domains.
https://developers.google.com/admin-sdk/directory/reference/rest/v1/groups.
https://developers.google.com/admin-sdk/directory/reference/rest/v1/members.
https://developers.google.com/admin-sdk/directory/reference/rest/v1/mobiledevices.
https://developers.google.com/admin-sdk/directory/reference/rest/v1/orgunits.
https://developers.google.com/admin-sdk/directory/reference/rest/v1/privileges.
https://developers.google.com/admin-sdk/directory/reference/rest/v1/resources.
https://developers.google.com/admin-sdk/directory/reference/rest/v1/roleassignments.
https://developers.google.com/admin-sdk/directory/reference/rest/v1/roles.
https://developers.google.com/admin-sdk/directory/reference/rest/v1/schemas.
https://developers.google.com/admin-sdk/directory/reference/rest/v1/tokens.
https://developers.google.com/admin-sdk/directory/reference/rest/v1/users.
https://developers.google.com/drive/api/v3/reference/about.
https://developers.google.com/drive/api/v3/reference/.
https://developers.google.com/drive/api/v3/reference/changes.
https://developers.google.com/drive/api/v3/reference/channels.
https://developers.google.com/drive/api/v3/reference/comments.
https://developers.google.com/drive/api/v3/reference/files.
https://developers.google.com/drive/api/v3/reference/permissions.
https://developers.google.com/drive/api/v3/reference/replies.
https://developers.google.com/drive/api/v3/reference/revisions.
https://developers.google.com/admin-sdk/reports/reference/rest/v1/activities.
https://developers.google.com/admin-sdk/reports/reference/rest/v1/channels.
https://developers.google.com/admin-sdk/reports/reference/rest/v1/customerUsageReports.
https://developers.google.com/admin-sdk/reports/reference/rest/v1/entityUsageReports.
https://developers.google.com/admin-sdk/reports/reference/rest/v1/userUsageReport.
https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/get.
https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.
No description provided by the author
https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append.
https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/batchGet.
https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/batchUpdate.
https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/get.
No description provided by the author
# Structs
ActiveTimeRange represents an active time range of the device.
No description provided by the author
No description provided by the author
AdditionalTargetKeyName represents additional key names for identifying policy value targets.
AdminClient for chaining methods.
### Google Client Structs ---------------------------------------------------------------------.
No description provided by the author
AutoResizeDimensionsRequest represents a request to auto resize dimensions.
BandedRange represents a banded (alternating colors) range.
BasicFilter represents a basic filter.
BigQueryDataSourceSpec represents the specifications of a BigQuery data source.
BigQueryQuerySpec represents the specifications of a BigQuery query.
BigQueryTableSpec represents the specifications of a BigQuery table.
BooleanRule represents a boolean rule for conditional formatting.
No description provided by the author
CellData represents data in a cell.
CellFormat represents the formatting of a cell.
ChromeOSDevice represents a ChromeOS device resource.
### Device Structs ---------------------------------------------------------------------------- https://developers.google.com/admin-sdk/directory/v1/guides/manage-chrome-devices.
No description provided by the author
Color represents the color object https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/other#color.
ColorStyle represents the color style object https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/other#colorstyle.
ConditionalFormatRule represents a conditional formatting rule.
No description provided by the author
https://developers.google.com/drive/api/reference/rest/v3/files#contentrestriction.
CpuInfo represents information about the CPU of the Chrome device.
CpuStatusReport represents a CPU status report of a Chrome device.
CpuTemperatureInfo represents information about CPU temperature in a Chrome device.
CState represents a C-State in the CPU of a Chrome device.
Customer represents a Google Workspace account.
CustomerPostalAddress represents a customer's physical address.
DataSource represents a data source in a spreadsheet.
DataSourceColumn represents a column in the data source.
DataSourceColumnReference represents a reference to a column in the data source.
DataSourceParameter represents a parameter of a data source.
DataSourceRefreshDailySchedule represents a daily schedule for data source refresh.
DataSourceRefreshMonthlySchedule represents a monthly schedule for data source refresh.
DataSourceRefreshSchedule represents a refresh schedule of a data source.
DataSourceRefreshWeeklySchedule represents a weekly schedule for data source refresh.
DataSourceSheetDimensionRange represents the data source sheet dimension range object https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets#DataDourceSheetDimensionRange.
DataSourceSheetProperties represents the properties of a data source sheet.
DataSourceSpec represents the specifications of a data source.
DataValidationRule represents a rule for data validation.
DescriptorProto describes a message type.
DeveloperMetadata represents metadata associated with a developer.
DeviceClient for chaining methods.
DeviceFile represents a file on a Chrome device.
* Query Parameters for ChromeOS Devices
* https://developers.google.com/admin-sdk/directory/reference/rest/v1/chromeosdevices/list#query-parameters
*/.
DimensionGroup represents a group of dimensions.
DimensionProperties represents properties of dimensions within a sheet.
DimensionRange represents the dimension range object https://developers.google.com/sheets/api/reference/rest/v4/DimensionRange.
No description provided by the author
No description provided by the author
DiskVolumeReport represents a disk volume report of a Chrome device.
DriveClient for chaining methods.
* Query Parameters for Drive Files
* Reference: https://developers.google.com/drive/api/reference/rest/v3/files/list#query-parameters
*/.
No description provided by the author
EmbeddedChart represents an embedded chart.
No description provided by the author
No description provided by the author
ErrorDetail contains detailed information about an error.
ErrorItem contains detailed information about an individual error.
* # ErrorResponse
* ErrorResponse represents the structure of an error response.
No description provided by the author
ExtendedValue represents a user-entered value.
No description provided by the author
* Field represents a field, which is a typed key-value pair.
https://developers.google.com/chrome/policy/reference/rest/v1/customers.policySchemas#fieldconstraints.
FieldDescriptorProto describes a field within a message.
https://developers.google.com/drive/api/reference/rest/v3/files#resource:-file.
FileDescriptorProto describes a complete .proto file.
### Google Drive Structs --------------------------------------------------------------------- https://developers.google.com/drive/api/reference/rest/v3/files/list#response-body.
https://developers.google.com/drive/api/reference/rest/v3/User FileUser represents information about a Drive user.
FilterCriteria represents filter criteria.
FilterSpec represents a filter specification.
FilterView represents a filter view.
No description provided by the author
No description provided by the author
GradientRule represents a gradient rule for conditional formatting.
GridData represents the data in a grid (or sheet).
GridProperties represents the properties of a grid.
GridRange represents a range in a grid (or sheet).
No description provided by the author
No description provided by the author
No description provided by the author
Interval represents a time interval.
IterativeCalculationSettings represents the settings for iterative calculations.
* Label represents a label and its fields.
No description provided by the author
No description provided by the author
LastKnownNetwork represents the last known network of a Chrome device.
No description provided by the author
No description provided by the author
LogicalCpu represents a logical CPU in the Chrome device.
NamedRange represents a named range in a spreadsheet.
No description provided by the author
https://developers.google.com/chrome/policy/reference/rest/v1/customers.policySchemas#numericrangeconstraint.
No description provided by the author
No description provided by the author
https://developers.google.com/admin-sdk/directory/reference/rest/v1/orgunits.
https://developers.google.com/admin-sdk/directory/reference/rest/v1/chromeosdevices#OsUpdateStatus.
No description provided by the author
https://developers.google.com/drive/api/reference/rest/v3/permissions#resource:-permission.
No description provided by the author
https://developers.google.com/drive/api/reference/rest/v3/permissions/list#response-body.
PermissionsClient for chaining methods.
* Query Parameters for Permissions
* Reference: https://developers.google.com/drive/api/reference/rest/v3/permissions/create#query-parameters
*/.
No description provided by the author
PivotGroup represents a group in a pivot table.
PivotTable represents a pivot table.
https://developers.google.com/chrome/policy/reference/rest/v1/customers.policySchemas#policyapilifecycle.
https://developers.google.com/chrome/policy/reference/rest/v1/customers.policies.orgunits/batchModify#modifyorgunitpolicyrequest.
https://developers.google.com/chrome/policy/reference/rest/v1/customers.policies.orgunits/batchModify#request-body.
* Query Parameters for Device Policy Schemas
* https://developers.google.com/chrome/policy/reference/rest/v1/customers.policySchemas/list#query-parameters
*/.
* Request Parameters for Device Policies
* https://developers.google.com/chrome/policy/reference/rest/v1/customers.policies/resolve#PolicyRequest
*/.
PolicySchema represents the schema of a policy.
https://developers.google.com/chrome/policy/reference/rest/v1/customers.policySchemas#policyschemafielddependencies.
https://developers.google.com/chrome/policy/reference/rest/v1/customers.policySchemas#policyschemafielddescription.
https://developers.google.com/chrome/policy/reference/rest/v1/customers.policySchemas#policyschemafieldknownvaluedescription.
https://developers.google.com/chrome/policy/reference/rest/v1/customers.policySchemas#policyschemanoticedescription.
https://developers.google.com/chrome/policy/reference/rest/v1/customers.policySchemas#policyschemarequireditems.
https://developers.google.com/chrome/policy/reference/rest/v1/customers.policySchemas.
No description provided by the author
https://developers.google.com/chrome/policy/reference/rest/v1/PolicyValue.
No description provided by the author
ProtectedRange represents a range that is protected.
RecentUser represents a recent user of a Chrome device.
No description provided by the author
RepeatCellRequest sets the values of cells in a range to a set of values in a certain pattern.
https://developers.google.com/admin-sdk/reports/reference/rest/v1/activities/list#Activity.
https://developers.google.com/admin-sdk/reports/reference/rest/v1/NestedParameter.
* Query Parameters for Admin Reports
* https://developers.google.com/admin-sdk/reports/reference/rest/v1/activities/list#query-parameters
*/.
### Chrome Policy Structs ---------------------------------------------------------------------------- ResolvedPolicies represents a list of resolved policies found by the resolve request.
https://developers.google.com/chrome/policy/reference/rest/v1/customers.policies/resolve#ResolvedPolicy.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RowData represents data in a row.
No description provided by the author
ScreenshotFile represents a screenshot file on a Chrome device.
No description provided by the author
SetBasicFilterRequest represents the request to set a basic filter Source: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#setbasicfilterrequest.
Sheet represents a sheet within a spreadsheet.
SheetBatchRequest represents a batch of updates to apply to a spreadsheet.
Link represents the link object https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/cells#link.
SheetProperties represents properties of a sheet.
SheetRequest represents a single kind of update to apply to a spreadsheet.
SheetsClient for chaining methods.
* Query Parameters for Sheet Values
*/.
No description provided by the author
Slicer represents a slicer.
SlicerSpec represents the specification for a slicer.
No description provided by the author
SortSpec represents a sort specification.
### Spreadsheet Structs --------------------------------------------------------------------- Spreadsheet represents a spreadsheet.
SpreadsheetProperties represents properties of a spreadsheet.
SpreadsheetTheme represents a theme of a spreadsheet.
No description provided by the author
SystemRamFreeReport represents a report of free RAM on a Chrome device.
TextFormat represents the text format https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/other#textformat.
ThemeColorPair represents a pair of theme color.
No description provided by the author
TimeOfDay represents a time of a day.
TpmVersionInfo represents TPM version information of a Chrome device.
UpdateDimensionPropertiesRequest represents the request to update dimension properties https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#updatedimensionpropertiesrequest.
https://developers.google.com/chrome/policy/reference/rest/v1/customers.policySchemas#uploadedfileconstraints.
https://developers.google.com/admin-sdk/directory/reference/rest/v1/users#resource:-user.
No description provided by the author
https://developers.google.com/admin-sdk/directory/reference/rest/v1/users#username.
* Query Parameters for Drive Files
* Reference: https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/list#query-parameters
*/.
### User Structs --------------------------------------------------------------------------------------- https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/list#response-body.
UsersClient for chaining methods.
ValueRange represents a value range in a spreadsheet.
No description provided by the author
VolumeInfo represents information about a disk volume on a Chrome device.
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GoogleAPIResponse is an interface for Google API responses involving pagination.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author
ContentType represents types of files that can be uploaded.
DayOfWeek represents a day of the week.
DeveloperMetadataLocationType represents the type of location on which developer metadata may be associated.
No description provided by the author
https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/list#orderby.
PolicyAPILifecycleStage represents the lifecycle stage of the policy API.
https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/list#sortorder.
TargetResource represents target resource types for policies.
### Enums --------------------------------------------------------------------- https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/list#event.
https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/list#projection.
https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/list#viewtype.