Documentation ¶
Index ¶
- func InitS3(s3Cfg *config.S3Config) *s3.Client
- func NewAwsS3(s3Cfg *config.S3Config, client *s3.Client) storage.IStorageProviderRepository
- type AwsS3Usecase
- func (s *AwsS3Usecase) AllDirectories(ctx context.Context, directory string) ([]string, error)
- func (s *AwsS3Usecase) AllFiles(ctx context.Context, directory string) ([]string, error)
- func (s *AwsS3Usecase) Append(ctx context.Context, path, data string) error
- func (s *AwsS3Usecase) Copy(ctx context.Context, from, to string) error
- func (s *AwsS3Usecase) Delete(ctx context.Context, paths ...string) error
- func (s *AwsS3Usecase) DeleteDirectory(ctx context.Context, directory string) error
- func (s *AwsS3Usecase) Directories(ctx context.Context, directory string, recursive bool) ([]string, error)
- func (s *AwsS3Usecase) Exists(ctx context.Context, path string) bool
- func (s *AwsS3Usecase) Files(ctx context.Context, directory string, recursive bool) ([]string, error)
- func (s *AwsS3Usecase) GenerateURL(ctx context.Context, path string, expires time.Duration) (*string, error)
- func (s *AwsS3Usecase) Get(ctx context.Context, path string) (string, error)
- func (s *AwsS3Usecase) GetVisibility(ctx context.Context, path string) (string, error)
- func (s *AwsS3Usecase) LastModified(ctx context.Context, path string) (int64, error)
- func (s *AwsS3Usecase) MakeDirectory(ctx context.Context, path string) error
- func (s *AwsS3Usecase) Move(ctx context.Context, from, to string) error
- func (s *AwsS3Usecase) Prepend(ctx context.Context, path, data string) error
- func (s *AwsS3Usecase) Put(ctx context.Context, path string, contents interface{}, options ...interface{}) error
- func (s *AwsS3Usecase) ReadStream(ctx context.Context, path string) (io.ReadCloser, error)
- func (s *AwsS3Usecase) SetVisibility(ctx context.Context, path, visibility string) error
- func (s *AwsS3Usecase) Size(ctx context.Context, path string) (int64, error)
- func (s *AwsS3Usecase) WriteStream(ctx context.Context, path string, reader io.Reader, options ...interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AwsS3Usecase ¶
AwsS3Usecase AwsS3Use case Storage implements the laravel Filesystem like interface using Amazon S3.
func (*AwsS3Usecase) AllDirectories ¶
AllDirectories lists all directories under a directory in the S3 bucket, including those in subdirectories.
func (*AwsS3Usecase) AllFiles ¶
AllFiles lists all files under a directory in the S3 bucket, including those in subdirectories.
func (*AwsS3Usecase) Append ¶
func (s *AwsS3Usecase) Append(ctx context.Context, path, data string) error
Append appends data to the end of an object's content in the S3 bucket.
func (*AwsS3Usecase) Copy ¶
func (s *AwsS3Usecase) Copy(ctx context.Context, from, to string) error
Copy copies an object from one location to another within the S3 bucket.
func (*AwsS3Usecase) Delete ¶
func (s *AwsS3Usecase) Delete(ctx context.Context, paths ...string) error
Delete removes one or more objects from the S3 bucket.
func (*AwsS3Usecase) DeleteDirectory ¶
func (s *AwsS3Usecase) DeleteDirectory(ctx context.Context, directory string) error
DeleteDirectory deletes a directory in the S3 bucket by removing all its contained objects.
func (*AwsS3Usecase) Directories ¶
func (s *AwsS3Usecase) Directories(ctx context.Context, directory string, recursive bool) ([]string, error)
Directories lists the directories under a directory in the S3 bucket, optionally recursively.
func (*AwsS3Usecase) Exists ¶
func (s *AwsS3Usecase) Exists(ctx context.Context, path string) bool
Exists checks if an object exists in the S3 bucket.
func (*AwsS3Usecase) Files ¶
func (s *AwsS3Usecase) Files(ctx context.Context, directory string, recursive bool) ([]string, error)
Files lists the files under a directory in the S3 bucket, optionally recursively.
func (*AwsS3Usecase) GenerateURL ¶
func (*AwsS3Usecase) GetVisibility ¶
GetVisibility retrieves the visibility setting of an object in the S3 bucket.
func (*AwsS3Usecase) LastModified ¶
LastModified retrieves the last modified timestamp of an object in the S3 bucket.
func (*AwsS3Usecase) MakeDirectory ¶
func (s *AwsS3Usecase) MakeDirectory(ctx context.Context, path string) error
MakeDirectory creates a directory in the S3 bucket by storing an empty object with a trailing slash.
func (*AwsS3Usecase) Move ¶
func (s *AwsS3Usecase) Move(ctx context.Context, from, to string) error
Move moves an object from one location to another within the S3 bucket.
func (*AwsS3Usecase) Prepend ¶
func (s *AwsS3Usecase) Prepend(ctx context.Context, path, data string) error
Prepend prepends data to the beginning of an object's content in the S3 bucket.
func (*AwsS3Usecase) Put ¶
func (s *AwsS3Usecase) Put(ctx context.Context, path string, contents interface{}, options ...interface{}) error
Put stores content in an object within the S3 bucket.
func (*AwsS3Usecase) ReadStream ¶
func (s *AwsS3Usecase) ReadStream(ctx context.Context, path string) (io.ReadCloser, error)
ReadStream retrieves the content of an object from the S3 bucket as a ReadCloser.
func (*AwsS3Usecase) SetVisibility ¶
func (s *AwsS3Usecase) SetVisibility(ctx context.Context, path, visibility string) error
SetVisibility sets the visibility of an object in the S3 bucket.
func (*AwsS3Usecase) WriteStream ¶
func (s *AwsS3Usecase) WriteStream(ctx context.Context, path string, reader io.Reader, options ...interface{}) error
WriteStream writes the content of a Reader to an object within the S3 bucket.