s3

package module
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 21 Imported by: 0

README

S3

A s3 disk driver for facades.Storage() of Goravel.

Version

goravel/s3 goravel/framework
v1.17.x v1.17.x
v1.4.* v1.16.*
v1.3.* v1.15.*
v1.2.* v1.14.*
v1.1.* v1.13.*
v1.0.* v1.12.*

Install

Run the command below in your project to install the package automatically:

./artisan package:install github.com/goravel/s3

Or check the setup file to install the package manually.

Testing

Run command below to run test:

AWS_ACCESS_KEY_ID= AWS_ACCESS_KEY_SECRET= AWS_REGION= AWS_BUCKET= AWS_URL= go test ./...

Documentation

Index

Constants

View Source
const Binding = "goravel.s3"

Variables

Functions

This section is empty.

Types

type S3

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

func NewS3

func NewS3(ctx context.Context, config config.Config, disk string) (*S3, error)

func (*S3) AllDirectories

func (r *S3) AllDirectories(path string) ([]string, error)

func (*S3) AllFiles

func (r *S3) AllFiles(path string) ([]string, error)

func (*S3) Copy

func (r *S3) Copy(originFile, targetFile string) error

func (*S3) Delete

func (r *S3) Delete(files ...string) error

func (*S3) DeleteDirectory

func (r *S3) DeleteDirectory(directory string) error

func (*S3) Directories

func (r *S3) Directories(path string) ([]string, error)

func (*S3) Exists

func (r *S3) Exists(file string) bool

func (*S3) Files

func (r *S3) Files(path string) ([]string, error)

func (*S3) Get

func (r *S3) Get(file string) (string, error)

func (*S3) GetBytes added in v1.1.1

func (r *S3) GetBytes(file string) ([]byte, error)

func (*S3) LastModified

func (r *S3) LastModified(file string) (time.Time, error)

func (*S3) MakeDirectory

func (r *S3) MakeDirectory(directory string) error

func (*S3) MimeType

func (r *S3) MimeType(file string) (string, error)

func (*S3) Missing

func (r *S3) Missing(file string) bool

func (*S3) Move

func (r *S3) Move(oldFile, newFile string) error

func (*S3) Path

func (r *S3) Path(file string) string

func (*S3) Put

func (r *S3) Put(file string, content string) error

func (*S3) PutFile

func (r *S3) PutFile(filePath string, source filesystem.File) (string, error)

func (*S3) PutFileAs

func (r *S3) PutFileAs(filePath string, source filesystem.File, name string) (string, error)

func (*S3) Size

func (r *S3) Size(file string) (int64, error)

func (*S3) TemporaryUrl

func (r *S3) TemporaryUrl(file string, t time.Time) (string, error)

func (*S3) Url

func (r *S3) Url(file string) string

func (*S3) WithContext

func (r *S3) WithContext(ctx context.Context) filesystem.Driver

type ServiceProvider

type ServiceProvider struct {
}

func (*ServiceProvider) Boot

func (r *ServiceProvider) Boot(app foundation.Application)

func (*ServiceProvider) Register

func (r *ServiceProvider) Register(app foundation.Application)

func (*ServiceProvider) Relationship added in v1.4.0

func (r *ServiceProvider) Relationship() binding.Relationship

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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