Documentation ¶
Index ¶
- func NewGcsFile(uri string) fs.IFile
- func NewGcsFileStore(uri string) fs.IFileStore
- type GcsFile
- func (t *GcsFile) Close() (err error)
- func (t *GcsFile) Copy(wc io.WriteCloser) (written int64, err error)
- func (t *GcsFile) Delete() (err error)
- func (t *GcsFile) Exists() (result bool)
- func (t *GcsFile) Read(p []byte) (int, error)
- func (t *GcsFile) ReadAll() (b []byte, err error)
- func (t *GcsFile) Rename(pattern string) (string, error)
- func (t *GcsFile) URI() string
- func (t *GcsFile) Write(p []byte) (int, error)
- func (t *GcsFile) WriteAll(b []byte) (n int, err error)
- type GcsFileStore
- func (f *GcsFileStore) Apply(filter string, action func(string)) error
- func (f *GcsFileStore) Close() error
- func (f *GcsFileStore) Delete(uri string) (err error)
- func (f *GcsFileStore) Exists(uri string) (result bool)
- func (f *GcsFileStore) List(filter string) ([]fs.IFile, error)
- func (f *GcsFileStore) URI() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGcsFile ¶
func NewGcsFileStore ¶
func NewGcsFileStore(uri string) fs.IFileStore
NewGcsFileStore factory method
Types ¶
type GcsFile ¶
type GcsFile struct {
// contains filtered or unexported fields
}
GcsFile is a concrete implementation of Google Cloud Storage file
func (*GcsFile) Copy ¶
func (t *GcsFile) Copy(wc io.WriteCloser) (written int64, err error)
Copy file content to a writer
func (*GcsFile) Rename ¶
Rename change the resource name using pattern. The pattern can be a file or keeping parts from the original file using template ({{path}}, {{file}}, {{ext}})
type GcsFileStore ¶
type GcsFileStore struct {
// contains filtered or unexported fields
}
GcsFileStore is a concrete implementation of Google Cloud Storage
func (*GcsFileStore) Apply ¶
func (f *GcsFileStore) Apply(filter string, action func(string)) error
Apply action on files in the file store
func (*GcsFileStore) Close ¶ added in v1.2.45
func (f *GcsFileStore) Close() error
Close release associated resources, if any
func (*GcsFileStore) Exists ¶
func (f *GcsFileStore) Exists(uri string) (result bool)
Exists test for resource existence
func (*GcsFileStore) List ¶
func (f *GcsFileStore) List(filter string) ([]fs.IFile, error)
List files in the file store
func (*GcsFileStore) URI ¶
func (f *GcsFileStore) URI() string
URI returns the resource URI with schema Schema can be: file, gcs, http etc
Click to show internal directories.
Click to hide internal directories.