Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) CreatePermission(ctx context.Context, fileId string, p *permission.Permission, ...) (*permission.Permission, error)
- func (c *Client) DeletePermission(ctx context.Context, fileId string, permissionId string, ...) error
- func (c *Client) GetPermission(ctx context.Context, fileId string, permissionId string, ...) (*permission.Permission, error)
- func (c *Client) ListPermissions(ctx context.Context, fileId string, options ...fetch_config.Option) ([]*permission.Permission, error)
- func (c *Client) UpdatePermission(ctx context.Context, fileId string, permissionId string, ...) (*permission.Permission, error)
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.
Click to show internal directories.
Click to hide internal directories.