Documentation ¶
Index ¶
- type GoogleCloudStorage
- func (backend *GoogleCloudStorage) AvailableSpace() (uint64, error)
- func (backend *GoogleCloudStorage) Close() error
- func (backend *GoogleCloudStorage) CreatePath(path string) error
- func (backend *GoogleCloudStorage) DeleteFile(path string) error
- func (backend *GoogleCloudStorage) Description() string
- func (backend *GoogleCloudStorage) Location() string
- func (*GoogleCloudStorage) NewBackend(URL url.URL) (knoxite.Backend, error)
- func (backend *GoogleCloudStorage) Protocols() []string
- func (backend *GoogleCloudStorage) ReadFile(path string) ([]byte, error)
- func (backend *GoogleCloudStorage) Stat(path string) (uint64, error)
- func (backend *GoogleCloudStorage) WriteFile(path string, data []byte) (size uint64, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoogleCloudStorage ¶
type GoogleCloudStorage struct { knoxite.StorageFilesystem // contains filtered or unexported fields }
GoogleCloudStorage stores data in a Google Cloud Storage bucket.
func (*GoogleCloudStorage) AvailableSpace ¶
func (backend *GoogleCloudStorage) AvailableSpace() (uint64, error)
AvailableSpace returns the free space on this backend.
func (*GoogleCloudStorage) Close ¶
func (backend *GoogleCloudStorage) Close() error
Close the backend.
func (*GoogleCloudStorage) CreatePath ¶
func (backend *GoogleCloudStorage) CreatePath(path string) error
CreatePath is not needed in Google Cloud Storage backend because paths are automatically created when writing a file.
func (*GoogleCloudStorage) DeleteFile ¶
func (backend *GoogleCloudStorage) DeleteFile(path string) error
DeleteFile deletes a file from Google Cloud Storage.
func (*GoogleCloudStorage) Description ¶
func (backend *GoogleCloudStorage) Description() string
Description returns a user-friendly description for this backend.
func (*GoogleCloudStorage) Location ¶
func (backend *GoogleCloudStorage) Location() string
Location returns the type and location of the repository.
func (*GoogleCloudStorage) NewBackend ¶
NewBackend returns a GoogleCloudStorage backend to create a storage client we need either the path to a credential JSON file set via the environment variable GOOGLE_APPLICATION_CREDENTIALS="[PATH]" or the path to the JSON file passed via the user parameter of the URL scheme.
func (*GoogleCloudStorage) Protocols ¶
func (backend *GoogleCloudStorage) Protocols() []string
Protocols returns the Protocol Schemes supported by this backend.
func (*GoogleCloudStorage) ReadFile ¶
func (backend *GoogleCloudStorage) ReadFile(path string) ([]byte, error)
ReadFile reads a file from Google Cloud Storage.