gsmdrivelabels

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: GPL-3.0 Imports: 8 Imported by: 1

Documentation

Overview

Package gsmdrivelabels implements the Drive Labels API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchDeleteLabelPermissions added in v0.9.0

func BatchDeleteLabelPermissions(parent string, request *drivelabels.GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest) (bool, error)

DeleteLabelPermission deletes a principal's permission on a Label. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.

func BatchUpdateLabelPermissions added in v0.9.0

func BatchUpdateLabelPermissions(parent, fields string, request *drivelabels.GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest) (*drivelabels.GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse, error)

BatchDeleteLabelPermissions updatess Label permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.

func CreateLabel added in v0.9.0

func CreateLabel(label *drivelabels.GoogleAppsDriveLabelsV2Label, languageCode, fields string, useAdminAccess bool) (*drivelabels.GoogleAppsDriveLabelsV2Label, error)

CreateLabel creates a new Label.

func CreateLabelPermission added in v0.9.0

func CreateLabelPermission(parent, fields string, useAdminAccess bool, permission *drivelabels.GoogleAppsDriveLabelsV2LabelPermission) (*drivelabels.GoogleAppsDriveLabelsV2LabelPermission, error)

CreateLabelPermission updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.

func DeleteLabel added in v0.9.0

func DeleteLabel(name, requiredRevisionId string, useAdminAccess bool) (bool, error)

DeleteLabel permanently deletes a Label and related metadata on Drive Items. Once deleted, the Label and related Drive item metadata will be deleted. Only draft Labels, and disabled Labels may be deleted.

func DeleteLabelPermission added in v0.9.0

func DeleteLabelPermission(name string, useAdminAccess bool) (bool, error)

DeleteLabelPermission deletes a principal's permission on a Label. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.

func Delta added in v0.9.0

func Delta(name, fields string, request *drivelabels.GoogleAppsDriveLabelsV2DeltaUpdateLabelRequest) (*drivelabels.GoogleAppsDriveLabelsV2DeltaUpdateLabelResponse, error)

Delta updates a single Label by applying a set of update requests resulting in a new draft revision. The batch update is all-or-nothing: If any of the update requests are invalid, no changes are applied. The resulting draft revision must be published before the changes may be used with Drive Items.

func Disable added in v0.9.0

func Disable(name, fields string, request *drivelabels.GoogleAppsDriveLabelsV2DisableLabelRequest) (*drivelabels.GoogleAppsDriveLabelsV2Label, error)

Disable disables a published Label. Disabling a Label will result in a new disabled published revision based on the current published revision. If there is a draft revision, a new disabled draft revision will be created based on the latest draft revision. Older draft revisions will be deleted.

func Enable added in v0.9.0

func Enable(name, fields string, request *drivelabels.GoogleAppsDriveLabelsV2EnableLabelRequest) (*drivelabels.GoogleAppsDriveLabelsV2Label, error)

Enable enables a disabled Label and restore it to its published state. This will result in a new published revision based on the current disabled published revision. If there is an existing disabled draft revision, a new revision will be created based on that draft and will be enabled.

func GetCapabilities added in v0.9.0

func GetCapabilities(name, customer, fields string) (*drivelabels.GoogleAppsDriveLabelsV2UserCapabilities, error)

Gets the user capabilities.

func GetLabel

func GetLabel(name, languageCode, view, fields string, useAdminAccess bool) (*drivelabels.GoogleAppsDriveLabelsV2Label, error)

GetLabel gets a label by its resource name. Resource name may be any of: labels/{id} - See labels/{id}@latest labels/{id}@latest - Gets the latest revision of the label. labels/{id}@published - Gets the current published revision of the label. labels/{id}@{revisionId} - Gets the label at the specified revision ID.

func GetLabelLimits added in v0.9.0

func GetLabelLimits(name, fields string) (*drivelabels.GoogleAppsDriveLabelsV2LabelLimits, error)

Get the constraints on the structure of a Label; such as, the maximum number of Fields allowed and maximum length of the label title.

func ListLabelLocks added in v0.9.0

func ListLabelLocks(parent, fields string, cap int) (<-chan *drivelabels.GoogleAppsDriveLabelsV2LabelLock, <-chan error)

Lists the LabelLocks on a Label.

func ListLabelPermissions added in v0.9.0

func ListLabelPermissions(parent, fields string, useAdminAccess bool, cap int) (<-chan *drivelabels.GoogleAppsDriveLabelsV2LabelPermission, <-chan error)

Lists the LabelPermissions on a Label.

func ListLabels

func ListLabels(languageCode, view, minimumRole, fields string, useAdminAccess, publishedOnly bool, cap int) (<-chan *drivelabels.GoogleAppsDriveLabelsV2Label, <-chan error)

ListLabels list labels.

func Publish added in v0.9.0

func Publish(name, fields string, request *drivelabels.GoogleAppsDriveLabelsV2PublishLabelRequest) (*drivelabels.GoogleAppsDriveLabelsV2Label, error)

Publish all draft changes to the Label. Once published, the Label may not return to its draft state. See google.apps.drive.labels.v2.Lifecycle for more information. Publishing a Label will result in a new published revision. All previous draft revisions will be deleted. Previous published revisions will be kept but are subject to automated deletion as needed. Once published, some changes are no longer permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the Label will be rejected.

func SetClient

func SetClient(c *http.Client)

SetClient is used to inject a *http.Client into the package

func UpdateLabelCopyMode added in v0.9.0

func UpdateLabelCopyMode(name, fields string, request *drivelabels.GoogleAppsDriveLabelsV2UpdateLabelCopyModeRequest) (*drivelabels.GoogleAppsDriveLabelsV2Label, error)

Publish all draft changes to the Label. Once published, the Label may not return to its draft state. See google.apps.drive.labels.v2.Lifecycle for more information. Publishing a Label will result in a new published revision. All previous draft revisions will be deleted. Previous published revisions will be kept but are subject to automated deletion as needed. Once published, some changes are no longer permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the Label will be rejected.

func UpdatePermissions added in v0.9.0

func UpdatePermissions(name, fields string, useAdminAccess bool, request *drivelabels.GoogleAppsDriveLabelsV2LabelPermission) (*drivelabels.GoogleAppsDriveLabelsV2LabelPermission, error)

UpdatePermissions updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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