Documentation ¶
Overview ¶
Package gdrive implements Storage based on Google Drive.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDriveService ¶ added in v0.10.7
CreateDriveService creates a new Google Drive service, which encapsulates multiple clients used to access different Google Drive functionality. Exported for tests only.
func New ¶
New creates new Google Drive-backed storage with specified options:
- the 'folderID' field is required and all other parameters are optional.
By default the connection reuses credentials managed by (https://cloud.google.com/sdk/), but this can be disabled by setting IgnoreDefaultCredentials to true.
Types ¶
type Options ¶
type Options struct { // FolderId is Google Drive's ID of a folder where data is stored. FolderID string `json:"folderID"` // ServiceAccountCredentialsFile specifies the name of the file with Drive credentials. ServiceAccountCredentialsFile string `json:"credentialsFile,omitempty"` // ServiceAccountCredentialJSON specifies the raw JSON credentials. ServiceAccountCredentialJSON json.RawMessage `kopia:"sensitive" json:"credentials,omitempty"` // ReadOnly causes GCS connection to be opened with read-only scope to prevent accidental mutations. ReadOnly bool `json:"readOnly,omitempty"` throttling.Limits }
Options defines options Google Cloud Storage-backed storage.
Click to show internal directories.
Click to hide internal directories.