Documentation
¶
Index ¶
- Constants
- type Behaviour
- type FileInfo
- type FsInfo
- type GCS
- func (g *GCS) Append(ctx context.Context, name string) (dfsapi.FileWriter, error)
- func (g *GCS) Chmod(ctx context.Context, name string, perm os.FileMode) error
- func (g *GCS) Chown(ctx context.Context, name string, user, group string) error
- func (g *GCS) Chtimes(ctx context.Context, name string, atime time.Time, mtime time.Time) error
- func (g *GCS) Close(ctx context.Context) error
- func (g *GCS) CopyToLocal(ctx context.Context, src string, dst string) error
- func (g *GCS) CopyToRemote(ctx context.Context, src string, dst string) error
- func (g *GCS) Create(ctx context.Context, name string) (dfsapi.FileWriter, error)
- func (g *GCS) CreateEmptyFile(ctx context.Context, name string) error
- func (g *GCS) CreateFile(ctx context.Context, name string, _ int, _ int64, _ os.FileMode) (dfsapi.FileWriter, error)
- func (g *GCS) GetContentSummary(ctx context.Context, path string) (*dfsapi.ContentSummary, error)
- func (g *GCS) Mkdir(ctx context.Context, dirname string, perm os.FileMode) error
- func (g *GCS) MkdirAll(ctx context.Context, dirname string, perm os.FileMode) error
- func (g *GCS) Open(ctx context.Context, name string) (dfsapi.FileReader, error)
- func (g *GCS) ReadDir(ctx context.Context, dirname string) ([]os.FileInfo, error)
- func (g *GCS) ReadFile(ctx context.Context, filename string) ([]byte, error)
- func (g *GCS) Remove(ctx context.Context, name string) error
- func (g *GCS) RemoveAll(ctx context.Context, dirname string) error
- func (g *GCS) Rename(ctx context.Context, oldpath, newpath string) error
- func (g *GCS) RenameWithOverwriteOption(ctx context.Context, oldpath, newpath string, overwrite bool) error
- func (g *GCS) Stat(ctx context.Context, name string) (os.FileInfo, error)
- func (g *GCS) StatFs(_ context.Context) (dfsapi.FsInfo, error)
- func (g *GCS) User(ctx context.Context) string
- func (g *GCS) Walk(_ context.Context, _ string, _ filepath.WalkFunc) error
- type TransactionClient
Constants ¶
View Source
const ( InvalidBehaviour = iota Panic Warn Ignore )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GCS ¶
type GCS struct { BehaviourMode Behaviour // contains filtered or unexported fields }
func (*GCS) CopyToLocal ¶
func (*GCS) CopyToRemote ¶
func (*GCS) CreateFile ¶
func (*GCS) GetContentSummary ¶
func (*GCS) RemoveAll ¶
RemoveAll removes path and any children it contains. It removes everything it can but returns the first error it encounters. If the path does not exist, RemoveAll returns nil (no error).
func (*GCS) Rename ¶
Rename an existing GCS object GCS SDK Documentation states that we must copy the object to the new name and then delete the old one.
> To move or rename an object using the JSON API directly, first make a copy of the object > that has the properties you want and then delete the original object.
Found the Copier() API that provides an elegant way to copy large objects.
func (*GCS) RenameWithOverwriteOption ¶
type TransactionClient ¶
type TransactionClient struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.