objects

package
v2.0.0-...-eff2c45 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotImplemented = errors.New("not implemented")

Functions

This section is empty.

Types

type Object

type Object struct {
	// contains filtered or unexported fields
}

implements contract for afero.File

func NewObject

func NewObject(fs *ObjectFs, name string) *Object

func (*Object) Close

func (f *Object) Close() error

func (*Object) Name

func (f *Object) Name() string

func (*Object) Read

func (f *Object) Read(_ []byte) (int, error)

func (*Object) ReadAt

func (f *Object) ReadAt(_ []byte, _ int64) (n int, err error)

func (*Object) Readdir

func (f *Object) Readdir(n int) ([]os.FileInfo, error)

Readdir reads directory entries and returns a slice up to n slices in directory order. If n >= 1, it returns at most n, an empty slice indicates an error (io.EOF at the end) If n == 0 or -1, it returns all entries the directory in one slice If an error occurs before reading the entire directory, it returns the read FileInfos and a non-nil error. If n <= 2, it returns up to n entries, including those from subdirectories (with io.EOF at the end)

func (*Object) ReaddirAll

func (f *Object) ReaddirAll() ([]os.FileInfo, error)

Readdirnames reads all directory entries in batches

func (*Object) Readdirnames

func (f *Object) Readdirnames(n int) ([]string, error)

Readdirnames reads directory entries and returns a slice of names. If n > 0, it returns at most n names; an empty slice indicates an error. At the end of the directory, it returns io.EOF. If n <= 0, it returns all names in the directory or any error encountered.

func (*Object) Seek

func (f *Object) Seek(_ int64, _ int) (int64, error)

func (*Object) Stat

func (f *Object) Stat() (os.FileInfo, error)

func (*Object) Sync

func (f *Object) Sync() error

func (*Object) Truncate

func (f *Object) Truncate(int64) error

func (*Object) Write

func (f *Object) Write(_ []byte) (int, error)

func (*Object) WriteAt

func (f *Object) WriteAt(_ []byte, _ int64) (n int, err error)

func (*Object) WriteString

func (f *Object) WriteString(_ string) (int, error)

type ObjectFs

type ObjectFs struct {
	// contains filtered or unexported fields
}

func NewObjectFs

func NewObjectFs(bucket string, session *awsSession.Session) *ObjectFs

func (ObjectFs) Chmod

func (fs ObjectFs) Chmod(_ string, _ os.FileMode) error

func (ObjectFs) Chown

func (ObjectFs) Chown(string, int, int) error

func (ObjectFs) Chtimes

func (ObjectFs) Chtimes(string, time.Time, time.Time) error

func (ObjectFs) Create

func (fs ObjectFs) Create(_ string) (afero.File, error)

func (ObjectFs) Mkdir

func (fs ObjectFs) Mkdir(_ string, _ os.FileMode) error

func (ObjectFs) MkdirAll

func (fs ObjectFs) MkdirAll(_ string, _ os.FileMode) error

func (ObjectFs) Name

func (ObjectFs) Name() string

func (*ObjectFs) Open

func (fs *ObjectFs) Open(name string) (afero.File, error)

func (*ObjectFs) OpenFile

func (fs *ObjectFs) OpenFile(name string, _ int, _ os.FileMode) (afero.File, error)

func (ObjectFs) Remove

func (fs ObjectFs) Remove(_ string) error

func (*ObjectFs) RemoveAll

func (fs *ObjectFs) RemoveAll(_ string) error

func (ObjectFs) Rename

func (fs ObjectFs) Rename(_, _ string) error

func (ObjectFs) Stat

func (fs ObjectFs) Stat(name string) (os.FileInfo, error)

type ObjectInfo

type ObjectInfo struct {
	// contains filtered or unexported fields
}

implements contract for os.FileInfo

func NewObjectInfo

func NewObjectInfo(path string, directory bool, sizeInBytes int64, modTime time.Time) ObjectInfo

func (ObjectInfo) IsDir

func (fi ObjectInfo) IsDir() bool

func (ObjectInfo) ModTime

func (fi ObjectInfo) ModTime() time.Time

func (ObjectInfo) Mode

func (fi ObjectInfo) Mode() os.FileMode

func (ObjectInfo) Name

func (fi ObjectInfo) Name() string

func (ObjectInfo) Path

func (fi ObjectInfo) Path() string

func (ObjectInfo) Size

func (fi ObjectInfo) Size() int64

func (ObjectInfo) Sys

func (fi ObjectInfo) Sys() interface{}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL