s3

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultACL = 0540

Variables

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

Functions

func FromEnv

func FromEnv() (billy.Filesystem, error)

func NewDirInfo

func NewDirInfo(prefix string) fs.FileInfo

func NewFileInfo

func NewFileInfo(info minio.ObjectInfo) fs.FileInfo

func NewS3

func NewS3() billy.Filesystem

Types

type File

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

func (*File) Close

func (f *File) Close() error

Close implements billy.File.

func (*File) Lock

func (f *File) Lock() error

Lock implements billy.File.

func (*File) Name

func (f *File) Name() string

Name implements billy.File.

func (*File) Read

func (f *File) Read(p []byte) (n int, err error)

Read implements billy.File.

func (*File) ReadAt

func (f *File) ReadAt(p []byte, off int64) (n int, err error)

ReadAt implements billy.File.

func (*File) Seek

func (f *File) Seek(offset int64, whence int) (int64, error)

Seek implements billy.File.

func (*File) Truncate

func (f *File) Truncate(size int64) error

Truncate implements billy.File.

func (*File) Unlock

func (f *File) Unlock() error

Unlock implements billy.File.

func (*File) Write

func (*File) Write(p []byte) (n int, err error)

Write implements billy.File.

type FileInfo

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

func (*FileInfo) IsDir

func (fi *FileInfo) IsDir() bool

IsDir implements fs.FileInfo.

func (*FileInfo) ModTime

func (fi *FileInfo) ModTime() time.Time

ModTime implements fs.FileInfo.

func (*FileInfo) Mode

func (fi *FileInfo) Mode() fs.FileMode

Mode implements fs.FileInfo.

func (*FileInfo) Name

func (fi *FileInfo) Name() string

Name implements fs.FileInfo.

func (*FileInfo) Size

func (fi *FileInfo) Size() int64

Size implements fs.FileInfo.

func (*FileInfo) Sys

func (fi *FileInfo) Sys() any

Sys implements fs.FileInfo.

type S3

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

func (*S3) Chroot

func (*S3) Chroot(path string) (billy.Filesystem, error)

Chroot implements billy.Filesystem.

func (*S3) Create

func (*S3) Create(filename string) (billy.File, error)

Create implements billy.Filesystem.

func (*S3) Index

func (s3 *S3) Index()

func (*S3) Join

func (*S3) Join(elem ...string) string

Join implements billy.Filesystem.

func (*S3) Lstat

func (*S3) Lstat(filename string) (fs.FileInfo, error)

Lstat implements billy.Filesystem.

func (*S3) MkdirAll

func (s3 *S3) MkdirAll(filename string, perm fs.FileMode) error

MkdirAll implements billy.Filesystem.

func (*S3) Open

func (s3 *S3) Open(filename string) (billy.File, error)

Open implements billy.Filesystem.

func (*S3) OpenFile

func (s3 *S3) OpenFile(filename string, flag int, perm fs.FileMode) (billy.File, error)

OpenFile implements billy.Filesystem.

func (*S3) ReadDir

func (s3 *S3) ReadDir(path string) ([]fs.FileInfo, error)

ReadDir implements billy.Filesystem.

func (*S3) Readlink(link string) (string, error)

Readlink implements billy.Filesystem.

func (*S3) Remove

func (s3 *S3) Remove(filename string) error

Remove implements billy.Filesystem.

func (*S3) Rename

func (s3 *S3) Rename(oldpath string, newpath string) error

Rename implements billy.Filesystem.

func (*S3) Root

func (*S3) Root() string

Root implements billy.Filesystem.

func (*S3) Stat

func (s3 *S3) Stat(filename string) (fs.FileInfo, error)

Stat implements billy.Filesystem.

func (*S3) Symlink(target string, link string) error

Symlink implements billy.Filesystem.

func (*S3) TempFile

func (*S3) TempFile(dir string, prefix string) (billy.File, error)

TempFile implements billy.Filesystem.

type S3Config added in v0.0.2

type S3Config struct {
	Alias, Endpoint, SecretKey, AccessKey, Bucket string
}

func (S3Config) Open added in v0.0.2

func (cfg S3Config) Open() (billy.Filesystem, error)

Jump to

Keyboard shortcuts

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