Documentation ¶
Overview ¶
Package gcs implements Storage based on Google Cloud Storage bucket.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New creates new Google Cloud Storage-backed storage with specified options:
- the 'BucketName' 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 { // BucketName is the name of the GCS bucket where data is stored. BucketName string `json:"bucket"` // Prefix specifies additional string to prepend to all objects. Prefix string `json:"prefix,omitempty"` // ServiceAccountCredentialsFile specifies the name of the file with GCS 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"` MaxUploadSpeedBytesPerSecond int `json:"maxUploadSpeedBytesPerSecond,omitempty"` MaxDownloadSpeedBytesPerSecond int `json:"maxDownloadSpeedBytesPerSecond,omitempty"` }
Options defines options Google Cloud Storage-backed storage.
Click to show internal directories.
Click to hide internal directories.