Documentation ¶
Index ¶
- func NewFile(mgr *S3Manager, object *minio.Object, name string, memoryUploadMode bool, ...) *file
- func NewFileInfo(objectInfo minio.ObjectInfo) os.FileInfo
- func NewS3FileInfo(object *s3.Object) os.FileInfo
- func NewStrFileInfo(prefix string) os.FileInfo
- type S3
- type S3Manager
- func (s *S3Manager) BucketName() string
- func (s *S3Manager) Chmod(ppath string, mode os.FileMode) error
- func (s *S3Manager) Chown(ppath string, uid, gid int) error
- func (s *S3Manager) Clear() error
- func (s *S3Manager) Client() *minio.Client
- func (s *S3Manager) Copy(from, to string) error
- func (s *S3Manager) Download(ctx echo.Context, ppath string) error
- func (s *S3Manager) Edit(ctx echo.Context, ppath string, content string, encoding string) (interface{}, error)
- func (s *S3Manager) ErrIsNotExist(err error) bool
- func (s *S3Manager) Exists(ppath string) (bool, error)
- func (s *S3Manager) FPutObject(filePath string, objectName string) (int64, error)
- func (s *S3Manager) Get(ppath string) (*minio.Object, error)
- func (s *S3Manager) GetWithContext(ctx context.Context, ppath string) (*minio.Object, error)
- func (s *S3Manager) List(ctx echo.Context, ppath string, sortBy ...string) (dirs []os.FileInfo, exit bool, err error)
- func (s *S3Manager) ListTransfer(dirs []os.FileInfo) (dirList []echo.H, fileList []echo.H)
- func (s *S3Manager) Mkbucket(bucketName string, regions ...string) error
- func (s *S3Manager) Mkdir(ppath, newName string) error
- func (s *S3Manager) Move(from, to string) error
- func (s *S3Manager) Put(reader io.Reader, objectName string, size int64) (err error)
- func (s *S3Manager) PutObject(reader io.Reader, objectName string, size int64) (int64, error)
- func (s *S3Manager) Remove(ppath string) error
- func (s *S3Manager) RemoveDir(ppath string) error
- func (s *S3Manager) RemoveDirWithContext(ctx context.Context, ppath string) error
- func (s *S3Manager) RemoveWithContext(ctx context.Context, ppath string) error
- func (s *S3Manager) Rename(ppath, newName string) error
- func (s *S3Manager) Search(ppath string, prefix string, num int) []string
- func (s *S3Manager) SetBucketName(bucketName string) *S3Manager
- func (s *S3Manager) Stat(ppath string) (minio.ObjectInfo, error)
- func (s *S3Manager) StatIsExists(f minio.ObjectInfo, err error) (bool, error)
- func (s *S3Manager) Upload(ctx echo.Context, ppath string, chunkUpload *uploadClient.ChunkUpload, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFileInfo ¶
func NewFileInfo(objectInfo minio.ObjectInfo) os.FileInfo
func NewStrFileInfo ¶
Types ¶
type S3 ¶
type S3 interface { GetObject(bucketName, objectName string, opts minio.GetObjectOptions) (*minio.Object, error) ListBuckets() ([]minio.BucketInfo, error) ListObjectsV2(bucketName, objectPrefix string, recursive bool, doneCh <-chan struct{}) <-chan minio.ObjectInfo MakeBucket(bucketName, location string) error PutObject(bucketName, objectName string, reader io.Reader, objectSize int64, opts minio.PutObjectOptions) (int64, error) RemoveBucket(bucketName string) error RemoveObject(bucketName, objectName string) error }
S3 is a client to interact with S3 storage.
type S3Manager ¶
type S3Manager struct { EditableMaxSize int64 // contains filtered or unexported fields }
func (*S3Manager) BucketName ¶
func (*S3Manager) ErrIsNotExist ¶
func (*S3Manager) FPutObject ¶
func (*S3Manager) GetWithContext ¶
func (*S3Manager) ListTransfer ¶
func (*S3Manager) RemoveDirWithContext ¶
func (*S3Manager) RemoveWithContext ¶
func (*S3Manager) SetBucketName ¶
func (*S3Manager) Stat ¶
func (s *S3Manager) Stat(ppath string) (minio.ObjectInfo, error)
Stat 获取对象信息
func (*S3Manager) StatIsExists ¶
StatIsExists 对象是否存在
func (*S3Manager) Upload ¶
func (s *S3Manager) Upload(ctx echo.Context, ppath string, chunkUpload *uploadClient.ChunkUpload, chunkOpts ...uploadClient.ChunkInfoOpter) error
Click to show internal directories.
Click to hide internal directories.