drive

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScopeDrive         = "https://www.googleapis.com/auth/drive"
	ScopeDriveFile     = "https://www.googleapis.com/auth/drive.file"
	ScopeDriveReadonly = "https://www.googleapis.com/auth/drive.readonly"
)
View Source
const Domain = "www.googleapis.com"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(options ...drive_config.Option) *Client

func (*Client) CreatePermission

func (c *Client) CreatePermission(
	ctx context.Context,
	fileId string,
	p *permission.Permission,
	options ...create_permission_config.Option,
) (*permission.Permission, error)

CreatePermission grants a user, group, domain, or anyone access to the file identified by fileId.

func (*Client) DeletePermission

func (c *Client) DeletePermission(
	ctx context.Context,
	fileId string,
	permissionId string,
	options ...fetch_config.Option,
) error

DeletePermission removes the permission identified by permissionId from the file identified by fileId.

func (*Client) GetPermission

func (c *Client) GetPermission(
	ctx context.Context,
	fileId string,
	permissionId string,
	options ...fetch_config.Option,
) (*permission.Permission, error)

GetPermission retrieves the permission identified by permissionId on the file identified by fileId.

func (*Client) ListPermissions

func (c *Client) ListPermissions(
	ctx context.Context,
	fileId string,
	options ...fetch_config.Option,
) ([]*permission.Permission, error)

ListPermissions retrieves all permissions on the file identified by fileId.

func (*Client) UpdatePermission

func (c *Client) UpdatePermission(
	ctx context.Context,
	fileId string,
	permissionId string,
	p *permission.Permission,
	options ...update_permission_config.Option,
) (*permission.Permission, error)

UpdatePermission patches the permission identified by permissionId on the file identified by fileId. Only the writable fields (role, allowFileDiscovery, expirationTime) may be set in p.

Directories

Path Synopsis
types

Jump to

Keyboard shortcuts

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