Documentation ¶
Index ¶
- func Init(baseConfig *common_utils.BaseConfig) (*s3.Client, error)
- func PreSignClient(client *s3.Client) *s3.PresignClient
- type ListObjectsV2Pager
- type S3Client
- type S3ClientImpl
- func (s *S3ClientImpl) BuildPublicUrl(path string) string
- func (s *S3ClientImpl) DeleteFile(ctx context.Context, bucketName string, path string) error
- func (s *S3ClientImpl) GetPreSignUrl(ctx context.Context, path string) (string, error)
- func (s *S3ClientImpl) UploadPartPublicFile(ctx context.Context, file multipart.File, path string) (string, error)
- func (s *S3ClientImpl) UploadPrivateFile(ctx context.Context, file multipart.File, path string) (string, error)
- func (s *S3ClientImpl) UploadPublicFile(ctx context.Context, file multipart.File, path string) (string, error)
- type S3File
- type S3PreSign
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init(baseConfig *common_utils.BaseConfig) (*s3.Client, error)
func PreSignClient ¶
func PreSignClient(client *s3.Client) *s3.PresignClient
Types ¶
type ListObjectsV2Pager ¶
type S3Client ¶
type S3Client interface { ListObjectsV2(ctx context.Context, params *s3.ListObjectsV2Input, optFns ...func(*s3.Options)) (*s3.ListObjectsV2Output, error) PutObject(ctx context.Context, params *s3.PutObjectInput, optFns ...func(*s3.Options)) (*s3.PutObjectOutput, error) CreateMultipartUpload(ctx context.Context, params *s3.CreateMultipartUploadInput, optFns ...func(*s3.Options)) (*s3.CreateMultipartUploadOutput, error) DeleteObject(ctx context.Context, params *s3.DeleteObjectInput, optFns ...func(*s3.Options)) (*s3.DeleteObjectOutput, error) UploadPart(ctx context.Context, params *s3.UploadPartInput, optFns ...func(*s3.Options)) (*s3.UploadPartOutput, error) CompleteMultipartUpload(ctx context.Context, params *s3.CompleteMultipartUploadInput, optFns ...func(*s3.Options)) (*s3.CompleteMultipartUploadOutput, error) }
type S3ClientImpl ¶
type S3ClientImpl struct {
// contains filtered or unexported fields
}
func (*S3ClientImpl) BuildPublicUrl ¶
func (s *S3ClientImpl) BuildPublicUrl(path string) string
func (*S3ClientImpl) DeleteFile ¶
func (*S3ClientImpl) GetPreSignUrl ¶
func (*S3ClientImpl) UploadPartPublicFile ¶
func (*S3ClientImpl) UploadPrivateFile ¶
func (*S3ClientImpl) UploadPublicFile ¶
type S3File ¶
type S3File interface { UploadPrivateFile(ctx context.Context, file multipart.File, path string) (string, error) UploadPublicFile(ctx context.Context, file multipart.File, path string) (string, error) UploadPartPublicFile(ctx context.Context, file multipart.File, path string) (string, error) DeleteFile(ctx context.Context, bucketName string, path string) error GetPreSignUrl(ctx context.Context, path string) (string, error) BuildPublicUrl(path string) string }
func NewS3Client ¶
func NewS3Client( client S3Client, preSign S3PreSign, config *common_utils.BaseConfig, ) S3File
type S3PreSign ¶
type S3PreSign interface { PresignGetObject( ctx context.Context, params *s3.GetObjectInput, optFns ...func(*s3.PresignOptions)) (*v4.PresignedHTTPRequest, error) }
Click to show internal directories.
Click to hide internal directories.